curiosity-ai / h5

🚀 The next generation C# to JavaScript compiler
https://github.com/curiosity-ai/h5
Apache License 2.0
210 stars 30 forks source link

FieldBlock: Convert.ChangeType is failed. #67

Open ghost opened 1 year ago

ghost commented 1 year ago

It is logged as warning, but it happens in absolutely normal circumstances.

For example if I assign int value to some class which has implicit cast operator. Generated JS is correct, so not need to warn about such events.

FieldBlock: Convert.ChangeType is failed. Value type: System.Int32, Target type: MyNamespace.MyClass
public static implicit operator MyClass(int value)
{
    return new MyClass(value);
}

MyClass mc = 0xAABB;