Skip to content

Commit 20e942b

Browse files
committed
Allow context bounds on type members in 3.6
It was forgotten before to enable this.
1 parent 3fd727d commit 20e942b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4024,7 +4024,7 @@ object Parsers {
40244024
case SEMI | NEWLINE | NEWLINES | COMMA | RBRACE | OUTDENT | EOF =>
40254025
makeTypeDef(typeAndCtxBounds(tname))
40264026
case _ if (staged & StageKind.QuotedPattern) != 0
4027-
|| in.featureEnabled(Feature.modularity) && in.isColon =>
4027+
|| sourceVersion.isAtLeast(`3.6`) && in.isColon =>
40284028
makeTypeDef(typeAndCtxBounds(tname))
40294029
case _ =>
40304030
syntaxErrorOrIncomplete(ExpectedTypeBoundOrEquals(in.token))

0 commit comments

Comments
 (0)