diff options
Diffstat (limited to 'tests/exec/scope2.cpp')
-rw-r--r-- | tests/exec/scope2.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/exec/scope2.cpp b/tests/exec/scope2.cpp new file mode 100644 index 0000000..9b15638 --- /dev/null +++ b/tests/exec/scope2.cpp @@ -0,0 +1,14 @@ +#include <iostream> + +int main() { + int i = 42; + std::cout << i << "\n"; + if (1) { + int j = 1; + std::cout << j << "\n"; + } else { + int j = 2; + std::cout << j << "\n"; + } + std::cout << i << "\n"; +} |