File tree Expand file tree Collapse file tree
formatter/input-output-pairs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## [ 4.3.1] 2024-08-24
4+
5+ ### Added
6+ - Added support for "is not" type test
7+
38## [ 4.3.0] 2024-08-18
49
510### Added
Original file line number Diff line number Diff line change @@ -223,9 +223,9 @@ not_in_op: "not" "in"
223223!? pow_expr: type_test (" **" asless_type_test )*
224224 | actual_type_cast (" **" asless_type_test )+
225225!? asless_pow_expr: asless_type_test (" **" asless_type_test )*
226- !? type_test: await_expr (" is" TYPE_HINT )*
227- | actual_type_cast (" is" TYPE_HINT )+
228- !? asless_type_test: await_expr (" is" TYPE_HINT )*
226+ !? type_test: await_expr (( " is" | " is not " ) TYPE_HINT )*
227+ | actual_type_cast (( " is" | " is not " ) TYPE_HINT )+
228+ !? asless_type_test: await_expr (( " is" | " is not " ) TYPE_HINT )*
229229!? await_expr: (" await" )* call_expr
230230? call_expr: attr_expr
231231 | (NAME | GET | SET ) _ call_arglist -> standalone_call
Original file line number Diff line number Diff line change 33 var x = 1 is int is bool
44 var y = 1 is int is bool is bool is bool is bool is bool is bool is bool is bool is bool is bool is bool is bool is bool
55 print ([1 ,2.1 ] is Array [int ])
6+ var z = 1 is not int
7+ var z1 = 1 is not int is not bool is not bool is not bool is not bool is not bool is not bool is not bool is not bool is not bool
Original file line number Diff line number Diff line change @@ -19,3 +19,17 @@ class X:
1919 is bool
2020 )
2121 print ([1 , 2.1 ] is Array [int ])
22+ var z = 1 is not int
23+ var z1 = (
24+ 1
25+ is not int
26+ is not bool
27+ is not bool
28+ is not bool
29+ is not bool
30+ is not bool
31+ is not bool
32+ is not bool
33+ is not bool
34+ is not bool
35+ )
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ func foo():
4444 ~ 8
4545 5 ** 5
4646 x is int
47+ x is not int
4748 x is Xyz # TODO: fix/remove x.Type
4849 x is Zyx .Qwe # TODO: fix/remove x.Type
4950 x .attr
You can’t perform that action at this time.
0 commit comments