X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2Ftest-primary-ctor-02.cs;h=d22b3220691e8220b0374dfea0774fbfc66cbd5c;hb=100bd760a46811121b4b47ebba941d4fb98486ab;hp=5369a49c9b1d209f0122e5b71e19c3a39f0b2320;hpb=69cd9d1b149bd2d551f8b1e53748cc720b49cc49;p=mono.git diff --git a/mcs/tests/test-primary-ctor-02.cs b/mcs/tests/test-primary-ctor-02.cs index 5369a49c9b1..d22b3220691 100644 --- a/mcs/tests/test-primary-ctor-02.cs +++ b/mcs/tests/test-primary-ctor-02.cs @@ -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 ()