Void* should never deref and should allow methods to be attached to it.

This commit is contained in:
Christoffer Lerno
2023-10-27 00:10:59 +02:00
parent a0bc03a9f5
commit e17bb5f321
7 changed files with 11 additions and 13 deletions

View File

@@ -1879,9 +1879,10 @@ bool type_may_have_method(Type *type)
return true;
case TYPE_TYPEDEF:
UNREACHABLE
case TYPE_POINTER:
return type == type_voidptr;
case TYPE_POISONED:
case TYPE_VOID:
case TYPE_POINTER:
case TYPE_FUNC:
case TYPE_UNTYPED_LIST:
case TYPE_OPTIONAL: