File tree 2 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/parsing
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2810,7 +2810,8 @@ object Parsers {
2810
2810
else Nil
2811
2811
2812
2812
/** Pattern1 ::= PatVar Ascription
2813
- * | SimpleLiteral Ascription
2813
+ * | [‘-’] integerLiteral Ascription
2814
+ * | [‘-’] floatingPointLiteral Ascription
2814
2815
* | Pattern2
2815
2816
*/
2816
2817
def pattern1 (location : Location = Location .InPattern ): Tree =
Original file line number Diff line number Diff line change @@ -319,7 +319,8 @@ TypeCaseClause ::= ‘case’ (InfixType | ‘_’) ‘=>’ Type [semi]
319
319
320
320
Pattern ::= Pattern1 { ‘|’ Pattern1 } Alternative(pats)
321
321
Pattern1 ::= PatVar ‘:’ RefinedType Bind(name, Typed(Ident(wildcard), tpe))
322
- | SimpleLiteral ‘:’ RefinedType Typed(pat, tpe)
322
+ | [‘-’] integerLiteral ‘:’ RefinedType Typed(pat, tpe)
323
+ | [‘-’] floatingPointLiteral ‘:’ RefinedType Typed(pat, tpe)
323
324
| Pattern2
324
325
Pattern2 ::= [id ‘@’] InfixPattern [‘*’] Bind(name, pat)
325
326
InfixPattern ::= SimplePattern { id [nl] SimplePattern } InfixOp(pat, op, pat)
You can’t perform that action at this time.
0 commit comments