From 63e4c2cf47537b5ba20089a288f4b53ae03ea028 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Wed, 14 Jan 2015 15:43:02 -0800 Subject: [PATCH] Fix range violation with index expressions --- makefile | 3 ++- src/autocomplete.d | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index f0d8a49..f1ee138 100644 --- a/makefile +++ b/makefile @@ -100,7 +100,8 @@ DEBUG_SERVER_FLAGS := -Icontainers/src\ -Ilibdparse/src\ -wi\ -g\ - -ofbin/dcd-server + -ofbin/dcd-server\ + -J. GDC_SERVER_FLAGS := -Icontainers/src\ -Imsgpack-d/src\ diff --git a/src/autocomplete.d b/src/autocomplete.d index 74ef550..68d008a 100644 --- a/src/autocomplete.d +++ b/src/autocomplete.d @@ -727,11 +727,13 @@ ACSymbol*[] getSymbolsByTokenChain(T)(Scope* completionScope, if (!p.isSliceExpression()) { symbols = symbols[0].type is null ? [] : [symbols[0].type]; + if (symbols.length == 0) + break loop; } } else if (symbols[0].qualifier == SymbolQualifier.assocArray) { - symbols = symbols[0].type is null ? [] :[symbols[0].type]; + symbols = symbols[0].type is null ? [] : [symbols[0].type]; skip(); } else