summary refs log tree commit diff stats
path: root/tests/deprecated/tdeprecated.nim
blob: ba8d579adfa06ec78a31e2bfe01eb29d661cca2c (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: '''
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]

  a[8] = 1

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

block: # issue #8063
  type
    Foo = enum
      fooX

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