Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Dict Insert in ASR #432

Merged
merged 5 commits into from
Apr 30, 2022
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
Prev Previous commit
Next Next commit
apply suggestions
  • Loading branch information
Smit-create committed Apr 30, 2022
commit 646bde0dba4a1cb7deca0d75bacd2161ea1b9889
8 changes: 4 additions & 4 deletions src/lpython/semantics/python_ast_to_asr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1833,8 +1833,8 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
diag.add(diag::Diagnostic(
"Type mismatch in dictionary key, the types must be compatible",
diag::Level::Error, diag::Stage::Semantic, {
diag::Label("type mismatch ('" + ktype + "' and '" + totype + "')",
{x.base.base.loc})
diag::Label("type mismatch (found: '" + ktype + "', expected: '" + totype + "')",
{key->base.loc})
})
);
throw SemanticAbort();
Expand All @@ -1845,8 +1845,8 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
diag.add(diag::Diagnostic(
"Type mismatch in dictionary value, the types must be compatible",
diag::Level::Error, diag::Stage::Semantic, {
diag::Label("type mismatch ('" + vtype + "' and '" + totype + "')",
{x.base.base.loc})
diag::Label("type mismatch (found: '" + vtype + "', expected: '" + totype + "')",
{val->base.loc})
})
);
throw SemanticAbort();
Expand Down