Skip to content

Commit 7c4a193

Browse files
committed
Apply suggestions
1 parent 7ff2f34 commit 7c4a193

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,9 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
12301230
current_procedure_abi_type = ASR::abiType::BindC;
12311231
} else if (name == "overload") {
12321232
overload = true;
1233-
} else if (name != "interface") {
1233+
} else if (name == "interface") {
1234+
// TODO: Implement @interface
1235+
} else {
12341236
throw SemanticError("Decorator: " + name + " is not supported",
12351237
x.base.base.loc);
12361238
}

src/runtime/ltypes/ltypes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def overload(f):
9393

9494

9595
def interface(f):
96-
raise Exception("Unexpected to be called by CPython")
96+
def inner_func():
97+
raise Exception("Unexpected to be called by CPython")
98+
return inner_func
9799

98100

99101
# C interoperation support

0 commit comments

Comments
 (0)