Skip to content

ArrayTypeMismatchException in nested arrays with function pointers (android) #80095

@oleg-st

Description

@oleg-st

Description

The code below throws System.ArrayTypeMismatchException when run in Android emulator (MAUI project targeting Android).
It works fine in windows.

Reproduction Steps

unsafe class Program
{
    public static delegate* managed<int>[][] Functions = {
        new delegate* managed<int>[]
        {
            &Function,
        },
    };

    public static int Function() => 42;
}

Expected behavior

No exception

Actual behavior

System.ArrayTypeMismatchException: 'Attempted to access an element as a type incompatible with the array.'

Regression?

No response

Known Workarounds

No response

Configuration

Host:
Version: 7.0.1
Architecture: x64
Commit: 97203d3

OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows

Other information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions