-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Detect unsupported default arguments (#659)
Fixes #658
- Loading branch information
Showing
3 changed files
with
18 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Error: Unsupported (at $FILE:5:26) | ||
| | ||
3 | | ||
4 | @compile_guppy | ||
5 | def foo(x: int, y: bool = True) -> int: | ||
| ^^^^ Default arguments are not supported | ||
|
||
Guppy compilation failed due to 1 previous error |
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,6 @@ | ||
from tests.util import compile_guppy | ||
|
||
|
||
@compile_guppy | ||
def foo(x: int, y: bool = True) -> int: | ||
return x |