This commit is contained in:
Araq 2017-11-22 23:39:50 +01:00
commit a6226d9452
4 changed files with 35 additions and 2 deletions

View file

@ -0,0 +1,26 @@
discard """
output: '''success'''
"""
# bug #6682
type
Fields = enum
A=1, B, C
Obj = object
fld: array[Fields, int]
AsGeneric[T] = array[Fields, T]
Obj2[T] = object
fld: AsGeneric[T]
var a: Obj # this works
var arr: array[Fields, int]
var b = Obj() # this doesn't (also doesn't works with additional fields)
var z = Obj2[int]()
echo "success"