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"; return "false";
else if (value.equals("1")) else if (value.equals("1"))
return "true"; 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); char c = (char) Integer.parseInt(value);
switch (c) { switch (c) {
case '\0': case '\0':

Loading…
Cancel
Save