File tree 1 file changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,12 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
57
57
else if sym2 == defn.AnyValClass || sym2 == defn.AnyRefAlias || sym2 == defn.ObjectClass then
58
58
EmptyTree
59
59
else
60
- // Generate SAM: (s: <tp1>) => if s.isInstanceOf[s.type & <tp2>] then Some(s.asInstanceOf[s.type & <tp2>]) else None
60
+ // Generate SAM: (s: <tp1>) => if s.isInstanceOf[<tp2>] then Some(s.asInstanceOf[s.type & <tp2>]) else None
61
61
def body (args : List [Tree ]): Tree = {
62
62
val arg :: Nil = args
63
63
val t = arg.tpe & tp2
64
64
If (
65
- arg.select(defn.Any_isInstanceOf ).appliedToType(t ),
65
+ arg.select(defn.Any_isInstanceOf ).appliedToType(tp2 ),
66
66
ref(defn.SomeClass .companionModule.termRef).select(nme.apply)
67
67
.appliedToType(t)
68
68
.appliedTo(arg.select(nme.asInstanceOf_).appliedToType(t)),
You can’t perform that action at this time.
0 commit comments