fixes #5264 (#5520); inheriting from generic object

This commit is contained in:
andri lim 2017-03-15 03:40:09 +07:00 • committed by Andreas Rumpf
commit 0ff1190fe7
6 changed files with 184 additions and 2 deletions

View file

@ -0,0 +1,14 @@
discard """
file: "tparameterizedparent1.nim"
line: 14
errormsg: "inheritance only works with non-final objects"
"""
# bug #5264
type
FruitBase = object
color: int
Apple[T] = object of T
width: int
var x: Apple[FruitBase]