From bbf9757b4e70c7a11701656bc7755d7d76669dad Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 9 Aug 2015 23:21:44 +0200 Subject: refs #2377 --- compiler/rodread.nim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler') diff --git a/compiler/rodread.nim b/compiler/rodread.nim index 92ce00240..e4530c2cc 100644 --- a/compiler/rodread.nim +++ b/compiler/rodread.nim @@ -898,6 +898,8 @@ proc getBody*(s: PSym): PNode = ## it may perform an expensive reload operation. Otherwise it's a simple ## accessor. assert s.kind in routineKinds + # prevent crashes due to incorrect macro transformations (bug #2377) + if s.ast.isNil or bodyPos >= s.ast.len: return ast.emptyNode result = s.ast.sons[bodyPos] if result == nil: assert s.offset != 0 -- cgit 1.4.1-2-gfad0 f23946c3e7'>this commit This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log tree commit diff stats
path: root/tools/noprefix.nim
blob: fe03a9efc4d10721c09e7d6ab2ffd759868356f6 (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