Browse Source

[macro] Printer: do not break for TDAbstract without flags

Rudy Ges 2 years ago
parent
commit
d6d0cdc5b3
1 changed files with 7 additions and 5 deletions
  1. 7 5
      std/haxe/macro/Printer.hx

+ 7 - 5
std/haxe/macro/Printer.hx

@@ -387,11 +387,13 @@ class Printer {
 					var to = to == null ? [] : to.copy();
 					var isEnum = false;
 
-					for (flag in tflags) {
-						switch (flag) {
-							case AbEnum: isEnum = true;
-							case AbFrom(ct): from.push(ct);
-							case AbTo(ct): to.push(ct);
+					if (tflags != null) {
+						for (flag in tflags) {
+							switch (flag) {
+								case AbEnum: isEnum = true;
+								case AbFrom(ct): from.push(ct);
+								case AbTo(ct): to.push(ct);
+							}
 						}
 					}