Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/lpython/semantics/python_ast_to_asr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,12 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
}

if( !type && raise_error ) {
throw SemanticError("Unsupported type annotation: " + var_annotation, loc);
if (var_annotation == "int") {
throw SemanticError(var_annotation + " type is not supported yet. " , loc);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a hint: "hint: use i8, i16, i32 or i64 for now". Lookup other place in the code how to add a hint.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review the changes I have made.

} else
{
throw SemanticError("Unsupported type annotation: " + var_annotation, loc);
}
}

return type;
Expand Down