-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed as not planned
Closed as not planned
Copy link
Labels
area-System.Runtime.CompilerServicesdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issue
Milestone
Description
Description
UnsafeAccessor throws MissingFieldException on generic field (T) in generic type, where genetic T is:
class(e.g.string)structthat hasclassas a generic parameter (e.g.ArraySegment<string>)
Reproduction Steps
[UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_items")]
static extern ref string[] GetItems(List<string> list);
GetItems(new());Expected behavior
getting field
Actual behavior
throws exception
System.MissingFieldException: Field not found: 'System.Collections.Generic.List`1._items'.
Regression?
No response
Known Workarounds
No response
Configuration
.NET SDK: 8.0.100-rc.1.23455.8
Other information
No response
kyoyama-kazusaneon-sunset, kyoyama-kazusa and sakno
Metadata
Metadata
Assignees
Labels
area-System.Runtime.CompilerServicesdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issue