Skip to content

Commit

Permalink
New test.
Browse files Browse the repository at this point in the history
svn path=/trunk/mcs/; revision=144263
  • Loading branch information
marek-safar committed Oct 16, 2009
1 parent 9a4191a commit 4895737
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions mcs/errors/gcs0266-5.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// CS0266: Cannot implicitly convert type `S?' to `A'. An explicit conversion exists (are you missing a cast?)
// Line: 9

struct S
{
public static int Main ()
{
S? s = null;
A a = s;
return 0;
}
}

struct A
{
public static implicit operator A (S x)
{
return new A ();
}
}

0 comments on commit 4895737

Please sign in to comment.