|
@@ -41,4 +41,14 @@ class TestJs {
|
|
|
return try a[i] catch (e:Dynamic) null;
|
|
|
}
|
|
|
|
|
|
+ @:js("var a = { v : [{ b : 1}]};a;var tmp;switch(a.v.length) {case 1:switch(a.v[0].b) {case 1:tmp = true;break;default:tmp = false;}break;default:tmp = false;}if(tmp) {}")
|
|
|
+ @:analyzer(no_const_propagation)
|
|
|
+ static function testDeepMatchingWithoutClosures() {
|
|
|
+ var a = {v: [{b: 1}]};
|
|
|
+ a;
|
|
|
+ if (switch (a) {
|
|
|
+ case {v: [{b: 1}]}: true;
|
|
|
+ default: false;
|
|
|
+ }) {}
|
|
|
+ }
|
|
|
}
|