a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
25 lines
324 B
C#
25 lines
324 B
C#
//Compiler options: -warnaserror -warn:4
|
|
|
|
using System;
|
|
interface IFoo
|
|
{
|
|
}
|
|
|
|
class Bar
|
|
{
|
|
}
|
|
|
|
class Program
|
|
{
|
|
public static void Main()
|
|
{
|
|
IFoo foo = null;
|
|
if (foo is IFoo)
|
|
Console.WriteLine("got an IFoo"); // never prints
|
|
|
|
Bar bar = null;
|
|
if (bar is Bar)
|
|
Console.WriteLine("got a bar"); // never prints
|
|
}
|
|
}
|