-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Guppy compilation failed. Error in file $FILE:10 | ||
|
||
8: @guppy.declare(module) | ||
9: def foo(f: Callable) -> None: ... | ||
^^^^^^^^ | ||
GuppyError: Function types should be specified via `Callable[[<arguments>], <return types>]` |
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,13 @@ | ||
from typing import Callable | ||
|
||
from guppylang.decorator import guppy | ||
from guppylang.module import GuppyModule | ||
|
||
|
||
module = GuppyModule("test") | ||
|
||
@guppy.declare(module) | ||
def foo(f: "Callable[None]") -> None: ... | ||
|
||
|
||
module.compile() |
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 @@ | ||
Guppy compilation failed. Error in file $FILE:10 | ||
|
||
8: @guppy.declare(module) | ||
9: def foo(f: "Callable[int, float, bool]") -> None: ... | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
GuppyError: Function types should be specified via `Callable[[<arguments>], <return types>]` |
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,13 @@ | ||
from typing import Callable | ||
|
||
from guppylang.decorator import guppy | ||
from guppylang.module import GuppyModule | ||
|
||
|
||
module = GuppyModule("test") | ||
|
||
@guppy.declare(module) | ||
def foo(f: "Callable[int, float, bool]") -> None: ... | ||
|
||
|
||
module.compile() |
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 @@ | ||
Guppy compilation failed. Error in file $FILE:10 | ||
|
||
8: @guppy.declare(module) | ||
9: def foo(f: "Callable[None]") -> None: ... | ||
^^^^^^^^^^^^^^ | ||
GuppyError: Function types should be specified via `Callable[[<arguments>], <return types>]` |
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,13 @@ | ||
from typing import Callable | ||
|
||
from guppylang.decorator import guppy | ||
from guppylang.module import GuppyModule | ||
|
||
|
||
module = GuppyModule("test") | ||
|
||
@guppy.declare(module) | ||
def foo(f: "Callable[int, float, bool]") -> None: ... | ||
|
||
|
||
module.compile() |