Browse Source

Added highlighting test for old semantic highlighting bug.

(This contains a semantic error)
pull/32/merge
Mike Krüger 13 years ago
parent
commit
0b44512d15
  1. 27
      ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs

27
ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs

@ -278,6 +278,33 @@ class Class { @@ -278,6 +278,33 @@ class Class {
TestColor (@"extern $alias FooBar;", externAliasKeywordColor);
}
/// <summary>
/// Bug 9539 - Semantic highlighting does not detect invalid type
/// </summary>
[Test]
public void TestBug9539()
{
string code =@"class C<T>
{
public class N<U>
{
}
}
class A
{
public static int Main ()
{
var a = typeof (C<>.$N<,>); // The type is not red even if this linedoes not compile
return 0;
}
}
";
TestColor (code, syntaxErrorColor);
}
}
}

Loading…
Cancel
Save