-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-System.Reflectionbugin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
- 6.0.100-preview.7.21379.14
- Current Window10
- VS2019 Preview
here dotnet/core#6444 (comment) the following (slightly modified) example is used
class Target
{
public (string?, object) TupleField;
}
[Fact]
public void Test()
{
var type = typeof(Target);
var tupleField = type.GetField("TupleField");
var context = new NullabilityInfoContext();
var tupleInfo = context.Create(tupleField);
Assert.Equal(NullabilityState.NotNull, tupleInfo.ReadState);
Assert.Equal(NullabilityState.Nullable, tupleInfo.GenericTypeArguments[0].ReadState);
Assert.Equal(NullabilityState.NotNull, tupleInfo.GenericTypeArguments[1].ReadState);
}
it fails since tupleInfo.GenericTypeArguments is empty.
I am not sure if this is a bug, or if the API has evolved beyond that example.
Paging @buyaa-n since you posted that usage example
slang25
Metadata
Metadata
Assignees
Labels
area-System.Reflectionbugin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged