aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/OperatorGen.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-30 14:31:07 +0000
committer_ov4 <ov4@ov4.org>2026-10-30 14:31:07 +0000
commit0cf54b4f77ccf8376341950b02ceb7c1d1268ed7 (patch)
treeeebbba01063451c28f0a2e1cc048215f50beb98f /lib/CodeGen/OperatorGen.cc
parent4cb0d9b196008bc55dbfcdac1f9211dbbc879895 (diff)
refactor(strings): construct string values implicitly from raw literals
Keep double-quoted literals and text constants as C_STRING values. Use marked STRING constructors for text and CHAR conversion, preserving string operations and I/O through the existing class machinery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/CodeGen/OperatorGen.cc')
-rw-r--r--lib/CodeGen/OperatorGen.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/OperatorGen.cc b/lib/CodeGen/OperatorGen.cc
index 15667ea..2e0ee3a 100644
--- a/lib/CodeGen/OperatorGen.cc
+++ b/lib/CodeGen/OperatorGen.cc
@@ -22,7 +22,7 @@ CodeGen::OperatorResolution CodeGen::resolveOperator(
// Keep builtin CHAR comparisons ahead of STRING construction.
if (Right && Left->Kind == TypeKind::Char && Right->Kind == TypeKind::Char &&
Op != '&' && Formal && Formal->isString()) return false;
- return Lenient && !Param.IsByRef && !Param.IsArray && canImplicitlyConvert(Actual, Formal);
+ return Lenient && !Param.IsByRef && !Param.IsArray && implicitConversionRank(Actual, Formal) == 1;
};
// Builtin operations on exact operand types precede converted overloads.
// Raw C text is the exception: visible STRING operators supply text semantics.