I have no idea why these were considered to be compile-time-finite because that seems dead wrong. There's a good chance that this breaks everyone's code, but that's a necessity. closes #8277
@@ -1319,9 +1319,9 @@ module TexprConverter = struct
PMap.iter (fun _ ef -> add (ConEnum(en,ef),null_pos)) en.e_constrs;
SKEnum,RunTimeFinite
| TAnon _ ->
- SKValue,CompileTimeFinite
+ SKValue,Infinite
| TInst(_,_) ->
| _ ->
SKValue,Infinite
in
@@ -0,0 +1,22 @@
+class Main {
+ static final Up = new Point(0, -1);
+ static final Down = new Point(0, 1);
+
+ static function main() {}
+ function opposite(direction:Point):Point {
+ return switch (direction) {
+ case Up: Down;
+ }
+}
+class Point {
+ public final x:Int;
+ public final y:Int;
+ public function new(x, y) {
+ this.x = x;
+ this.y = y;
@@ -0,0 +1,17 @@
+typedef C = { foo: Int }
+enum E {
+ A(v:C);
+ static final ident:C = null;
+ static function f(e:E):Int {
+ return switch e {
+ case A(ident): 0;
@@ -0,0 +1 @@
+-main Main1
+Main1.hx:8: characters 18-27 : Unmatched patterns: _
+-main Main2
+Main2.hx:12: characters 11-16 : Unmatched patterns: A(_)