linux-packaging-mono/mcs/tests/test-primary-ctor-01.cs
Jo Shields 181b81b4a4 Imported Upstream version 3.12.0
Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
2015-01-13 10:44:36 +00:00

23 lines
345 B
C#

// Compiler options: -langversion:experimental
class Simple(int arg)
{
int Property { get; } = arg;
public static int Main ()
{
var c = new Simple (4);
if (c.Property != 4)
return 1;
var s = new S (4.3m);
if (s.Property != 4.3m)
return 1;
return 0;
}
}
struct S(decimal arg)
{
internal decimal Property { get; } = arg;
}