Fix issue with type_info not being completely poisoned when encountering an error. Fixes #905

This commit is contained in:
Christoffer Lerno
2023-08-01 12:26:49 +02:00
parent 701d6a0746
commit 09bb7d3525
3 changed files with 14 additions and 1 deletions

View File

@@ -2598,6 +2598,7 @@ INLINE bool type_info_poison(TypeInfo *type)
type->resolve_status = RESOLVE_NOT_DONE;
return false;
}
type->kind = TYPE_INFO_POISON;
type->type = poisoned_type;
type->resolve_status = RESOLVE_DONE;
return false;

View File

@@ -1 +1 @@
#define COMPILER_VERSION "0.4.593"
#define COMPILER_VERSION "0.4.594"

View File

@@ -0,0 +1,12 @@
module testing;
struct Foo
{
Entry[1 << N] data; // #error: 'N' could not be found
}
struct Entry
{
String key;
String value;
}