Skip to content

Commit

Permalink
Check if both forms are equivalent
Browse files Browse the repository at this point in the history
  • Loading branch information
smarter committed Jun 15, 2021
1 parent 076ab0a commit a2582c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/src/dotty/tools/dotc/core/TypeErasure.scala
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,12 @@ class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConst
// forwarders to mixin methods.
// See doc comment for ElimByName for speculation how we could improve this.
else
val a = eraseResult(rt.translateFromRepeated(toArray = sourceLanguage.isJava))
val b = eraseResult(sym.info.finalResultType.translateFromRepeated(toArray = sourceLanguage.isJava))
assert((a =:= b), i"a: $a\nb: $b")
assert((a.signature == b.signature), i"a.si: ${a.signature}\nb.sig: ${b.signature}")
MethodType(Nil, Nil,
eraseResult(sym.info.finalResultType.translateFromRepeated(toArray = sourceLanguage.isJava)))
a)
case tp1: PolyType =>
eraseResult(tp1.resultType) match
case rt: MethodType => rt
Expand Down

0 comments on commit a2582c1

Please sign in to comment.