Fix Using @if with methods with generic params only inferred from the parent type fails #2770

This commit is contained in:
Christoffer Lerno
2026-01-20 01:04:12 +01:00
parent 0b9b49673e
commit e84e23f7ec
4 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import std;
struct Foo <Type> { int a; }
fn void Foo.test(self) @if(Type.sizeof > 4)
{ }
fn int main()
{
Foo{int} x;
return 0;
}