We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7b24e7 commit 123e68aCopy full SHA for 123e68a
compiler/src/dotty/tools/dotc/typer/MemoizeGivenAliases.scala
@@ -42,13 +42,13 @@ trait MemoizeGivenAliases { this: Typer =>
42
pre match {
43
case NoPrefix => false
44
case pre: ThisType => pre.cls != meth.owner.enclosingClass
45
+ case _ => true
46
}
47
case _ => true
48
49
if (needsMemo) {
- val memoized =
50
- untpd.Apply(untpd.ref(defn.Compiletime_memo.termRef), untpd.TypedSplice(rhs) :: Nil)
51
- typed(memoized, rhsType)
+ val memoized = ref(defn.Compiletime_memo).appliedToType(rhsType).appliedTo(rhs)
+ adapt(memoized, rhsType)
52
53
else rhs
54
case _ => rhs
0 commit comments