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,15 @@
discard """
file: "tparameterizedparent0.nim"
line: 14
errormsg: "inheritance only works with non-final objects"
"""
# bug #5264
type
Kapal* = enum
Besar
Apple[T] = object of T
color: int
var x = Apple[Kapal](color: 13)
echo x