forked from lcompilers/lpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction_def2.py
More file actions
56 lines (42 loc) · 727 Bytes
/
Copy pathfunction_def2.py
File metadata and controls
56 lines (42 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
def test_01():
pass
def test_02(*x: i32):
pass
def test_03(*x, y, z):
pass
def test_04(*x, y, z, **args):
pass
def test_05(*x, **args):
pass
def test_06(**args):
pass
def test_07(x: i32, y):
pass
def test_08(x, *y):
pass
def test_09(x, *y, z):
pass
def test_10(x, *y, z, **args: i32):
pass
def test_11(x, *y, **args):
pass
def test_12(x, **args):
pass
"""
TODO: defaults are not stored in AST
"""
# def test_13(x: i32 = 1, y: i32 = 1):
# pass
def test_14(x, *y, z, **args: i32) -> i32:
pass
test()
test(x, y)
test(x, y = 1, z = '123')
test(100, **x)
test(*x, **y)
test(*x, y)
test(*x, *y)
test(**x, **y)
lp.test()
lp.test(x, y)
lp.test(x, y = 1, z = '123')