This commit is contained in:
Andreas Rumpf 2019-05-15 08:17:29 +02:00 • committed by GitHub
commit 9ecb24e443
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 4 deletions

View file

@ -4,7 +4,8 @@ discard """
17
(width: 0.0, taste: "", color: 13)
(width: 0.0, taste: "", color: 15)
cool'''
cool
test'''
"""
# bug #5241
@ -62,4 +63,26 @@ method m[T](o: Foo[T]) = echo "cool"
var v: Bar
v.new()
v.m() # Abstract method not called anymore
v.m() # Abstract method not called anymore
# bug #88
type
TGen[T] = object of RootObj
field: T
TDerived[T] = object of TGen[T]
nextField: T
proc doSomething[T](x: ref TGen[T]) =
type
Ty = ref TDerived[T]
echo Ty(x).nextField
var
x: ref TDerived[string]
new(x)
x.nextField = "test"
doSomething(x)