2010-05-25 Jb Evain <jbevain@novell.com>
[mcs.git] / errors / cs0246-15.cs
blobe8738932087d70f4494c1141df5cc6225f4ee898
1 // cs0246-15.cs: The type or namespace name `InvalidTypeBlah' could not be found. Are you missing a using directive or an assembly reference?
2 // Line: 17
4 //
5 // This test is here to test that the compiler does not crash after it
6 // reports the error due to an invalid type being referenced in the
7 // delegate
8 //
9 using System;
11 public class AnonDelegateTest
13 public delegate void TestDelegate(AnonDelegateTest something, string b);
15 public static void Main()
17 AnonDelegateTest test = new AnonDelegateTest();
19 // Incorrect; mcs throws unhandled exception here
20 test.Call(delegate(InvalidTypeBlah something, string b) {
21 Console.WriteLine(b);
22 });
25 public void Call(TestDelegate d)
27 d(this, "Hello");