-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
whitequark
committed
Jun 15, 2015
1 parent
7a00a4a
commit 8c5e58f
Showing
4 changed files
with
121 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t | ||
# RUN: OutputCheck %s --file-to-check=%t | ||
|
||
# CHECK-L: ${LINE:+1}: error: cannot call this expression of type int | ||
(1)() | ||
|
||
def f(x, y, z=1): | ||
pass | ||
|
||
# CHECK-L: ${LINE:+1}: error: variadic arguments are not supported | ||
f(*[]) | ||
|
||
# CHECK-L: ${LINE:+1}: error: variadic arguments are not supported | ||
f(**[]) | ||
|
||
# CHECK-L: ${LINE:+1}: error: the argument 'x' is already passed | ||
f(1, x=1) | ||
|
||
# CHECK-L: ${LINE:+1}: error: mandatory argument 'x' is not passed | ||
f() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# RUN: %python -m artiq.py2llvm.typing %s >%t | ||
|
||
def _gcd(a, b): | ||
if a < 0: | ||
a = -a | ||
while a: | ||
c = a | ||
a = b % a | ||
b = c | ||
return b | ||
|
||
_gcd(10, 25) |