diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs
index c6d29c3930..6fd49deade 100644
--- a/ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs
+++ b/ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs
@@ -278,6 +278,33 @@ class Class {
TestColor (@"extern $alias FooBar;", externAliasKeywordColor);
}
+ ///
+ /// Bug 9539 - Semantic highlighting does not detect invalid type
+ ///
+ [Test]
+ public void TestBug9539()
+ {
+ string code =@"class C
+ {
+ public class N
+ {
+ }
+ }
+
+ 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);
+ }
+
+
+
}
}