wip type class reforms (the compiler bootstraps fine)
* replace tfAny and tfAll with tyAnd and tyOr * integrate matchTypeClass into typeRel * introduce tyBuiltInTypeClass to handle types such as tuple, object, proc, etc
This commit is contained in:
parent
299cefdc98
commit
1d02f2ea53
8 changed files with 94 additions and 99 deletions
|
|
@ -19,7 +19,7 @@ proc checkPartialConstructedType(info: TLineInfo, t: PType) =
|
|||
|
||||
proc checkConstructedType*(info: TLineInfo, typ: PType) =
|
||||
var t = typ.skipTypes({tyDistinct})
|
||||
if t.kind in {tyTypeClass}: nil
|
||||
if t.kind in tyTypeClasses: 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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue