From 0cf54b4f77ccf8376341950b02ceb7c1d1268ed7 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 30 Oct 2026 14:31:07 +0000 Subject: 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 --- lib/CodeGen/OperatorGen.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/OperatorGen.cc') 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. -- cgit v1.3.1-4-g156e