projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not remap framework assembly if it's version is higher than the runtime version
[mono.git]
/
mcs
/
tests
/
gtest-452.cs
diff --git
a/mcs/tests/gtest-452.cs
b/mcs/tests/gtest-452.cs
index 6b6f2b8c0d38e771f3e3a75470f6a7e43597c2a7..8eafd9469f76d8036ead29c5c8cb7a1bf7874289 100644
(file)
--- a/
mcs/tests/gtest-452.cs
+++ b/
mcs/tests/gtest-452.cs
@@
-1,43
+1,27
@@
-// Compiler options: -langversion:future
-
using System;
using System;
-public class
C
+public class
Test
{
{
- static void Foo<T> (T t, T u = default (T))
- {
- }
-
- static void TestParams (params int[] i)
+ public static int Main ()
{
{
- throw new ApplicationException ();
+ S mc = new S ();
+ float? f = mc;
+ if (f != 5)
+ return 1;
+
+ return 0;
}
}
+}
- static void TestParams (int i = 4)
+struct S
+{
+ public static implicit operator float (S p1)
{
{
+ throw new ApplicationException ("should not be called");
}
}
-
- public string this [int i, string s = "test"] {
- get { return s; }
- set { value = s; }
- }
-
- public static int Main ()
+
+ public static implicit operator float? (S p1)
{
{
- Foo ("f");
- Foo (2);
- Foo (2, 4);
- Foo<long> (2);
- Foo<string> ("2", "3");
-
- TestParams ();
-
- C c = new C ();
- if (c [1] != "test")
- return 1;
-
- c [3] = "value";
-
- return 0;
+ return 5;
}
}
}
}