We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7372627 commit 942cffeCopy full SHA for 942cffe
src/lpython/semantics/python_ast_to_asr.cpp
@@ -877,9 +877,15 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
877
878
if( !type && raise_error ) {
879
if (var_annotation == "int") {
880
- throw SemanticError(var_annotation + " type is not supported yet. " , loc);
881
- } else
882
- {
+ std::string msg = "Hint: Use i8, i16, i32 or i64 for now. ";
+ diag.add(diag::Diagnostic(
+ var_annotation + " type is not supported yet. ",
883
+ diag::Level::Error, diag::Stage::Semantic, {
884
+ diag::Label(msg, {loc})
885
+ })
886
+ );
887
+ throw SemanticAbort();
888
+ } else {
889
throw SemanticError("Unsupported type annotation: " + var_annotation, loc);
890
}
891
0 commit comments