Browse Source

Add test for required members in record.

pull/2833/head
Daniel Grunwald 3 years ago
parent
commit
f192cb2703
  1. 21
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs

21
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs

@ -233,12 +233,31 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -233,12 +233,31 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}
#endif
#if CS110
public record struct WithRequiredMembers
{
public int A { get; set; }
public required double B { get; set; }
public object C;
public required dynamic D;
}
#endif
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
internal sealed class CompilerFeatureRequiredAttribute : Attribute
{
public CompilerFeatureRequiredAttribute(string featureName)
{
}
}
internal class IsExternalInit
{
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
internal sealed class RequiredMemberAttribute : Attribute
{
}
}

Loading…
Cancel
Save