File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -93,10 +93,11 @@ object SymDenotations {
93
93
if (myFlags.is(Trait )) NoInitsInterface & bodyFlags // no parents are initialized from a trait
94
94
else NoInits & bodyFlags & parentFlags)
95
95
96
- private def isCurrent (fs : FlagSet ) =
97
- fs <= (
98
- if (myInfo.isInstanceOf [SymbolLoader ]) FromStartFlags
99
- else AfterLoadFlags )
96
+ def isCurrent (fs : FlagSet )(using Context ): Boolean =
97
+ def knownFlags (info : Type ): FlagSet = info match
98
+ case _ : SymbolLoader | _ : ModuleCompleter => FromStartFlags
99
+ case _ => AfterLoadFlags
100
+ ! myInfo.isInstanceOf [LazyType ] || fs <= knownFlags(myInfo)
100
101
101
102
final def relevantFlagsFor (fs : FlagSet )(using Context ) =
102
103
if (isCurrent(fs)) myFlags else flags
Original file line number Diff line number Diff line change
1
+ @ main def Test () = String // error
2
+
You can’t perform that action at this time.
0 commit comments