invert if

This commit is contained in:
Edwin Cheng 2020-05-05 23:01:07 +08:00
parent cf821cc332
commit 07de8ea165

View file

@ -159,10 +159,10 @@ impl PerNs {
AdtId::UnionId(_) => PerNs::types(def, v), AdtId::UnionId(_) => PerNs::types(def, v),
AdtId::EnumId(_) => PerNs::types(def, v), AdtId::EnumId(_) => PerNs::types(def, v),
AdtId::StructId(_) => { AdtId::StructId(_) => {
if !has_constructor { if has_constructor {
PerNs::types(def, v)
} else {
PerNs::both(def, def, v) PerNs::both(def, def, v)
} else {
PerNs::types(def, v)
} }
} }
}, },