preparation for new 'is' operator; breaks bootstrapping again, sorry (use generated C code)

This commit is contained in:
Araq 2011-07-31 00:21:32 +02:00
commit 6a8a409f1b
19 changed files with 86 additions and 203 deletions

View file

@ -4,7 +4,7 @@ type
TEventArgs = object of TObject
type
TEventEmitter = object of TObject
events*: TTable[string, TDoublyLinkedList[proc(e : TEventArgs)]]
events*: TTable[string, TDoublyLinkedList[proc(e: TEventArgs)]]
proc on*(emitter: var TEventEmitter, event: string, func: proc(e: TEventArgs)) =
if not hasKey(emitter.events, event):
var list: TDoublyLinkedList[proc(e: TEventArgs)]

View file

@ -1,5 +1,5 @@
discard """
file: "tisopr.nim"
file: "tofopr.nim"
output: "falsetrue"
"""
# Test is operator
@ -12,7 +12,7 @@ type
TOtherType = object of TMyType
proc p(x: TMyType): bool =
return x is TOtherType
return x of TOtherType
var
m: TMyType