Skip to content

Commit 3fcc12f

Browse files
committed
Consistent erasure for Java method signatures
Use Jave erasure to compute the result type part of Java method signatures too. I don't think that two distinct non-bridge Java overloads can only differ in their result type so this shouldn't fix anything, but it's more consistent.
1 parent c91d5bf commit 3fcc12f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3367,7 +3367,7 @@ object Types {
33673367
case tp: ExprType => tp.signature
33683368
case tp =>
33693369
if tp.isRef(defn.UnitClass) then Signature(Nil, defn.UnitClass.fullName.asTypeName)
3370-
else Signature(tp, isJava = false)
3370+
else Signature(tp, isJava)
33713371
this match
33723372
case tp: MethodType =>
33733373
val params = if (isErasedMethod) Nil else tp.paramInfos

0 commit comments

Comments
 (0)