summary refs log tree commit diff stats
path: root/tests/msgs/tdeprecated2.nim
blob: 71d20081e54da7f6762662761c969031b6679ed9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
discard """
  nimout: '''
tdeprecated2.nim(23, 3) Warning: a is deprecated [Deprecated]
tdeprecated2.nim(30, 11) Warning: asdf; enum 'Foo' which contains field 'a' is deprecated [Deprecated]
tdeprecated2.nim(40, 16) Warning: use fooX instead; fooA is deprecated [Deprecated]
end
'''
"""






## line 15



block:
  var
    a {.deprecated.}: array[0..11, int]

  a[8] = 1

block t10111:
  type
    Foo {.deprecated: "asdf" .} = enum
      a 
  
  var _ = a
  

block: # issue #8063
  type
    Foo = enum
      fooX

  const fooA {.deprecated: "use fooX instead".} = fooX
  let
    foo: Foo = fooA
  echo foo
  static: echo "end"