Skip to content

Commit

Permalink
fix nim-lang#8063 by adding a testcase for: Deprecation warnings for …
Browse files Browse the repository at this point in the history
…enum values print twice (nim-lang#10508)
  • Loading branch information
timotheecour authored and Araq committed Jan 31, 2019
1 parent fa05877 commit ec6e568
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions tests/deprecated/tdeprecated.nim
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
discard """
nimout: '''tdeprecated.nim(10, 3) Warning: a is deprecated [Deprecated]
tdeprecated.nim(17, 11) Warning: asdf; enum 'Foo' which contains field 'a' is deprecated [Deprecated]
nimout: '''
tdeprecated.nim(23, 3) Warning: a is deprecated [Deprecated]
tdeprecated.nim(30, 11) Warning: asdf; enum 'Foo' which contains field 'a' is deprecated [Deprecated]
tdeprecated.nim(40, 16) Warning: use fooX instead; fooA is deprecated [Deprecated]
end
'''
"""






## line 15



block:
var
a {.deprecated.}: array[0..11, int]
Expand All @@ -17,3 +30,13 @@ block t10111:
var _ = a


block: # issue #8063
type
Foo = enum
fooX

{.deprecated: [fooA: fooX].}
let
foo: Foo = fooA
echo foo
static: echo "end"

0 comments on commit ec6e568

Please sign in to comment.