mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix Using @if with methods with generic params only inferred from the parent type fails #2770
This commit is contained in:
11
test/test_suite/generic/generic_with_method_ad_hoc.c3t
Normal file
11
test/test_suite/generic/generic_with_method_ad_hoc.c3t
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user