Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit e3899d1

Browse files
committed
Fix ArgumentOutOfRangeException in DefaultCompletionContextProvider
1 parent 53860bf commit e3899d1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/Completion/ICompletionContextProvider.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ IUnresolvedTypeDefinition FindInnerType (IUnresolvedTypeDefinition parent, TextL
124124

125125
bool IsInsideType (IUnresolvedEntity currentType, TextLocation location)
126126
{
127+
if (currentType.Region.IsEmpty)
128+
return false;
127129
int startOffset = document.GetOffset (currentType.Region.Begin);
128130
int endOffset = document.GetOffset (location);
129131
//bool foundEndBracket = false;

0 commit comments

Comments
 (0)