File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,13 @@ class ExplicitOuter extends MiniPhase with InfoTransformer { thisPhase =>
97
97
}
98
98
99
99
val parents1 =
100
- for (parent <- impl.parents) yield {
100
+ for (parent <- impl.parents) yield
101
101
val parentCls = parent.tpe.classSymbol.asClass
102
- if (parentCls.is( Trait ))
103
- parent
104
- else parent match { // ensure class parent is a constructor
105
- case parent : TypeTree => New (parent.tpe, Nil ).withSpan(impl.span)
102
+ parent match // ensure class parent is a constructor
103
+ case parent : TypeTree
104
+ if ! parentCls.is( Trait ) && ! defn. NotRuntimeClasses .contains(parentCls) =>
105
+ New (parent.tpe, Nil ).withSpan(impl.span)
106
106
case _ => parent
107
- }
108
- }
109
107
cpy.Template (impl)(parents = parents1, body = impl.body ++ newDefs)
110
108
}
111
109
else impl
Original file line number Diff line number Diff line change
1
+ class A {
2
+ trait B extends Any {
3
+ println()
4
+ }
5
+ }
You can’t perform that action at this time.
0 commit comments