Skip to content

Add linker test coverage for GetUninitializedObject #37739

Closed as not planned
Closed as not planned

Description

@MichalStrehovsky

The annotation for GetUninitializedObject is going to rely on the fact that linker treats all valuetypes as implicitly boxed. We need a test that starts failing if this is ever broken.

interface IFoo { int Frob(); }

struct Foo : IFoo
{
    int IFoo.Frob() => 100;
}

static int Main()
{
    var o = (IFoo)RuntimeHelpers.GetUninitializedObject(typeof(Foo));
    return o.Frob()
}

Activity

  1. added this to the 5.0 milestone on Jun 11, 2020
  2. added
    untriaged
    on Jun 11, 2020
  3. added
    linkable-framework
    on Jul 7, 2020
  4. joperezr commented on Jul 7, 2020

    @joperezr
    Member

    @MichalStrehovsky this should be easy to test now with the Trimming Tests infrastructure. Let me know if you need any help with using it or writing this test.

  5. removed
    untriaged
    on Jul 7, 2020
  6. eerhardt commented on Jul 30, 2020

    @eerhardt
    Member

    This isn't needed to ship 5.0, so moving to 6.0.

  7. modified the milestones: 5.0.0, 6.0.0 on Jul 30, 2020
  8. modified the milestones: 6.0.0, 7.0.0 on Jul 30, 2021
  9. modified the milestones: 7.0.0, Future on Jul 9, 2022
  10. tannergooding commented on Jul 24, 2026

    @tannergooding
    Member

    This has had no action in 6 years, its unlikely to be prioritized (and if needs to be, then closing it might be the forcing function).

  11. locked and limited conversation to collaborators on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Runtimelinkable-framework

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions