File tree Expand file tree Collapse file tree 4 files changed +16
-2
lines changed
tests/parsing/grammar/expressions Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1818- Disallow spreading anything but regular variants inside of other variants. https://github.com/rescript-lang/rescript-compiler/pull/6980
1919- Fix comment removed when function signature has ` type ` keyword. https://github.com/rescript-lang/rescript-compiler/pull/6997
2020- Fix parse error on doc comment before "and" in type def. https://github.com/rescript-lang/rescript-compiler/pull/7001
21+ - Fix tuple coercion. https://github.com/rescript-lang/rescript-compiler/pull/7024
2122
2223# 11.1.3
2324
Original file line number Diff line number Diff line change @@ -1865,6 +1865,7 @@ and parseConstrainedExprRegion p =
18651865 | token when Grammar. isExprStart token -> (
18661866 let expr = parseExpr p in
18671867 match p.Parser. token with
1868+ | ColonGreaterThan -> Some (parseCoercedExpr ~expr p)
18681869 | Colon ->
18691870 Parser. next p;
18701871 let typ = parseTypExpr p in
Original file line number Diff line number Diff line change 11let foo = (x :int ) => (x :> int )
22
3- let foo = x => (x : t :> int )
3+ let foo = x => (x : t :> int )
4+
5+ let _ = (x : int )
6+
7+ let foo = (x : int , y :> float )
8+
9+ let foo = (x : int , y :> float , z :> int )
10+
11+ let foo = (x : int , y , z :> int )
Original file line number Diff line number Diff line change 11let foo (x : int) = (x :> int)
2- let foo x = ((x : t) :> int)
2+ let foo x = ((x : t) :> int)
3+ let _ = (x : int)
4+ let foo = ((x : int), (y :> float))
5+ let foo = ((x : int), (y :> float), (z :> int))
6+ let foo = ((x : int), y, (z :> int))
You can’t perform that action at this time.
0 commit comments