implements #766;

expressions such as Type.field are now recognised by the compiler.
This also fixes a bug, preventing the user-defined to check for the presence of
regular fields in addition to procs
This commit is contained in:
Zahary Karadjov 2014-01-24 17:02:27 +02:00
commit 3f71b7f1f6
11 changed files with 116 additions and 68 deletions

View file

@ -802,7 +802,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): PNode =
let t1 = regs[rb].typ.skipTypes({tyTypeDesc})
let t2 = c.types[regs[rc].intVal.int]
# XXX: This should use the standard isOpImpl
let match = if t2.kind == tyTypeClass: true
let match = if t2.kind == tyUserTypeClass: true
else: sameType(t1, t2)
regs[ra].intVal = ord(match)
of opcSetLenSeq: