File tree 4 files changed +29
-1
lines changed
parsing/grammar/expressions
4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -35,3 +35,10 @@ let ex1 = await 3 + await 4
35
35
let ex2 = await 3 ** await 4
36
36
let ex3 = await foo -> bar (~arg )
37
37
let ex4 = await foo .bar .baz
38
+
39
+
40
+ let attr1 = @a async x => x + 1
41
+ let attr2 = @a async (type a ) => (type b c , x ) => 3
42
+ let attr3 = @a (type a ) => async (type b c , x ) => 3
43
+ let attr4 = @a (type a ) => @b async (type b c , x ) => 3
44
+ let attr5 : int = @a @b async (type a , type b c ) => (x :a ) => x
Original file line number Diff line number Diff line change @@ -31,4 +31,13 @@ let bar = ((fun [arity:1]~a:((a)[@res.namedArgLoc ]) -> a + 1)[@res.async ])
31
31
let ex1 = ((3)[@res.await ]) + ((4)[@res.await ])
32
32
let ex2 = ((3)[@res.await ]) ** ((4)[@res.await ])
33
33
let ex3 = ((foo |.u (bar ~arg:((arg)[@res.namedArgLoc ])))[@res.await ])
34
- let ex4 = (((foo.bar).baz)[@res.await ])
34
+ let ex4 = (((foo.bar).baz)[@res.await ])
35
+ let attr1 = ((fun [arity:1]x -> x + 1)[@res.async ][@a ])
36
+ let attr2 = ((fun (type a) -> fun (type b) -> fun (type c) ->
37
+ fun [arity:1]x -> 3)[@res.async ][@a ])
38
+ let attr3 = ((fun (type a) -> ((fun (type b) -> fun (type c) ->
39
+ fun [arity:1]x -> 3)[@res.async ]))[@a ])
40
+ let attr4 = ((fun (type a) -> ((fun (type b) -> fun (type c) ->
41
+ fun [arity:1]x -> 3)[@res.async ][@b ]))[@a ])
42
+ let (attr5 : int) = ((fun (type a) -> fun (type b) -> fun (type c) ->
43
+ fun [arity:1](x : a) -> x)[@res.async ][@a ][@b ])
Original file line number Diff line number Diff line change @@ -122,3 +122,9 @@ type t2 = (. int, string) => bool
122
122
let f = async (type a , ()) => {
123
123
await Js .Promise .resolve (())
124
124
}
125
+
126
+ let attr1 = @a async x => x + 1
127
+ let attr2 = @a async (type a ) => (type b c , x ) => 3
128
+ let attr3 = @a (type a ) => async (type b c , x ) => 3
129
+ let attr4 = @a (type a ) => @b async (type b c , x ) => 3
130
+ let attr5 : int => promise <int > = @a @b async (type a , type b c ) => (x :a ) => x
Original file line number Diff line number Diff line change @@ -144,3 +144,9 @@ type t2 = (int, string) => bool
144
144
let f = async (type a, ()) => {
145
145
await Js.Promise.resolve()
146
146
}
147
+
148
+ let attr1 = @a async x => x + 1
149
+ let attr2 = @a async (type a b c, x) => 3
150
+ let attr3 = @a (type a, type b c, x) => 3
151
+ let attr4 = @a (type a, @b type b c, x) => 3
152
+ let attr5: int => promise<int> = @a @b async (type a b c, x: a) => x
You can’t perform that action at this time.
0 commit comments