aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/typestate-cfg-nesting.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/run-pass/typestate-cfg-nesting.rs b/src/test/run-pass/typestate-cfg-nesting.rs
new file mode 100644
index 00000000..8f050646
--- /dev/null
+++ b/src/test/run-pass/typestate-cfg-nesting.rs
@@ -0,0 +1,26 @@
+
+fn f() {
+
+ auto x = 10;
+ auto y = 11;
+ if (true) {
+ alt (x) {
+ case (_) {
+ y = x;
+ }
+ }
+ } else {
+ }
+}
+
+fn main() {
+
+ auto x = 10;
+ auto y = 11;
+ if (true) {
+ while (false) {
+ y = x;
+ }
+ } else {
+ }
+}