1.4K Star 7.6K Fork 1.4K

GVP方舟编译器 / OpenArkCompiler

 / 详情

jbc2mpl: The value of a 'byte' type variable should not exceed 127

已完成
成员
创建于  
2020-08-26 00:30

The value of a byte type variable should not exceed 127. But with the following test code, the output shows b exceeds 127:

public class Main {
  public static void main(String[] args) {
    byte b = 127;
    System.out.println(b++);
    System.out.println(b++);
    System.out.println(b++);
  }
}

The output is:

127
128
129

But it should be

127
-128
-127

评论 (4)

yanchen4791 创建了任务
展开全部操作日志

@LuoYin @arkcompiler @BinaryFZ 看一下这个问题。应该很简单的。

@yehandong 已在修改验证。

'short' and 'char' type variables also have the same problem, please fix the problem for these types as well.

byte,short,char都是由于类型信息丢失导致的,目前stack check还有点问题,正在修复

BinaryFZ 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(4)
5274908 ye handong 1578983635 5308835 binaryfz 1578984276
C++
1
https://gitee.com/openarkcompiler/OpenArkCompiler.git
git@gitee.com:openarkcompiler/OpenArkCompiler.git
openarkcompiler
OpenArkCompiler
OpenArkCompiler

搜索帮助