diff options
author | Araq <rumpf_a@web.de> | 2017-11-22 23:39:50 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-11-22 23:39:50 +0100 |
commit | a6226d9452194cc3b8d35a0d38d9f8c89ddf04f5 (patch) | |
tree | b980762d23b0680dcb3cdffb099b89858c8fe82c /tests | |
parent | 2f17be9c22d7bd4c31433d6a81ac38982e0e6c1b (diff) | |
download | Nim-a6226d9452194cc3b8d35a0d38d9f8c89ddf04f5.tar.gz |
fixes #6682
Diffstat (limited to 'tests')
-rw-r--r-- | tests/notnil/tmust_compile.nim | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/notnil/tmust_compile.nim b/tests/notnil/tmust_compile.nim new file mode 100644 index 000000000..c81c3b16b --- /dev/null +++ b/tests/notnil/tmust_compile.nim @@ -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" \ No newline at end of file |