File tree 4 files changed +16
-2
lines changed
tests/parsing/grammar/expressions
4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 18
18
- Disallow spreading anything but regular variants inside of other variants. https://github.com/rescript-lang/rescript-compiler/pull/6980
19
19
- Fix comment removed when function signature has ` type ` keyword. https://github.com/rescript-lang/rescript-compiler/pull/6997
20
20
- 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
21
22
22
23
# 11.1.3
23
24
Original file line number Diff line number Diff line change @@ -1865,6 +1865,7 @@ and parseConstrainedExprRegion p =
1865
1865
| token when Grammar. isExprStart token -> (
1866
1866
let expr = parseExpr p in
1867
1867
match p.Parser. token with
1868
+ | ColonGreaterThan -> Some (parseCoercedExpr ~expr p)
1868
1869
| Colon ->
1869
1870
Parser. next p;
1870
1871
let typ = parseTypExpr p in
Original file line number Diff line number Diff line change 1
1
let foo = (x :int ) => (x :> int )
2
2
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 1
1
let 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