fixes #1919
This commit is contained in:
parent
d37ff0ab42
commit
fd10866ae3
2 changed files with 26 additions and 6 deletions
19
tests/generics/tgeneric_inheritance.nim
Normal file
19
tests/generics/tgeneric_inheritance.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
discard """
|
||||
output: '0.0'
|
||||
"""
|
||||
|
||||
# bug #1919
|
||||
|
||||
type
|
||||
Base[M] = object of RootObj
|
||||
a : M
|
||||
|
||||
Sub1[M] = object of Base[M]
|
||||
b : int
|
||||
|
||||
Sub2[M] = object of Sub1[M]
|
||||
c : int
|
||||
|
||||
var x: Sub2[float]
|
||||
|
||||
echo x.a
|
||||
Loading…
Add table
Add a link
Reference in a new issue