From 2a323389a8379f519197c37595ae0d1303474fbf Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 17 Aug 2005 13:08:21 +0000 Subject: [PATCH] Fixed SD2-410: Goto definition doesn't work for array types git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@377 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Parser/ExpressionFinder.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs index d31b5d9d06..202eeb73bf 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs @@ -228,6 +228,19 @@ namespace CSharpBinding.Parser int otherBracket = SearchBracketForward(inText, i + 1, c, (c == '(') ? ')' : ']'); if (otherBracket < 0) break; + if (c == '[') { + // do not include [] when it is an array declaration (versus indexer call) + bool ok = false; + for (int j = i + 1; j < otherBracket; j++) { + if (inText[j] != ',' && !char.IsWhiteSpace(inText, j)) { + ok = true; + break; + } + } + if (!ok) { + break; + } + } b.Append(inText, i, otherBracket - i + 1); break; } else if (c == '<') {