Skip to content

Commit 73bd468

Browse files
Throw an error when jit decorator is compiled using LPython
1 parent a04d456 commit 73bd468

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3500,9 +3500,13 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
35003500
is_inline = true;
35013501
} else if (name == "static") {
35023502
is_static = true;
3503+
} else if (name == "jit") {
3504+
throw SemanticError("`@lpython.jit` decorator must be "
3505+
"run from CPython, not compiled using LPython",
3506+
dec->base.loc);
35033507
} else {
35043508
throw SemanticError("Decorator: " + name + " is not supported",
3505-
x.base.base.loc);
3509+
dec->base.loc);
35063510
}
35073511
} else if (AST::is_a<AST::Call_t>(*dec)) {
35083512
AST::Call_t *call_d = AST::down_cast<AST::Call_t>(dec);

0 commit comments

Comments
 (0)