diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2016-10-01 01:31:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-01 01:31:32 +0300 |
commit | 7601cb05c3d52419db4158716115c68243f46703 (patch) | |
tree | b3c7bf6f38cf71b1dda7928387202b18d5cdf0f0 /src/Runtime.Base | |
parent | ffa46916c4a43bb5b5bcc33ca763db7d144ea964 (diff) |
Make CastableObjectSupport constructor eager (#1958)
This was breaking Test.CoreLib since we don't have a class constructor runner there.
In the longer term, we'll probably want the compiler to detect if a class constructor runner is available in the classlib and make everything eager if it isn't.
In general this is a bigger feature because at that point we also need to topologically sort the constructors based on their dependencies. (We might already have a problem there...)
Diffstat (limited to 'src/Runtime.Base')
-rw-r--r-- | src/Runtime.Base/src/System/Runtime/CastableObjectSupport.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Runtime.Base/src/System/Runtime/CastableObjectSupport.cs b/src/Runtime.Base/src/System/Runtime/CastableObjectSupport.cs index 38ee21b26..8677ea941 100644 --- a/src/Runtime.Base/src/System/Runtime/CastableObjectSupport.cs +++ b/src/Runtime.Base/src/System/Runtime/CastableObjectSupport.cs @@ -4,6 +4,7 @@ using System.Runtime.CompilerServices; namespace System.Runtime { + [System.Runtime.CompilerServices.EagerStaticClassConstructionAttribute] static class CastableObjectSupport { private static object s_castFailCanary = new object(); |