check: compare variadic fn params at the declared element type

installparams normalizes a decl's `T...` param lhs to []T in place
(cstage instead sets the resolved tp->type and never mutates AST), so
typeeqast compared a decl-synthesized fn type's []i64 against a fn
TYPE expr's surface i64 and confidently rejected
`let f: fn(args: i64...) void = sum;` — cstage accepts and runs. The
normalization wrapper now carries an op marker and typeeqast peels
exactly it, so both sides compare at the declared element type without
admitting genuinely different element depths. Fixture fnptrlet_variadic;
corpus pin 1486/2972.
This commit is contained in:
2026-08-08 02:47:08 +09:00
parent 98a2e37ac0
commit 430c7e0546
4 changed files with 47 additions and 7 deletions

View File

@@ -1,13 +1,13 @@
package wwfixture;
def protocolversion: i32 = 1;
def corpuscount: i32 = 1485;
def corpuscount: i32 = 1486;
def errorcount: i32 = 338;
def compilecount: i32 = 17;
def runcount: i32 = 191;
def runexitcount: i32 = 939;
def nativecount: i32 = 2970;
def corpushash: str = "69453e64f903a75b8a3f27c79e336ae766b3fb7ecfaac85d13f5d1f0c0dc4f50";
def runexitcount: i32 = 940;
def nativecount: i32 = 2972;
def corpushash: str = "ab4b1d1ffc078b23de0a70911740511e873cd8d6f76009c4719d704bb36e6133";
type directive = enum i32 {
ERROR = 0,