made built-in types primary expressions to allow infix operators to be used with them
This commit is contained in:
parent
8319e2411d
commit
c1d16c5a4d
3 changed files with 52 additions and 54 deletions
|
|
@ -18,7 +18,8 @@ proc checkPartialConstructedType(info: TLineInfo, t: PType) =
|
|||
LocalError(info, errVarVarTypeNotAllowed)
|
||||
|
||||
proc checkConstructedType*(info: TLineInfo, t: PType) =
|
||||
if tfAcyclic in t.flags and skipTypes(t, abstractInst).kind != tyObject:
|
||||
if t.kind in {tyTypeClass}: nil
|
||||
elif tfAcyclic in t.flags and skipTypes(t, abstractInst).kind != tyObject:
|
||||
LocalError(info, errInvalidPragmaX, "acyclic")
|
||||
elif t.kind == tyVar and t.sons[0].kind == tyVar:
|
||||
LocalError(info, errVarVarTypeNotAllowed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue