From 0b44512d1580026f02ddc88ba213f2f8d46362bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 24 Feb 2013 08:50:52 +0100 Subject: [PATCH] Added highlighting test for old semantic highlighting bug. (This contains a semantic error) --- .../Analysis/SemanticHighlightingTests.cs | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) 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); + } + + + } }