fix(narrow): StmtGenMixin exc_code 显式 int(cst_r.int_val)
ast.Constant.int_val 为 int64,exc_code 为 int(并传入 const_int32),改用显式 int(...)
This commit is contained in:
1 parent
985983391b
commit
be4db7b5d1
1 file changed
+1
-1
@@ -438,7 +438,7 @@ novirtual class StmtGenMixin(StmtGenDeclMixin.StmtGenDeclMixin):
|
||||
exc_msg: mlirlite.Value* = None
|
||||
if ek == ast.ASTKind.Constant:
|
||||
cst_r: ast.Constant* = ast.Constant*(rn.exc)
|
||||
if cst_r is not None and cst_r.const_kind == ast.CONST_INT: exc_code = cst_r.int_val
|
||||
if cst_r is not None and cst_r.const_kind == ast.CONST_INT: exc_code = int(cst_r.int_val)
|
||||
elif ek == ast.ASTKind.Name:
|
||||
enm2: ast.Name* = ast.Name*(rn.exc)
|
||||
if enm2.id is not None:
|
||||
|
||||
Reference in new issue
Block a user