aionnetwork / AVM

Enabling Java code to run in a blockchain environment
https://theoan.com/
MIT License
49 stars 25 forks source link

[CLOSED] StringConcat throws exception on string constant + primitive variable #312

Closed aionbot closed 5 years ago

aionbot commented 5 years ago

Issue created by JunhanHu-aion (on Friday Nov 09, 2018 at 19:59 GMT)

This is a known issue left by our invoke dynamic implementation

String s = "String " + v; will throw java.lang.ClassCastException if v is any primitive variable (not compile-time constant).

The cause of this issue is the primitive variable v will be autoboxed inside invoke dymamic. Our current impelemtation can not transfrom the boxed object into shadow boxed object.