File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -544,6 +544,7 @@ object Flags {
544544 val InlineByNameProxy : FlagSet = InlineProxy | Method
545545 val JavaEnumTrait : FlagSet = JavaDefined | Enum // A Java enum trait
546546 val JavaEnumValue : FlagSet = JavaDefined | EnumValue // A Java enum value
547+ val JavaOrPrivateOrSynthetic : FlagSet = JavaDefined | Private | Synthetic
547548 val StaticProtected : FlagSet = JavaDefined | JavaStatic | Protected // Java symbol which is `protected` and `static`
548549 val JavaModule : FlagSet = JavaDefined | Module // A Java companion object
549550 val JavaInterface : FlagSet = JavaDefined | NoInits | Trait
Original file line number Diff line number Diff line change @@ -161,7 +161,8 @@ trait TypeAssigner {
161161 avoid(expr.tpe, localSyms(bindings).filter(_.isTerm))
162162
163163 def avoidPrivateLeaks (sym : Symbol )(implicit ctx : Context ): Type =
164- if (! sym.isOneOf(PrivateOrSynthetic ) && sym.owner.isClass) checkNoPrivateLeaks(sym)
164+ if sym.owner.isClass && ! sym.isOneOf(JavaOrPrivateOrSynthetic )
165+ then checkNoPrivateLeaks(sym)
165166 else sym.info
166167
167168 private def toRepeated (tree : Tree , from : ClassSymbol )(implicit ctx : Context ): Tree =
Original file line number Diff line number Diff line change 1+ public class i7959 {
2+ private static class Foo {
3+ Foo () { }
4+ }
5+ }
You can’t perform that action at this time.
0 commit comments