summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-07-09 15:57:35 +0800
committerGitHub <noreply@github.com>2020-07-09 09:57:35 +0200
commit40b58a0a1864e0cc06ecd0ceb8aadf9e933eeb30 (patch)
tree2b02564a67c7f2b499daa81f6cc04a881a9751d4 /compiler
parent399b2e3134751432f66a2414fbaf9c2a168fa953 (diff)
downloadNim-40b58a0a1864e0cc06ecd0ceb8aadf9e933eeb30.tar.gz
fix #11009 (#14935)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semdata.nim1
-rw-r--r--compiler/suggest.nim7
2 files changed, 7 insertions, 1 deletions
diff --git a/compiler/semdata.nim b/compiler/semdata.nim
index 5a2c08de2..8680fcac3 100644
--- a/compiler/semdata.nim
+++ b/compiler/semdata.nim
@@ -143,6 +143,7 @@ type
       # would otherwise fail.
     unusedImports*: seq[(PSym, TLineInfo)]
     exportIndirections*: HashSet[(int, int)]
+    lastTLineInfo*: TLineInfo
 
 template config*(c: PContext): ConfigRef = c.graph.config
 
diff --git a/compiler/suggest.nim b/compiler/suggest.nim
index a9f248fb9..6e9844759 100644
--- a/compiler/suggest.nim
+++ b/compiler/suggest.nim
@@ -557,7 +557,12 @@ proc markUsed(c: PContext; info: TLineInfo; s: PSym) =
     if sfDeprecated in s.owner.flags:
       warnAboutDeprecated(conf, info, s)
   if {sfDeprecated, sfError} * s.flags != {}:
-    if sfDeprecated in s.flags: warnAboutDeprecated(conf, info, s)
+    if sfDeprecated in s.flags:
+      if not (c.lastTLineInfo.line == info.line and 
+              c.lastTLineInfo.col == info.col):
+        warnAboutDeprecated(conf, info, s)
+        c.lastTLineInfo = info
+
     if sfError in s.flags: userError(conf, info, s)
   when defined(nimsuggest):
     suggestSym(conf, info, s, c.graph.usageSym, false)
04-21 03:19:43 +0200 committer Araq <rumpf_a@web.de> 2012-04-21 03:19:43 +0200 GC with realtime support' href='/ahoang/Nim/commit/doc/gc.txt?h=devel&id=4aba7421f57d0f653ef928f012982957404416f9'>4aba7421f ^
f73cec7f0 ^
4aba7421f ^
8aecacc1d ^



4aba7421f ^

8bed8efc3 ^
7e7c514df ^

1c0c80ef2 ^






7e7c514df ^
8aecacc1d ^
4aba7421f ^




7e7c514df ^
0b44d812f ^
e27ab3673 ^
4aba7421f ^
3ea644690 ^
8aecacc1d ^
0dc35b784 ^
4aba7421f ^
8aecacc1d ^
7e7c514df ^
0b44d812f ^
4aba7421f ^
7e7c514df ^


8aecacc1d ^
0b44d812f ^
8aecacc1d ^
7e7c514df ^




0b44d812f ^

0dc35b784 ^






7e7c514df ^



8aecacc1d ^

4aba7421f ^




0b44d812f ^
4aba7421f ^





d63e8e5d1 ^
0b44d812f ^
4aba7421f ^


afd8ca2f1 ^
4aba7421f ^



7e7c514df ^

0b44d812f ^
7e7c514df ^



4aba7421f ^
7956737ef ^



3ea644690 ^
7956737ef ^











915cc86f5 ^
















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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146