Sema: bad union field access safety

This commit is contained in:
Veikka Tuominen committed 2022-07-23 15:40:11 +03:00
1 parent 55fe34100f
commit ff7ec4efb5
15 files changed
+194 -90

No files matched your search

+1 -1
View File
@@ -787,7 +787,7 @@ pub const Decl = struct {
const opaque_obj = ty.cast(Type.Payload.Opaque).?.data;
return &opaque_obj.namespace;
},
.@"union", .union_tagged => {
.@"union", .union_safety_tagged, .union_tagged => {
const union_obj = ty.cast(Type.Payload.Union).?.data;
return &union_obj.namespace;
},