You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
issue:
in bsh, we can't assign and pass void type.
in javascript, we can do:
var foo = undefined // to delete foo
var foo = this.aNonExistionVar // allow
var foo = doSth(); // may return undefined
var foo = aNonExistionVar // NOT allow, special case.
bar(foo); // foo is undefined
bar(getFoo()) // allow undefined
IMHO: bsh should have those behaviors like js, because void and undefined are all useful types.
let implementers decide whether to raise an exception or not,
solvetion:
IMHO: we should remove all checking for Primitive.VOID in all classes, we just throw an exception when unwrap a void object.
we may also edit the Name.java for the special case.