Unboxing of Nullable<T> is not implemented
See original GitHub issueArea of Cosmos - What area of Cosmos are we dealing with?
BCL tests
Expected Behaviour - What do you think that should happen?
The unboxing should succeed and HasValue should be true.
Actual Behaviour - What unexpectedly happens?
We know it is not implemented so this is totally expected but…
09:40:33.367007 Error: Error: Exception: System.Exception: Error compiling method ‘SystemVoidBoxingTestsKernelTestUnboxingNullable’: System.NotImplementedException: The method or operation is not implemented. 09:40:33.405042 Error: at Cosmos.IL2CPU.X86.IL.Unbox.Execute(_MethodInfo aMethod, ILOpCode aOpCode) in C:\Users\fano\Documents\GitHub\Cosmos\IL2CPU\source\Cosmos.IL2CPU\IL\Unbox.cs:line 78 09:40:33.405973 Error: at Cosmos.IL2CPU.X86.IL.Unbox_Any.Execute(_MethodInfo aMethod, ILOpCode aOpCode) in C:\Users\fano\Documents\GitHub\Cosmos\IL2CPU\source\Cosmos.IL2CPU\IL\Unbox_Any.cs:line 22
Reproduction - How did you get this error to appear?
private void TestUnboxingNullable()
{
object x = 42;
int? y = (int?)x;
Assert.IsTrue(y.HasValue == true, "Unboxing of Nullable<int> does not work");
}
Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?
Last devKit
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
I assume you guys look at CoreRT ? https://github.com/dotnet/corert
Seems there could be a lot of overlap between the two, because they compile for native operation on any OS - which means they’ve probably had to deal with a lot of the issues you have on converting C# to CPU commands/assembler.
As this issue has received no new activity, it has been marked as stale