Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2014-07-02 17:32:20 +0400
committerMarek Safar <marek.safar@gmail.com>2014-07-02 17:33:04 +0400
commitf2c645206bc14cd75712654c177ad5ab165044e7 (patch)
treea78ed1060b0a845849873817911ea4fea1746607 /mcs/tests/gtest-409.cs
parentbde70c695468c5a83fb49c3b61e4be2266aa96c7 (diff)
[mcs] Add new test
Diffstat (limited to 'mcs/tests/gtest-409.cs')
-rw-r--r--mcs/tests/gtest-409.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/mcs/tests/gtest-409.cs b/mcs/tests/gtest-409.cs
index 96aff7aa339..1d2a5ad00fa 100644
--- a/mcs/tests/gtest-409.cs
+++ b/mcs/tests/gtest-409.cs
@@ -1,7 +1,7 @@
using System;
//
-// Parser conditional and cast expression tests
+// parser conditional and cast expression tests
//
class A<T>
@@ -31,6 +31,18 @@ public class ConditionalParsing
struct S
{
}
+
+ struct MyTestStruct : IDisposable
+ {
+ public void Dispose ()
+ {
+ }
+
+ public static implicit operator MyTestStruct (int i)
+ {
+ return new MyTestStruct ();
+ }
+ }
void Test_1 (bool a)
{
@@ -129,6 +141,15 @@ public class ConditionalParsing
bool? b = Test (1, arg:2);
}
+ void Test_17 ()
+ {
+ {
+ using (MyTestStruct? mts = (int?) 1)
+ {
+ }
+ }
+ }
+
static void Helper<T> (T arg)
{
}