fixes #10791
This commit is contained in:
parent
32c9ca605e
commit
3c0f01faa0
1 changed files with 3 additions and 0 deletions
|
|
@ -1189,6 +1189,9 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) =
|
||||||
incl a[2].flags, nfSem # bug #10548
|
incl a[2].flags, nfSem # bug #10548
|
||||||
if sfExportc in s.flags and s.typ.kind == tyAlias:
|
if sfExportc in s.flags and s.typ.kind == tyAlias:
|
||||||
localError(c.config, name.info, "{.exportc.} not allowed for type aliases")
|
localError(c.config, name.info, "{.exportc.} not allowed for type aliases")
|
||||||
|
if tfBorrowDot in s.typ.flags and s.typ.kind != tyDistinct:
|
||||||
|
excl s.typ.flags, tfBorrowDot
|
||||||
|
localError(c.config, name.info, "only a 'distinct' type can borrow `.`")
|
||||||
let aa = a.sons[2]
|
let aa = a.sons[2]
|
||||||
if aa.kind in {nkRefTy, nkPtrTy} and aa.len == 1 and
|
if aa.kind in {nkRefTy, nkPtrTy} and aa.len == 1 and
|
||||||
aa.sons[0].kind == nkObjectTy:
|
aa.sons[0].kind == nkObjectTy:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue