File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4389,9 +4389,11 @@ object Parsers {
43894389 stats += closure(in.offset, Location .InBlock , modifiers(BitSet (IMPLICIT )))
43904390 else if isIdent(nme.extension) && followingIsExtension() then
43914391 stats += extension()
4392- else if outermost && ctx.mode.is(Mode .Interactive ) && isDefIntro(localModifierTokens) then
4393- stats +++= localDef(in.offset)
4394- else if isDefIntro(localModifierTokens, excludedSoftModifiers = Set (nme.`opaque`)) then
4392+ else if isDefIntro(localModifierTokens,
4393+ excludedSoftModifiers =
4394+ // Allow opaque definitions at outermost level in REPL.
4395+ if outermost && ctx.mode.is(Mode .Interactive )
4396+ then Set .empty else Set (nme.`opaque`)) then
43954397 stats +++= localDef(in.offset)
43964398 else
43974399 empty = true
You can’t perform that action at this time.
0 commit comments