Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Disallow statics of spans and class instance members of span #9061

Merged
merged 3 commits into from
Jan 24, 2017

Conversation

kouvel
Copy link
Member

@kouvel kouvel commented Jan 23, 2017

Functional fix for #8516 to cover some additional cases. IL tests will be coming later in a separate PR.

Functional fix for #8516 to cover some additional cases. IL tests will be coming later in a separate PR.
@kouvel
Copy link
Member Author

kouvel commented Jan 23, 2017

@jkotas

{
// fIsStatic - By-ref-like types cannot be used for static fields
// !IsValueClass() - Non-value-classes cannot contain by-ref-like instance fields
COMPlusThrowHR(COR_E_TYPELOAD);
Copy link
Member

Choose a reason for hiding this comment

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

It may be useful to add more descriptive error message for this - I expect that folks are going to hit this until we get the enforcement in the language.

BuildMethodTableThrowException(IDS_XXX);

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, done

@kouvel
Copy link
Member Author

kouvel commented Jan 24, 2017

@dotnet-bot test this please

@jkotas jkotas merged commit 969cea6 into dotnet:master Jan 24, 2017
@kouvel kouvel deleted the SpanFixes branch January 24, 2017 07:17
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…coreclr#9061)

Functional fix for dotnet/coreclr#8516 to cover some additional cases. IL tests will be coming later in a separate PR.


Commit migrated from dotnet/coreclr@969cea6
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants