Browse Source

Fix recursive loop bug for is_type_polymorphic

gingerBill 6 years ago
parent
commit
2301ae157c
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/types.cpp

+ 5 - 5
src/types.cpp

@@ -1199,11 +1199,11 @@ bool is_type_polymorphic(Type *t, bool or_specialized=false) {
 		if (or_specialized && t->Union.is_poly_specialized) {
 		if (or_specialized && t->Union.is_poly_specialized) {
 			return true;
 			return true;
 		}
 		}
-		for_array(i, t->Union.variants) {
-		    if (is_type_polymorphic(t->Union.variants[i], or_specialized)) {
-		    	return true;
-		    }
-		}
+		// for_array(i, t->Union.variants) {
+		//     if (is_type_polymorphic(t->Union.variants[i], or_specialized)) {
+		//     	return true;
+		//     }
+		// }
 		break;
 		break;
 	case Type_Struct:
 	case Type_Struct:
 		if (t->Struct.is_polymorphic) {
 		if (t->Struct.is_polymorphic) {