beanshell / beanshell

Beanshell scripting language
Apache License 2.0
815 stars 183 forks source link

Cast throws exception #725

Open opeongo opened 1 year ago

opeongo commented 1 year ago
BeanShell 3.0.0-SNAPSHOT.5569
bsh % o = Double.valueOf(1);
--> $0 = 1.0d :Double
bsh % oo = (Number) o;
// Error: Unknown error: java.lang.ClassCastException: class java.lang.Double cannot be cast to class bsh.Primitive (java.lang.Double is in module java.base of loader 'bootstrap'; bsh.Primitive is in unnamed module of loader 'app')
bsh % 
opeongo commented 1 year ago

Submitted pr #729 for this issue

nickl- commented 1 year ago

Happy with the solution at #729 this issue can be closed.

opeongo commented 11 months ago

Closed but not merged? Could you please go ahead and do the merge?

Especially the test case

epaterlini commented 1 month ago

Hello, any news on that?