generic types can be used like type classes. distinct can be applied to type classes.
This commit is contained in:
parent
296ef07955
commit
bc2eb0ea9b
11 changed files with 147 additions and 79 deletions
|
|
@ -662,3 +662,8 @@ proc InternalError*(info: TLineInfo, errMsg: string) =
|
|||
proc InternalError*(errMsg: string) =
|
||||
writeContext(UnknownLineInfo())
|
||||
rawMessage(errInternal, errMsg)
|
||||
|
||||
template AssertNotNull*(e: expr): expr =
|
||||
if(e == nil): InternalError($InstantiationInfo())
|
||||
e
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue