diff --git a/src/Integration.Tests/FalseReturns.cs b/src/Integration.Tests/FalseReturns.cs index d20744d1..e2de97d7 100644 --- a/src/Integration.Tests/FalseReturns.cs +++ b/src/Integration.Tests/FalseReturns.cs @@ -95,4 +95,12 @@ public void Test_FalseReturn_Types_StrNotInt() Assert.Throws(() => falseReturns.TestIntReturnsStr()); } + + [Fact] + public void Test_IntOverflowsSafely() + { + var falseReturns = Env.TestFalseReturns(); + + Assert.Throws(() => falseReturns.TestIntOverflows()); + } } diff --git a/src/Integration.Tests/python/test_false_returns.py b/src/Integration.Tests/python/test_false_returns.py index 4bcc9469..12ddaa2d 100644 --- a/src/Integration.Tests/python/test_false_returns.py +++ b/src/Integration.Tests/python/test_false_returns.py @@ -30,3 +30,6 @@ def test_int_returns_float() -> int: def test_int_returns_str() -> int: return "1" + +def test_int_overflows() -> int: + return 2**64