diff options
| author | Damien George | 2014-05-31 17:59:11 +0100 |
|---|---|---|
| committer | Damien George | 2014-05-31 17:59:11 +0100 |
| commit | 5b5562c1d13fa0b78fd13731cebdaa911eb47726 (patch) | |
| tree | 3b5b698e0c48b49cd1e896fc8dee262b952f9296 /tests/basics | |
| parent | 049a01d148c757a17e9804a2b1e42c918e29b094 (diff) | |
py: Fix stack underflow with optimised for loop.
Diffstat (limited to 'tests/basics')
| -rw-r--r-- | tests/basics/for_return.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/basics/for_return.py b/tests/basics/for_return.py new file mode 100644 index 000000000..0441352ad --- /dev/null +++ b/tests/basics/for_return.py @@ -0,0 +1,7 @@ +# test returning from within a for loop + +def f(): + for i in [1, 2, 3]: + return i + +print(f()) |
