added test tmultim4.nim
This commit is contained in:
parent
b2e9977592
commit
1e25aa365b
3 changed files with 41 additions and 0 deletions
39
tests/accept/run/tmultim4.nim
Normal file
39
tests/accept/run/tmultim4.nim
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
type
|
||||
Test = object of TObject
|
||||
|
||||
method doMethod(a: ref TObject) =
|
||||
quit "override"
|
||||
|
||||
method doMethod(a: ref Test) =
|
||||
echo "hello"
|
||||
|
||||
proc doProc(a: ref Test) =
|
||||
echo "hello"
|
||||
|
||||
proc newTest(): ref Test =
|
||||
new(result)
|
||||
|
||||
var s:ref Test = newTest()
|
||||
|
||||
|
||||
#doesn't work
|
||||
for z in 1..4:
|
||||
s.doMethod()
|
||||
break
|
||||
|
||||
#works
|
||||
#for z in 1..4:
|
||||
# s.doProc()
|
||||
# break
|
||||
|
||||
#works
|
||||
#while true:
|
||||
# s.doMethod()
|
||||
# break
|
||||
|
||||
#works
|
||||
#while true:
|
||||
# s.doProc()
|
||||
# break
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue