Skip to content

Handle missing private metadata from reference assemblies#36267

Merged
sharwell merged 1 commit intodotnet:masterfrom
sharwell:exclude-empty
Jun 10, 2019
Merged

Handle missing private metadata from reference assemblies#36267
sharwell merged 1 commit intodotnet:masterfrom
sharwell:exclude-empty

Conversation

@sharwell
Copy link
Copy Markdown
Contributor

@sharwell sharwell commented Jun 9, 2019

Some reference assemblies omit information about private fields. To avoid treating structures in these assemblies as immutable, we only consider types immutable if they contain information about one or more
private fields.

This is a workaround for issues like dotnet/standard#678.

Some reference assemblies omit information about private fields. To
avoid treating structures in these assemblies as immutable, we only
consider types immutable if they contain information about one or more
private fields.

This is a workaround for issues like dotnet/standard#678.
@sharwell sharwell requested a review from a team as a code owner June 9, 2019 21:54
type = type.GetTypeArguments()[0];
}

switch (type.SpecialType)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add a unit test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in any straightforward manner. We will be able to once dotnet/roslyn-sdk#329 is available.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior anomaly is an artifact of the reference assembly in NETStandard.Library 2.0.0 and does not occur with the implementation or runtime assemblies. It also doesn't occur with reference assemblies produced by the current C# compiler because the underlying concern was already addressed.

@sharwell sharwell merged commit 3aa643d into dotnet:master Jun 10, 2019
@sharwell sharwell deleted the exclude-empty branch June 10, 2019 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants