Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

27 lines
423 B
C#

// It's actually C# specification and csc bug
// https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=310363
class C1
{
static void Foo (string val)
{
const object obj = null;
switch (val) {
case (string) obj:
return;
}
}
}
class C2
{
const object o2 = c2;
const string c2 = null;
public static void Main ()
{
const object o = null;
const string s = (string) o;
}
}