Allow inference across && #2172.

This commit is contained in:
Christoffer Lerno
2025-06-05 14:20:40 +02:00
parent c9d9127da6
commit d6d0e08906
3 changed files with 11 additions and 2 deletions

View File

@@ -11,13 +11,15 @@ extern fn int printf(char *c, ...);
fn void foo()
{
int z = 2;
Foo*? w = &&{ z, 0 }; // #error: An untyped list can only have constant elements
ushort* y = &&4;
Foo*? w2 = &&{ z, 0 };
void*? w = &&{ z, 0 }; // #error: An untyped list can only have constant elements
}
fn void foo2()
{
int? z = 2;
Foo*? w = &&{ z, 0 }; // #error: An untyped list can only have constant elements
void*? w = &&{ z, 0 }; // #error: An untyped list can only have constant elements
}
fn void test()