File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,18 @@ class CacheAliasImplicits extends MiniPhase with IdentityDenotTransformer { this
50
50
override def transformDefDef (tree : DefDef )(implicit ctx : Context ): Tree = {
51
51
val sym = tree.symbol
52
52
val rhsType = tree.rhs.tpe
53
- val isCached = sym.info match {
54
- case _ : ExprType if sym.is(Given , butNot = CacheAliasImplicits .NoCacheFlags ) =>
55
- rhsType match {
56
- case TermRef (NoPrefix , _)
57
- if rhsType.isStable => false
58
- case TermRef (pre : ThisType , _)
59
- if rhsType.isStable && pre.cls == sym.owner.enclosingClass => false
60
- case _ => true
61
- }
62
- case _ => false
53
+ val isCached = ! sym.is(Inline ) && {
54
+ sym.info match {
55
+ case _ : ExprType if sym.is(Given , butNot = CacheAliasImplicits .NoCacheFlags ) =>
56
+ rhsType match {
57
+ case TermRef (NoPrefix , _)
58
+ if rhsType.isStable => false
59
+ case TermRef (pre : ThisType , _)
60
+ if rhsType.isStable && pre.cls == sym.owner.enclosingClass => false
61
+ case _ => true
62
+ }
63
+ case _ => false
64
+ }
63
65
}
64
66
if (isCached) {
65
67
sym.copySymDenotation(
You can’t perform that action at this time.
0 commit comments