fun fitsType(env: Environment?, ctx: Context?, t: Type): Boolean { if (this.type.isType(TC_CHAR)) { return super.fitsType(env, ctx, t) } when (t.getTypeCode()) { TC_BYTE -> return value === value as Byte TC_SHORT -> return value === value as Short TC_CHAR -> return value === value as Char } return super.fitsType(env, ctx, t) }
See if this number fits in the given type .