C#: Add ref struct boxing example (false positive).

This commit is contained in:
Michael Nebel
2025-01-03 14:03:05 +01:00
parent 41dc4a5503
commit 9a2edc3d5c
2 changed files with 6 additions and 0 deletions

View File

@@ -45,3 +45,6 @@ class C<T1, T2, T3, T4, T5, T6>
x1 = x15; // not a boxing conversion
}
}
// Ref structs can't be converted to a dynamic, object or valuetype.
ref struct S { }

View File

@@ -117,6 +117,9 @@
| Nullable<Int32> | Object |
| Nullable<Int32> | ValueType |
| Nullable<Int32> | dynamic |
| S | Object |
| S | ValueType |
| S | dynamic |
| T1 | Object |
| T1 | dynamic |
| T3 | Object |