summary refs log tree commit diff stats
path: root/compiler/guards.nim
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2018-10-18 19:21:25 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-10-18 20:21:25 +0200
commiteaca5be9d6e205e8aa7055306122a6c053ef35a6 (patch)
tree784c5f2726a94b656e3f85ab231c4dfc377cc167 /compiler/guards.nim
parent15dbd973dec848f1c429fe7043e53254a501812b (diff)
downloadNim-eaca5be9d6e205e8aa7055306122a6c053ef35a6.tar.gz
Change the order of compilation passes, transformation is made lazy at code gen (#8489)
* Ast no transformation
* Add getImplNoTransform to the macros module
* progress on delaying transf
* Fix methods tranformation
* Fix lazy lambdalifting
* fix create thread wrapper
* transform for lambda lifting
* improve getImplTransformed
* Fix destructor tests
* try to fix nimprof for linux
Diffstat (limited to 'compiler/guards.nim')
-rw-r--r--compiler/guards.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/guards.nim b/compiler/guards.nim
index 99bb51fce..a01c023e4 100644
--- a/compiler/guards.nim
+++ b/compiler/guards.nim
@@ -70,7 +70,7 @@ proc isLetLocation(m: PNode, isApprox: bool): bool =
       n = n.sons[0]
       inc derefs
     of nkBracketExpr:
-      if isConstExpr(n.sons[1]) or isLet(n.sons[1]):
+      if isConstExpr(n.sons[1]) or isLet(n.sons[1]) or isConstExpr(n.sons[1].skipConv):
         n = n.sons[0]
       else: return
     of nkHiddenStdConv, nkHiddenSubConv, nkConv: