proper bugfix

This commit is contained in:
Araq 2019-09-08 13:08:11 +02:00
commit 18135cc194

View file

@ -863,6 +863,7 @@ proc semAnyRef(c: PContext; n: PNode; kind: TTypeKind; prev: PType): PType =
elif region.skipTypes({tyGenericInst, tyAlias, tySink}).kind notin { elif region.skipTypes({tyGenericInst, tyAlias, tySink}).kind notin {
tyError, tyObject}: tyError, tyObject}:
message c.config, n[i].info, errGenerated, "region needs to be an object type" message c.config, n[i].info, errGenerated, "region needs to be an object type"
addSonSkipIntLit(result, region)
else: else:
message(c.config, n.info, warnDeprecated, "region for pointer types is deprecated") message(c.config, n.info, warnDeprecated, "region for pointer types is deprecated")
addSonSkipIntLit(result, region) addSonSkipIntLit(result, region)