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
|
|
@ -1163,7 +1163,7 @@ proc semAsgn(c: PContext, n: PNode): PNode =
|
|||
if lhsIsResult:
|
||||
n.typ = EnforceVoidContext
|
||||
if lhs.sym.typ.kind == tyGenericParam:
|
||||
if matchTypeClass(lhs.typ, rhs.typ):
|
||||
if cmpTypes(c, lhs.typ, rhs.typ) == isGeneric:
|
||||
InternalAssert c.p.resultSym != nil
|
||||
lhs.typ = rhs.typ
|
||||
c.p.resultSym.typ = rhs.typ
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue