From 71e05acff20045bcb0e3f4a1089b0cbe7b2b0788 Mon Sep 17 00:00:00 2001 From: Mark Koch Date: Fri, 12 Jan 2024 12:57:00 +0000 Subject: [PATCH] Add test for unsupported type error --- tests/error/py_errors/unsupported.err | 7 +++++++ tests/error/py_errors/unsupported.py | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 tests/error/py_errors/unsupported.err create mode 100644 tests/error/py_errors/unsupported.py diff --git a/tests/error/py_errors/unsupported.err b/tests/error/py_errors/unsupported.err new file mode 100644 index 00000000..22343611 --- /dev/null +++ b/tests/error/py_errors/unsupported.err @@ -0,0 +1,7 @@ +Guppy compilation failed. Error in file $FILE:6 + +4: @guppy +5: def foo() -> int: +6: return py({1, 2, 3}) + ^^^^^^^^^^^^^ +GuppyError: Python expression of type `` is not supported by Guppy diff --git a/tests/error/py_errors/unsupported.py b/tests/error/py_errors/unsupported.py new file mode 100644 index 00000000..e238f300 --- /dev/null +++ b/tests/error/py_errors/unsupported.py @@ -0,0 +1,6 @@ +from guppy.decorator import guppy + + +@guppy +def foo() -> int: + return py({1, 2, 3})