Do not remap framework assembly if it's version is higher than the runtime version
[mono.git] / mcs / tests / test-primary-ctor-02.cs
index 5369a49c9b1d209f0122e5b71e19c3a39f0b2320..d22b3220691e8220b0374dfea0774fbfc66cbd5c 100644 (file)
@@ -1,3 +1,4 @@
+// Compiler options: -langversion:experimental
 using System;
 
 partial class Part
@@ -5,22 +6,21 @@ partial class Part
        public Part (string s)
                : this (5)
        {
-               if (arg != 5)
-                       throw new ApplicationException ("1");
-
-               if (Property != 12)
-                       throw new ApplicationException ("2");
        }
 }
 
 partial class Part(int arg)
 {
-       int field = 7;
+       static int field = 7;
+
+       int Property { get; } = arg + field;
 
-       int Property {
-               get {
-                       return arg + field;
-               }
+       {
+               if (arg != 5)
+                       throw new ApplicationException ("1");
+
+               if (Property != 12)
+                       throw new ApplicationException ("2");
        }
 
        public static int Main ()