aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/TypeCheckGen.cc4
-rw-r--r--tests/iii/operator-global-errors/case.json2
-rw-r--r--tests/iii/string-type-mismatch/case.json2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/TypeCheckGen.cc b/lib/CodeGen/TypeCheckGen.cc
index 575fc04..ef079b7 100644
--- a/lib/CodeGen/TypeCheckGen.cc
+++ b/lib/CodeGen/TypeCheckGen.cc
@@ -111,8 +111,8 @@ Value *CodeGen::emitUserKindBinaryOp(int Op, Value *L, const TypeInfo *LT,
const char *RName = RT ? RT->Name.c_str() : "?";
if ((LT && LT->isRecord()) || (RT && RT->isRecord())) {
- reportError("Operator %s cannot be applied to a record value (type %s)",
- operatorSpelling(Op).c_str(), (LT && LT->isRecord()) ? LName : RName);
+ reportError("Operator %s cannot be applied to %s and %s",
+ operatorSpelling(Op).c_str(), LName, RName);
return nullptr;
}
diff --git a/tests/iii/operator-global-errors/case.json b/tests/iii/operator-global-errors/case.json
index eeb9965..a267007 100644
--- a/tests/iii/operator-global-errors/case.json
+++ b/tests/iii/operator-global-errors/case.json
@@ -5,7 +5,7 @@
"line": 12
},
{
- "reason": "Operator \\+ cannot be applied to a record",
+ "reason": "Operator \\+ cannot be applied to Box and INTEGER",
"line": 13
},
{
diff --git a/tests/iii/string-type-mismatch/case.json b/tests/iii/string-type-mismatch/case.json
index 975c57c..3471178 100644
--- a/tests/iii/string-type-mismatch/case.json
+++ b/tests/iii/string-type-mismatch/case.json
@@ -1,7 +1,7 @@
{
"errors": [
{
- "reason": "Operator = cannot be applied to a record value \\(type STRING\\)",
+ "reason": "Operator = cannot be applied to STRING and INTEGER",
"line": 2
}
]