Browse Source

Fix not detecting duplicate proc cases

Fixes #3864
Laytan Laats 1 year ago
parent
commit
f66b7021a6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/check_type.cpp

+ 1 - 1
src/check_type.cpp

@@ -740,7 +740,7 @@ gb_internal void check_union_type(CheckerContext *ctx, Type *union_type, Ast *no
 				gb_string_free(str);
 				gb_string_free(str);
 			} else {
 			} else {
 				for_array(j, variants) {
 				for_array(j, variants) {
-					if (are_types_identical(t, variants[j])) {
+					if (union_variant_index_types_equal(t, variants[j])) {
 						ok = false;
 						ok = false;
 						ERROR_BLOCK();
 						ERROR_BLOCK();
 						gbString str = type_to_string(t);
 						gbString str = type_to_string(t);