You've already forked linux-packaging-mono
Imported Upstream version 5.12.0.220
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
parent
8bd104cef2
commit
8fc30896db
34
mcs/tests/gtest-647.cs
Normal file
34
mcs/tests/gtest-647.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static int Main ()
|
||||
{
|
||||
int B = default (MyStruct?);
|
||||
if (MyStruct.counter != 1)
|
||||
return 1;
|
||||
|
||||
switch (default (MyStruct?)) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (MyStruct.counter != 2)
|
||||
return 4;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public struct MyStruct
|
||||
{
|
||||
public static int counter;
|
||||
|
||||
public static implicit operator int (MyStruct? s)
|
||||
{
|
||||
++counter;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user