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

Conversion to generic interface breaks CCWs for collection types #1663

Closed
Sergio0694 opened this issue Jul 4, 2024 · 1 comment
Closed
Labels
AOT bug Something isn't working
Milestone

Comments

@Sergio0694
Copy link
Member

Sergio0694 commented Jul 4, 2024

Describe the bug

To Reproduce

Triggered by this ItemsSource binding. The viewmodel property is this one.

public ShaderRunnerViewModel[] ComputeShaderOptions { get; } = ...

Works.

public IReadOnlyList<ShaderRunnerViewModel> ComputeShaderOptions { get; } = ...

Crashes.

Note

I've tried using an array expression instead of a collection expression, I still get the same exact crash.

Stack trace

image

Expected behavior

Should work fine

Version Info

Latest from staging/AOT (016e9ec)

Additional context

Possibly related to #1661.

@Sergio0694 Sergio0694 added bug Something isn't working AOT labels Jul 4, 2024
@manodasanW
Copy link
Member

manodasanW commented Jul 30, 2024

Ignoring the collection expression issue which is tracked separately, this looks to be because we are failing to detect the get property initializer it seems. Doing the below instead does work.

public IReadOnlyList<ShaderRunnerViewModel> ComputeShaderOptions { get; } =

->

public IReadOnlyList<ShaderRunnerViewModel> ComputeShaderOptions = new ShaderRunnerViewModel[]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AOT bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants