-
Notifications
You must be signed in to change notification settings - Fork 509
Reflected constructor invocation fails when using null propagation operator in .NET Native #3565
Comments
Can you give us more details so that we can route this?
I just tried this in VS and couldn't repro this failure, so I want to make sure we have everything to repro. |
It's 100% reproducible on my end when creating an empty project, enabling .NET Native compilation and adding the code I posted here.
|
Still no luck in reproing. This could be a bug in devirtualization. Code generation bugs are extremely finicky. Do you mind creating an ilcRepro file with your test project? |
I will try to get you everything you need. Can I post the link to the ilcRepro here or do I need to send it by e-mail? BTW, this issue is occurring on 3 different machines so it doesn't seem to be environment-related. |
E-mail is the proper channel for .NET Native for UWP apps, so taking it there wouldn't be a bad idea (I do get the dotnetnative at microsoft com emails and will be able to follow up). We can close the issue here - the compiler used for .NET Native for UWP apps is different than the compiler we have in this repo. This will likely be a compiler bug that can't be fixed in this repo anyway. |
Ok, I just thought that because the stacktrace clearly indicates that the Exception is thrown in the CoreRT code, that this would be the right place. |
Repro file was created and I'll e-mail it to the e-mail address you mentioned. Reflection works so it's not caused by missing runtime directives (because the constructor was successfully found and the first line of code where the constructor is invoked without the ?. operator succeeds). |
Oh, okay, with Profile151 I have a repro and it's a rather annoying breaking change in the framework. If you want to follow along:
The good news is that Cc @atsushikan |
The following code works fine in any .NET runtime environment, including Mono, Xamarin, etc. :
On Windows UWP with .NET Native compilation enabled, the same code throws an exception of type
NotImplementedException
However, when the null propagation operator is removed, it works perfectly on .NET Native:
The line in the stack trace where the exception occurs is:
I asked the same question on Stack Overflow: http://stackoverflow.com/questions/43857106/net-native-code-crashes-on-constructor-invoke-null-propagation
The text was updated successfully, but these errors were encountered: