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

Test plan for "unmanaged generic structs" #31374

Closed
23 tasks done
jcouv opened this issue Nov 26, 2018 · 2 comments
Closed
23 tasks done

Test plan for "unmanaged generic structs" #31374

jcouv opened this issue Nov 26, 2018 · 2 comments
Assignees
Labels
Area-Compilers Test Test failures in roslyn-CI
Milestone

Comments

@jcouv
Copy link
Member

jcouv commented Nov 26, 2018

Proposal: dotnet/csharplang#1744

This issue is a place to collect test ideas and track their validation. Use the compiler test plan as a tool for brainstorming.

  • validate with LangVersion 7.3
  • test with tuple type (SO thread) Issue with tuples and unmanaged constraint #32103
  • write speclet (contained under Design section of proposal)
  • [ ] update compiler test plan (doesn't appear to be anything to add)
  • test public API IsUnmanagedType in new scenarios
  • Test for ref structs
  • Test the IsManagedType API as suggested by Julien
  • Test moveability (existing rules should be sufficient)
  • Have at least one test spit some IL to look at and have a few tests run with "expected output" to make sure the CLR can handle the code.
  • Stackalloc array of items
  • (Mutually) Recursive struct definition
    • Also check the IsUnmanagedType API for these
  • Fixed-size buffer inside generic struct
  • Also check across metadata (metadata struct definition has private object or unmanaged field)
    • Also private T field
  • For all places unmanaged type is required, we should have a test that covers that code path and ensures that the required feature diagnostic is produced at language version < 8.0
    • addressOf &
    • fixed with address of field
    • fixed with array of generic structs
    • sizeof
    • stackalloc with size
    • implicit stackalloc with initializer
    • field of type pointer to unmanaged generic struct
    • unmanaged constraint
@RikkiGibson
Copy link
Contributor

RikkiGibson commented Dec 6, 2018

Moved

@RikkiGibson
Copy link
Contributor

Closing because the feature has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Test Test failures in roslyn-CI
Projects
None yet
Development

No branches or pull requests

3 participants