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 =>
9797 }
9898
9999 val parents1 =
100- for (parent <- impl.parents) yield {
100+ for (parent <- impl.parents) yield
101101 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)
106106 case _ => parent
107- }
108- }
109107 cpy.Template (impl)(parents = parents1, body = impl.body ++ newDefs)
110108 }
111109 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