You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix throwing exception when calling RunClassConstructor on a generic type with a static constructor (#105513)
* Fix throwing exception when calling RunClassConstructor on a generic type with a static constructor
#99183 seems to have done away with assuming that a generic type's static constructor was
always "initialized". As a result, if you call RunClassConstructor on it, the runtime would throw an exception.
Fixes#103891
* Apply suggestions from code review
---------
Co-authored-by: Jan Kotas <[email protected]>
Copy file name to clipboardExpand all lines: src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
usingSystem.IO;
7
7
usingSystem.Reflection;
8
8
usingSystem.Runtime.InteropServices;
9
+
usingSystem.Threading;
9
10
usingXunit;
10
11
11
12
namespaceSystem.Runtime.CompilerServices.Tests
@@ -101,7 +102,8 @@ public static void RunClassConstructor()
0 commit comments