File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2810,7 +2810,8 @@ object Parsers {
28102810 else Nil
28112811
28122812 /** Pattern1 ::= PatVar Ascription
2813- * | SimpleLiteral Ascription
2813+ * | [‘-’] integerLiteral Ascription
2814+ * | [‘-’] floatingPointLiteral Ascription
28142815 * | Pattern2
28152816 */
28162817 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]
319319
320320Pattern ::= Pattern1 { ‘|’ Pattern1 } Alternative(pats)
321321Pattern1 ::= 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)
323324 | Pattern2
324325Pattern2 ::= [id ‘@’] InfixPattern [‘*’] Bind(name, pat)
325326InfixPattern ::= SimplePattern { id [nl] SimplePattern } InfixOp(pat, op, pat)
You can’t perform that action at this time.
0 commit comments