File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
101
101
val Select (sup @ Super (_, mix), name) = sel
102
102
val sym = sel.symbol
103
103
assert(sup.symbol.exists, s " missing symbol in $sel: ${sup.tpe}" )
104
- val clazz = sup.symbol.asClass
104
+ lazy val clazz = sup.symbol.asClass
105
105
106
106
if (sym.isTerm && ! sym.is(Method , butNot = Accessor ) && ! ctx.owner.is(ParamForwarder ))
107
107
// ParamForwaders as installed ParamForwarding.scala do use super calls to vals
Original file line number Diff line number Diff line change
1
+ trait Foo {
2
+ def foo = 4
3
+ }
4
+ object Bar extends Foo {
5
+ inline def bar = super [Foo ].foo // error
6
+ }
7
+ object Main {
8
+ Bar .bar
9
+ }
You can’t perform that action at this time.
0 commit comments