Skip to content

Crossgen2 unable to find methods on MdArrays #52703

Closed
@MichalStrehovsky

Description

@MichalStrehovsky
using System;

int[,][,][,] x = new int[1, 1][,][,];

x[0, 0] = new int[123,2][,];
Console.WriteLine("Hello world", x[0,0]);

Compile with crossgen2. Notice that we hit a MissingMethodException at compile time and compiling Main is aborted.

This is because the reference to the MdArray Set method contains a bunch of EmbeddedSignatureData after #51764 and the signature doesn't match the synthetic method that the type system created.

I tried to see what CoreCLR is doing - it represents the array element type as ELEMENT_TYPE_VAR with index 0 and I assume magic happens somewhere. The managed type system doesn't do that.

This is a regression.

Related to #52444.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions