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

Features/unmanaged constructed types #32704

Merged
merged 47 commits into from
Jan 23, 2019

Conversation

RikkiGibson
Copy link
Contributor

@RikkiGibson RikkiGibson commented Jan 23, 2019

Related to dotnet/csharplang#1744 and #31374

This merges the unmanaged constructed types feature into dev16.1-preview1. @jaredpar approval is required. All of this code has been previously reviewed before being merged into the dotnet/features/unmanaged-constructed-types branch.

It's worth noting that this implementation allows taking a pointer to a generic ref struct, because taking a pointer to a non-generic ref struct is already allowed. @agocke @gafter so you're aware as this came up in the test plan review.

RikkiGibson and others added 30 commits December 6, 2018 13:57
* Add unmanaged generic struct tests

* Don't bail out of managed type checks when type arguments are present

* Simplify test

* Delegate HasPointerType to underlying field in WrappedFieldSymbol

* Add test for recursive expansion of struct with T : unmanaged

* Delay constraint checking on field types until after type members are added

* Update comment

* Add expected diagnostic to UnmanagedRecursiveTypeArgument test

* Add unmanaged recursive type argument tests with constraint violations

* Don't search fields whose type is circular struct when determining if a type is managed

* Update some tests

* Use TypeSyntax.Location for Type.CheckAllConstraints

* Add prototype comment

* Update GenericConstraintsTests

* Update IsManagedType asserts in UnsafeTests

* Fix ManagedAddressOfTests.DisallowSizeof

* Use SourceMemberFieldSymbol.SyntaxNode.Location for consistency in diagnostics

* Add some tests and diagnostics

* Fix more tests

* Fix BaseClassTests

* Add test for partially constructed generic struct which violates unmanaged constraint

* Consider nullability when running AfterTypeMembersChecks

* Update NullableReferenceTypesTests.Constraint_Oblivious due to differences from delayed constraint checks on field types

* Check if NRT enabled in compilation to use correct nullability in constraint checks

* Make UnmanagedConstraint_StructMismatchInImplements behave consistently

* Disable ResourceTests.AddResourceToModule in Mono

* Remove prototype comment

* Remove invalid comments from UnmanagedConstraints_NestedInGenericType

* Use ErrorLocation instead of SyntaxNode.Location

* Rename our pipeline YAML files

Originally created when everything was VSTS. This gets us back inline
with the new branding.

* Fix tests now that we use ErrorLocation for field constraint checks
Merge master to unmanaged constructed type feature branch
RikkiGibson and others added 17 commits January 8, 2019 12:50
Fixed a bug in constraint checking where the wrong Compilation
would be used.
…s-testing

Unmanaged constructed types tests
…cted-types

Merge dev16.1-preview1 into features/unmanaged-constructed-types
* Test generic struct with private field from metadata

* Expand generic ref struct testing

* Reference generic unmanaged tuple issue in relevant tests

* Add fixed size buffer tests

* Add IsManagedType checks in test cases involving circular structs

* Verify that unsafe scenarios disallowed in 7.3 are allowed latest

* Test IsManagedType API in more recursive scenarios
…cted-types

Merge dev16.1-preview1 into features/unmanaged-constructed-types
@RikkiGibson RikkiGibson added this to the 16.1.P1 milestone Jan 23, 2019
@RikkiGibson RikkiGibson requested a review from a team as a code owner January 23, 2019 20:44
@RikkiGibson RikkiGibson requested a review from jaredpar January 23, 2019 20:45
@RikkiGibson RikkiGibson merged commit 7b704d6 into dev16.1-preview1 Jan 23, 2019
@RikkiGibson RikkiGibson deleted the features/unmanaged-constructed-types branch January 23, 2019 21:54
@tannergooding
Copy link
Member

CC. @jkotas, who was interested in the feature as well. It should allow some amount of code to be simplified (once we have a compiler CoreFX/CoreCLR can consume).

xoofx pushed a commit to stark-lang/stark-roslyn that referenced this pull request Apr 16, 2019
…ucted-types

Features/unmanaged constructed types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants