Refs #6063
ExprLiteral(char literal) is the first blocker in the reference-backed greedy order on master 634b3ff (+5 reference-passing files).
The t27c lexer makes a char literal only from one byte or a backslash plus one byte; the parser keeps the quotes; gen-zig prints it verbatim, so Zig types it as comptime_int. t27c's optimizer never folds or propagates it (its is_literal reads integers only).
Plan: lower a char literal to an untyped integer constant in cli/t27b/src/lower.rs. Refuse by name what Zig rejects, so there is no reference result to agree with: '\0' and other escapes outside \n \r \t \\ \' \" (ExprLiteral(char escape)), a raw control byte (ExprLiteral(char byte)), and a char literal shifted by a typed or runtime amount (ExprBinary(char literal << >>); t27c prints 'a' << @intCast(k)).
Refs #6063
ExprLiteral(char literal)is the first blocker in the reference-backed greedy order on master 634b3ff (+5 reference-passing files).The t27c lexer makes a char literal only from one byte or a backslash plus one byte; the parser keeps the quotes; gen-zig prints it verbatim, so Zig types it as
comptime_int. t27c's optimizer never folds or propagates it (itsis_literalreads integers only).Plan: lower a char literal to an untyped integer constant in
cli/t27b/src/lower.rs. Refuse by name what Zig rejects, so there is no reference result to agree with:'\0'and other escapes outside\n \r \t \\ \' \"(ExprLiteral(char escape)), a raw control byte (ExprLiteral(char byte)), and a char literal shifted by a typed or runtime amount (ExprBinary(char literal << >>); t27c prints'a' << @intCast(k)).