Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Merge changes from TFS - #1628

Merged
jkotas merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs
Aug 9, 2016
Merged

jkotas merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

No description provided.

This issue is actually two independent bugs in order to get the test running. The first issue was the Mcg crash at compile time in Analyzer.cs. The if conditional was permitting a broader range of types than the unspecialization logic was prepared to handle. In this case it was the type was an array of a generic type, but other problematic types are theoretically possible. I fixed the issue by creating UnspecializedStructural, which should handle any type spec that could be meaningfully unspecialized, which is to say anything except a formal generic parameter.

The second issue is that the reflection code wasn't able to find the enum info for a generic enum. The previous code was looking up the instantiated type and no metadata was encoded for that instantiation. The new code does the lookup on the generic definition of the enum which we do have. We are assuming that the generic parameters in an enum have no meaningful impact, but if that was ever proven false then we'd need to encode metadata for each instantiation or do some more complicated runtime calculation.

[tfs-changeset: 1621542]
@jkotas
jkotas merged commit d0ae232 into dotnet:nmirror Aug 9, 2016
@dotnet-bot
dotnet-bot deleted the from-tfs branch August 9, 2016 02:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants