mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-15 15:44:14 +00:00
added test tmultim4.nim
This commit is contained in:
@@ -41,6 +41,7 @@ tmatrix.nim;111
|
||||
tmultim1.nim;7
|
||||
tmultim2.nim;collide: unit, thing collide: unit, thing collide: thing, unit
|
||||
tmultim3.nim;Hi derived!
|
||||
tmultim4.nim;hello
|
||||
tnestif.nim;i == 2
|
||||
tnestprc.nim;10
|
||||
toop1.nim;34[]o 5
|
||||
|
||||
|
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
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ Additions
|
||||
- Pegs support new built-ins: ``\letter``, ``\upper``, ``\lower``,
|
||||
``\title``, ``\white``.
|
||||
- Pegs support the new built-in ``\skip`` operation.
|
||||
- Source code filters are now properly documented.
|
||||
|
||||
|
||||
2010-10-20 Version 0.8.10 released
|
||||
|
||||
Reference in New Issue
Block a user