File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1203,6 +1203,7 @@ object RefChecks {
12031203 def checkPublicFlexibleTypes (sym : Symbol )(using Context ): Unit =
12041204 if ctx.explicitNulls && ! ctx.isJava
12051205 && sym.exists && sym.owner.isClass
1206+ && ! sym.owner.isAnonymousClass
12061207 && ! sym.isOneOf(JavaOrPrivateOrSynthetic | InlineProxy | Param | Exported ) then
12071208 val resTp = sym.info.finalResultType
12081209 if resTp.existsPart(_.isInstanceOf [FlexibleType ], StopAt .Static ) then
Original file line number Diff line number Diff line change @@ -9,3 +9,9 @@ trait AwtComponentLogging extends java.awt.Component:
99 private def superPS1 = super .getPreferredSize
1010
1111 private val superPS2 = super .getPreferredSize
12+
13+ class Test :
14+ def getCompoment : java.awt.Component =
15+ new java.awt.Component {
16+ override def getPreferredSize = super .getPreferredSize
17+ }
You can’t perform that action at this time.
0 commit comments