better integration of tyStatic into typeRel
This commit is contained in:
parent
1d02f2ea53
commit
edab4aaad0
9 changed files with 66 additions and 58 deletions
|
|
@ -75,6 +75,7 @@ type
|
|||
semExpr*: proc (c: PContext, n: PNode, flags: TExprFlags = {}): PNode {.nimcall.}
|
||||
semTryExpr*: proc (c: PContext, n: PNode,flags: TExprFlags = {},
|
||||
bufferErrors = false): PNode {.nimcall.}
|
||||
semTryConstExpr*: proc (c: PContext, n: PNode): PNode {.nimcall.}
|
||||
semOperand*: proc (c: PContext, n: PNode, flags: TExprFlags = {}): PNode {.nimcall.}
|
||||
semConstBoolExpr*: proc (c: PContext, n: PNode): PNode {.nimcall.} # XXX bite the bullet
|
||||
semOverloadedCall*: proc (c: PContext, n, nOrig: PNode,
|
||||
|
|
@ -217,11 +218,15 @@ proc makeAndType*(c: PContext, t1, t2: PType): PType =
|
|||
result = newTypeS(tyAnd, c)
|
||||
result.sons = @[t1, t2]
|
||||
result.flags.incl tfHasMeta
|
||||
if tfHasStatic in t1.flags or tfHasStatic in t2.flags:
|
||||
result.flags.incl tfHasStatic
|
||||
|
||||
proc makeOrType*(c: PContext, t1, t2: PType): PType =
|
||||
result = newTypeS(tyOr, c)
|
||||
result.sons = @[t1, t2]
|
||||
result.flags.incl tfHasMeta
|
||||
if tfHasStatic in t1.flags or tfHasStatic in t2.flags:
|
||||
result.flags.incl tfHasStatic
|
||||
|
||||
proc makeNotType*(c: PContext, t1: PType): PType =
|
||||
result = newTypeS(tyNot, c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue