throw exception if boolean is not true or false

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@325 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent c3320ae555
commit 45b0e6a131
  1. 6
      jode/jode/expr/ConstOperator.java

@ -54,7 +54,11 @@ public class ConstOperator extends NoArgOperator {
return "false";
else if (value.equals("1"))
return "true";
} if (type.getBottom() == Type.tChar) {
else
throw new jode.AssertError
("boolean is neither false nor true");
}
if (type.getBottom() == Type.tChar) {
char c = (char) Integer.parseInt(value);
switch (c) {
case '\0':

Loading…
Cancel
Save