diff --git a/python/taichi/lang/ast/ast_transformer.py b/python/taichi/lang/ast/ast_transformer.py index 21fcde0b26d4f..13c8ed60e6112 100644 --- a/python/taichi/lang/ast/ast_transformer.py +++ b/python/taichi/lang/ast/ast_transformer.py @@ -1525,7 +1525,7 @@ def build_If(ctx, node): return node with ctx.non_static_if_guard(node): - stmt_dbg_info = ctx.get_pos_info(node) + stmt_dbg_info = _ti_core.DebugInfo(ctx.get_pos_info(node)) impl.begin_frontend_if(ctx.ast_builder, node.test.ptr, stmt_dbg_info) ctx.ast_builder.begin_frontend_if_true() build_stmts(ctx, node.body)