summary refs log tree commit diff stats
path: root/compiler/guards.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/guards.nim')
-rw-r--r--compiler/guards.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/guards.nim b/compiler/guards.nim
index 33bf3d99c..15c6a64e3 100644
--- a/compiler/guards.nim
+++ b/compiler/guards.nim
@@ -68,9 +68,12 @@ proc isLetLocation(m: PNode, isApprox: bool): bool =
     case n.kind
     of nkDotExpr, nkCheckedFieldExpr, nkObjUpConv, nkObjDownConv:
       n = n[0]
-    of nkDerefExpr, nkHiddenDeref:
+    of nkDerefExpr:
       n = n[0]
       inc derefs
+    of nkHiddenDeref:
+      n = n[0]
+      if not isApprox: inc derefs
     of nkBracketExpr:
       if isConstExpr(n[1]) or isLet(n[1]) or isConstExpr(n[1].skipConv):
         n = n[0]
2322a821ac5e0'>4cd558bda ^
eb3958f1b ^
b01945a06 ^
eb3958f1b ^

4cd558bda ^
571dbc8ef ^



a23d418d7 ^




f081ac0e5 ^



7c08d14cf ^
f081ac0e5 ^



32b4192b3 ^
f081ac0e5 ^



5b96eaa95 ^
f081ac0e5 ^



7bf98411b ^
f081ac0e5 ^


9ea55bf88 ^
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