diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/enum/t21863.nim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/enum/t21863.nim b/tests/enum/t21863.nim new file mode 100644 index 000000000..d0d8b1fcd --- /dev/null +++ b/tests/enum/t21863.nim @@ -0,0 +1,28 @@ +discard """ +cmd: "nim check --hints:off $file" +action: reject +nimout: ''' +t21863.nim(28, 16) Error: undeclared field: 'A' + found 'A' [enumField declared in t21863.nim(24, 18)] + found 'A' [enumField declared in t21863.nim(25, 18)] +t21863.nim(28, 16) Error: undeclared field: '.' +t21863.nim(28, 16) Error: undeclared field: '.' +t21863.nim(28, 16) Error: expression '' has no type (or is ambiguous) +''' +""" + + + + + + + + + +block: + type + EnumA = enum A, B + EnumB = enum A + EnumC = enum C + + discard EnumC.A |