File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,11 @@ class ExplicitOuter extends MiniPhase with InfoTransformer { thisPhase =>
101101 val parents1 =
102102 for (parent <- impl.parents) yield
103103 val parentCls = parent.tpe.classSymbol.asClass
104- parent match // ensure class parent is a constructor
104+ parent match
105+ // if we are in a regular class and first parent is also a regular class,
106+ // make sure we have a contructor
105107 case parent : TypeTree
106- if ! parentCls.is(Trait ) && ! defn.NotRuntimeClasses .contains(parentCls) =>
108+ if ! cls.is( Trait ) && ! parentCls.is(Trait ) && ! defn.NotRuntimeClasses .contains(parentCls) =>
107109 New (parent.tpe, Nil ).withSpan(impl.span)
108110 case _ => parent
109111 cpy.Template (impl)(parents = parents1, body = impl.body ++ newDefs)
Original file line number Diff line number Diff line change 1+ import java .awt .event .WindowEvent
2+ import java .awt .{Window => AWTWindow }
3+
4+ abstract class Window {
5+ def peer : AWTWindow with InterfaceMixin
6+
7+ protected trait InterfaceMixin extends javax.swing.RootPaneContainer
8+
9+ protected trait SuperMixin extends java.awt.Window {
10+ override protected def processWindowEvent (e : WindowEvent ): Unit = {
11+ super .processWindowEvent(e)
12+ if (e.getID == WindowEvent .WINDOW_CLOSING )
13+ closeOperation()
14+ }
15+ }
16+
17+ def closeOperation (): Unit = ()
18+ }
You can’t perform that action at this time.
0 commit comments