File tree Expand file tree Collapse file tree 5 files changed +7
-4
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 5 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,9 @@ object Parsers {
296296 def deprecationWarning (msg : => Message , offset : Int = in.offset): Unit =
297297 ctx.deprecationWarning(msg, source.atSpan(Span (offset)))
298298
299+ def errorOrMigrationWarning (msg : => Message , offset : Int = in.offset): Unit =
300+ ctx.errorOrMigrationWarning(msg, source.atSpan(Span (offset)))
301+
299302 /** Issue an error at current offset that input is incomplete */
300303 def incompleteInputError (msg : => Message ): Unit =
301304 ctx.incompleteInputError(msg, source.atSpan(Span (in.offset)))
@@ -1133,7 +1136,7 @@ object Parsers {
11331136 AppliedTypeTree (toplevelTyp(), Ident (pname))
11341137 } :: contextBounds(pname)
11351138 case VIEWBOUND =>
1136- deprecationWarning (" view bounds `<%' are deprecated, use a context bound `:' instead" )
1139+ errorOrMigrationWarning (" view bounds `<%' are deprecated, use a context bound `:' instead" )
11371140 atSpan(in.skipToken()) {
11381141 Function (Ident (pname) :: Nil , toplevelTyp())
11391142 } :: contextBounds(pname)
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ abstract class TokensCommon {
112112 // final val SUPERTYPE = 81; enter(SUPERTYPE, ">:")
113113 // final val HASH = 82; enter(HASH, "#")
114114 final val AT = 83 ; enter(AT , " @" )
115- // final val VIEWBOUND = 84; enter(VIEWBOUND, "<%") // TODO: deprecate
115+ // final val VIEWBOUND = 84; enter(VIEWBOUND, "<%")
116116
117117 val keywords : TokenSet
118118
@@ -193,7 +193,7 @@ object Tokens extends TokensCommon {
193193 final val SUBTYPE = 80 ; enter(SUBTYPE , " <:" )
194194 final val SUPERTYPE = 81 ; enter(SUPERTYPE , " >:" )
195195 final val HASH = 82 ; enter(HASH , " #" )
196- final val VIEWBOUND = 84 ; enter(VIEWBOUND , " <%" ) // TODO: deprecate
196+ final val VIEWBOUND = 84 ; enter(VIEWBOUND , " <%" )
197197 final val QUOTE = 85 ; enter(QUOTE , " '" )
198198
199199 /** XML mode */
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ NamedTypeArg ::= id ‘=’ Type
171171NamedTypeArgs ::= ‘[’ NamedTypeArg {‘,’ NamedTypeArg} ‘]’ nts
172172Refinement ::= ‘{’ [RefineDcl] {semi [RefineDcl]} ‘}’ ds
173173SubtypeBounds ::= [‘>:’ Type] [‘<:’ Type] | INT TypeBoundsTree(lo, hi)
174- TypeParamBounds ::= SubtypeBounds {‘<% ’ Type} {‘:’ Type} ContextBounds(typeBounds, tps)
174+ TypeParamBounds ::= SubtypeBounds {‘: ’ Type} ContextBounds(typeBounds, tps)
175175```
176176
177177### Expressions
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments