Skip to content

Commit 2a11b5f

Browse files
this is in fact still a thing
1 parent a7a2c47 commit 2a11b5f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Helpers/Compiler/CompilerRequiredAttributes.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
// ReSharper disable once CheckNamespace
1+
// this gives us the `required` keyword for fields
2+
// if you remove this, the code wont compile
3+
// i still have no clue why is this a thing
4+
5+
// ReSharper disable once CheckNamespace
26
namespace System.Runtime.CompilerServices
37
{
4-
// Required by the compiler for C# 11 'required' keyword
58
[AttributeUsage(AttributeTargets.All, Inherited = false)]
69
public sealed class RequiredMemberAttribute : Attribute { }
710

Helpers/Compiler/IsExternalInit.cs.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// I don't know why or how it works, but it works.
1+
// this gives us the `init` keyword for properties
2+
// if you remove this, the code wont compile
3+
// i still have no clue why is this a thing
4+
25
// ReSharper disable once CheckNamespace
36
namespace System.Runtime.CompilerServices
47
{

0 commit comments

Comments
 (0)