Skip to content

Commit d9838df

Browse files
committed
Convert tp <:< FromJavaObject to tp <:< Any
1 parent 4af72b9 commit d9838df

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ class TypeOps:
225225
private def toSemanticType(sym: Symbol)(using LinkMode, SemanticSymbolBuilder, Context): s.Type =
226226
import ConstantOps._
227227
def loop(tpe: Type): s.Type = tpe match {
228+
case t if t.isFromJavaObject =>
229+
loop(defn.AnyType)
228230
case ExprType(tpe) =>
229231
val stpe = loop(tpe)
230232
s.ByNameType(stpe)

tests/semanticdb/metac.expect

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4148,10 +4148,10 @@ types/Test.C#compoundType5. => val method compoundType5 M & N
41484148
types/Test.C#compoundType6. => val method compoundType6 M & N
41494149
types/Test.C#existentialType2. => val method existentialType2 List[_] forSome { type _ }
41504150
types/Test.C#existentialType2.[_] => type _
4151-
types/Test.C#existentialType3. => val method existentialType3 Class[_] forSome { type _ <: <FromJavaObject> }
4152-
types/Test.C#existentialType3.[_] => type _ <: <FromJavaObject>
4153-
types/Test.C#existentialType4. => val method existentialType4 Class[_] forSome { type _ <: <FromJavaObject> }
4154-
types/Test.C#existentialType4.[_] => type _ <: <FromJavaObject>
4151+
types/Test.C#existentialType3. => val method existentialType3 Class[_] forSome { type _ }
4152+
types/Test.C#existentialType3.[_] => type _
4153+
types/Test.C#existentialType4. => val method existentialType4 Class[_] forSome { type _ }
4154+
types/Test.C#existentialType4.[_] => type _
41554155
types/Test.C#p. => val method p P
41564156
types/Test.C#singleType1. => val method singleType1 x.type
41574157
types/Test.C#singleType2. => val method singleType2 p.x.type

0 commit comments

Comments
 (0)