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 {
544
544
val InlineByNameProxy : FlagSet = InlineProxy | Method
545
545
val JavaEnumTrait : FlagSet = JavaDefined | Enum // A Java enum trait
546
546
val JavaEnumValue : FlagSet = JavaDefined | EnumValue // A Java enum value
547
+ val JavaOrPrivateOrSynthetic : FlagSet = JavaDefined | Private | Synthetic
547
548
val StaticProtected : FlagSet = JavaDefined | JavaStatic | Protected // Java symbol which is `protected` and `static`
548
549
val JavaModule : FlagSet = JavaDefined | Module // A Java companion object
549
550
val JavaInterface : FlagSet = JavaDefined | NoInits | Trait
Original file line number Diff line number Diff line change @@ -161,7 +161,8 @@ trait TypeAssigner {
161
161
avoid(expr.tpe, localSyms(bindings).filter(_.isTerm))
162
162
163
163
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)
165
166
else sym.info
166
167
167
168
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