We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 872d82f commit ffd46e5Copy full SHA for ffd46e5
integration_tests/test_unary_op_04.py
@@ -1,20 +1,17 @@
1
-from lpython import u16
+from lpython import u16, bitnot_u16
2
3
def foo(grp: u16) -> u16:
4
- i: u16 = ~(u16(grp))
5
-
+ i: u16 = bitnot_u16(grp)
6
return i
7
8
9
def foo2() -> u16:
10
- i: u16 = ~(u16(0xffff))
11
+ i: u16 = bitnot_u16(u16(0xffff))
12
13
14
def foo3() -> u16:
15
16
17
- return ~i
+ return bitnot_u16(i)
18
19
assert foo(u16(0)) == u16(0xffff)
20
assert foo(u16(0xffff)) == u16(0)
0 commit comments