Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress dynamic access to instance indexers off of types. #11677

Merged
merged 1 commit into from
Jun 1, 2016

Conversation

AlekseyTs
Copy link
Contributor

@AlekseyTs AlekseyTs commented May 31, 2016

@AlekseyTs AlekseyTs added Language-C# Area-Compilers Tenet-Reliability Customer telemetry indicates that the product is failing in a crash/hang/dataloss manner. PR For Personal Review Only The PR doesn’t require anyone other than the developer to review it. labels May 31, 2016
@AlekseyTs AlekseyTs added this to the 1.3 milestone May 31, 2016
@AlekseyTs AlekseyTs removed the PR For Personal Review Only The PR doesn’t require anyone other than the developer to review it. label Jun 1, 2016
@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler Please review Update 3 fix.

CC @MattGertz, @jaredpar For ask mode approval.

@AlekseyTs
Copy link
Contributor Author

Ping. @dotnet/roslyn-compiler Please review Update 3 fix.

CC @MattGertz, @jaredpar For ask mode approval.

@MattGertz
Copy link
Contributor

Pending CRs.


[ClrOnlyFact(ClrOnlyReason.Ilasm)]
[WorkItem(204561, "https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems?id=204561&_a=edit")]
public void Bug204561_01()
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps name the tests SuppressDynamicIndexerAccess or something similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

@cston
Copy link
Member

cston commented Jun 1, 2016

LGTM

@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler Please review Update 3 fix, I need a second sign-off.

} // end of class WithIndexer
";

MetadataReference reference = CompileIL(iLSource, appendDefaultHeader: true, embedInteropTypes: false);
Copy link
Member

Choose a reason for hiding this comment

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

Can an assembly of this structure only be created in IL? Just asking because if it could also be created in VB it may be interesting to have a test with VB code to ensure reasonable interop.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer to test from IL in this case. As you can see, there is no interop with indexed property in this case and that is the scenario we are interested about.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I suppose producing a binding error isn't interop. Sounds good.

@agocke
Copy link
Member

agocke commented Jun 1, 2016

LGTM

@AlekseyTs
Copy link
Contributor Author

Renamed unit-tests.

@AlekseyTs AlekseyTs merged commit 683053b into dotnet:stabilization Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved to merge Area-Compilers cla-already-signed Language-C# Tenet-Reliability Customer telemetry indicates that the product is failing in a crash/hang/dataloss manner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants