Skip to content

Commit 7372627

Browse files
fixes semantic error for int (Issue #1926)
1 parent 467081e commit 7372627

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,12 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
876876
}
877877

878878
if( !type && raise_error ) {
879-
throw SemanticError("Unsupported type annotation: " + var_annotation, loc);
879+
if (var_annotation == "int") {
880+
throw SemanticError(var_annotation + " type is not supported yet. " , loc);
881+
} else
882+
{
883+
throw SemanticError("Unsupported type annotation: " + var_annotation, loc);
884+
}
880885
}
881886

882887
return type;

0 commit comments

Comments
 (0)