File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -127,12 +127,12 @@ class Memoize extends MiniPhase with IdentityDenotTransformer { thisPhase =>
127127 val TraitSetterName (_, original) = sym.name
128128 val getterSimpleName = original.getterName
129129 val ownerInfo = sym.owner.info
130- val fastPath = ownerInfo.decl (getterSimpleName)
130+ val fastPath = ownerInfo.findDecl (getterSimpleName, excluded = Bridge )
131131 if fastPath.exists then
132132 fastPath.symbol
133133 else
134134 ownerInfo.decls.find { getter =>
135- getter.is(Accessor ) && getter.asTerm.name.toSimpleName == getterSimpleName
135+ getter.is(Accessor , butNot = Bridge ) && getter.asTerm.name.toSimpleName == getterSimpleName
136136 }
137137
138138 val constantFinalVal = sym.isAllOf(Accessor | Final , butNot = Mutable ) && tree.rhs.isInstanceOf [Literal ]
Original file line number Diff line number Diff line change 1+ class Foo
2+
3+ trait GenericTrait [A ] {
4+ def bar : A
5+ }
6+
7+ trait ConcreteTrait extends GenericTrait [Foo ] {
8+ val bar : Foo = new Foo
9+ }
10+
11+ class ConcreteClass extends ConcreteTrait
12+
13+ object Test {
14+ def main (args : Array [String ]): Unit = {
15+ val obj = new ConcreteClass
16+ assert(obj.bar != null )
17+ }
18+ }
You can’t perform that action at this time.
0 commit comments