File tree 5 files changed +25
-3
lines changed
formatter/input-output-pairs
5 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## [ 4.3.1] 2024-08-24
4
+
5
+ ### Added
6
+ - Added support for "is not" type test
7
+
3
8
## [ 4.3.0] 2024-08-18
4
9
5
10
### Added
Original file line number Diff line number Diff line change @@ -223,9 +223,9 @@ not_in_op: "not" "in"
223
223
!? pow_expr: type_test (" **" asless_type_test )*
224
224
| actual_type_cast (" **" asless_type_test )+
225
225
!? 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 )*
229
229
!? await_expr: (" await" )* call_expr
230
230
? call_expr: attr_expr
231
231
| (NAME | GET | SET ) _ call_arglist -> standalone_call
Original file line number Diff line number Diff line change 3
3
var x = 1 is int is bool
4
4
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
5
5
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:
19
19
is bool
20
20
)
21
21
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():
44
44
~ 8
45
45
5 ** 5
46
46
x is int
47
+ x is not int
47
48
x is Xyz # TODO: fix/remove x.Type
48
49
x is Zyx .Qwe # TODO: fix/remove x.Type
49
50
x .attr
You can’t perform that action at this time.
0 commit comments