File tree 5 files changed +7
-4
lines changed
compiler/src/dotty/tools/dotc/parsing
5 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,9 @@ object Parsers {
296
296
def deprecationWarning (msg : => Message , offset : Int = in.offset): Unit =
297
297
ctx.deprecationWarning(msg, source.atSpan(Span (offset)))
298
298
299
+ def errorOrMigrationWarning (msg : => Message , offset : Int = in.offset): Unit =
300
+ ctx.errorOrMigrationWarning(msg, source.atSpan(Span (offset)))
301
+
299
302
/** Issue an error at current offset that input is incomplete */
300
303
def incompleteInputError (msg : => Message ): Unit =
301
304
ctx.incompleteInputError(msg, source.atSpan(Span (in.offset)))
@@ -1135,7 +1138,7 @@ object Parsers {
1135
1138
AppliedTypeTree (toplevelTyp(), Ident (pname))
1136
1139
} :: contextBounds(pname)
1137
1140
case VIEWBOUND =>
1138
- deprecationWarning (" view bounds `<%' are deprecated, use a context bound `:' instead" )
1141
+ errorOrMigrationWarning (" view bounds `<%' are deprecated, use a context bound `:' instead" )
1139
1142
atSpan(in.skipToken()) {
1140
1143
Function (Ident (pname) :: Nil , toplevelTyp())
1141
1144
} :: contextBounds(pname)
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ abstract class TokensCommon {
112
112
// final val SUPERTYPE = 81; enter(SUPERTYPE, ">:")
113
113
// final val HASH = 82; enter(HASH, "#")
114
114
final val AT = 83 ; enter(AT , " @" )
115
- // final val VIEWBOUND = 84; enter(VIEWBOUND, "<%") // TODO: deprecate
115
+ // final val VIEWBOUND = 84; enter(VIEWBOUND, "<%")
116
116
117
117
val keywords : TokenSet
118
118
@@ -193,7 +193,7 @@ object Tokens extends TokensCommon {
193
193
final val SUBTYPE = 80 ; enter(SUBTYPE , " <:" )
194
194
final val SUPERTYPE = 81 ; enter(SUPERTYPE , " >:" )
195
195
final val HASH = 82 ; enter(HASH , " #" )
196
- final val VIEWBOUND = 84 ; enter(VIEWBOUND , " <%" ) // TODO: deprecate
196
+ final val VIEWBOUND = 84 ; enter(VIEWBOUND , " <%" )
197
197
final val QUOTE = 85 ; enter(QUOTE , " '" )
198
198
199
199
/** XML mode */
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ NamedTypeArg ::= id ‘=’ Type
171
171
NamedTypeArgs ::= ‘[’ NamedTypeArg {‘,’ NamedTypeArg} ‘]’ nts
172
172
Refinement ::= ‘{’ [RefineDcl] {semi [RefineDcl]} ‘}’ ds
173
173
SubtypeBounds ::= [‘>:’ Type] [‘<:’ Type] | INT TypeBoundsTree(lo, hi)
174
- TypeParamBounds ::= SubtypeBounds {‘<% ’ Type} {‘:’ Type} ContextBounds(typeBounds, tps)
174
+ TypeParamBounds ::= SubtypeBounds {‘: ’ Type} ContextBounds(typeBounds, tps)
175
175
```
176
176
177
177
### Expressions
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments