Skip to content

Commit d2e5782

Browse files
committed
remove assertion.
1 parent c0913d3 commit d2e5782

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,14 +1798,6 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
17981798
boxInstantiated(toTypeKind(lambdaTarget.info.resultType), samMethodBType.returnType)
17991799
)
18001800

1801-
// check that types are equal for parameters and return type as required by spec of altMetafactory
1802-
def checkInstantiated(a: BType, b: BType): Boolean =
1803-
(!a.isPrimitive && !b.isPrimitive) || (a.isPrimitive && b.isPrimitive && a == b)
1804-
assert(
1805-
samMethodBType.argumentTypes.zip(instantiatedMethodBType.argumentTypes).forall(checkInstantiated) && checkInstantiated(samMethodBType.returnType,
1806-
instantiatedMethodBType.returnType), s"Primitive types must be equal: ${samMethodBType} vs. $instantiatedMethodBType"
1807-
)
1808-
18091801
val instantiatedMethodType = instantiatedMethodBType.toASMType
18101802

18111803
// scala/bug#10334: make sure that a lambda object for `T => U` has a method `apply(T)U`, not only the `(Object)Object`

0 commit comments

Comments
 (0)