Commit bb63da9
[release/9.0-preview7] Fix throwing exception when calling RunClassConstructor on a generic type with a static constructor (#105535)
* 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
* PR feedback
* Apply suggestions from code review
* More feedback
* Shouldn't wing it
---------
Co-authored-by: Steve Pfister <stpfiste@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>1 parent 99eede9 commit bb63da9
File tree
3 files changed
+15
-2
lines changed- src
- coreclr/vm
- libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/CompilerServices
3 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3768 | 3768 | | |
3769 | 3769 | | |
3770 | 3770 | | |
| 3771 | + | |
| 3772 | + | |
3771 | 3773 | | |
3772 | 3774 | | |
3773 | 3775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
1309 | | - | |
| 1309 | + | |
| 1310 | + | |
1310 | 1311 | | |
1311 | 1312 | | |
1312 | 1313 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | | - | |
| 105 | + | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| |||
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
120 | 130 | | |
121 | 131 | | |
122 | 132 | | |
| |||
0 commit comments