mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Regression: Generic type could not be found in lambda inside macro #2853
This commit is contained in:
26
test/test_suite/generic/generic_lambda.c3t
Normal file
26
test/test_suite/generic/generic_lambda.c3t
Normal file
@@ -0,0 +1,26 @@
|
||||
// #target: macos-x64
|
||||
module main;
|
||||
import foo;
|
||||
|
||||
fn void main()
|
||||
{
|
||||
foo::test{int}();
|
||||
}
|
||||
|
||||
module foo <Type>;
|
||||
|
||||
macro void test()
|
||||
{
|
||||
var func = fn Type* ()
|
||||
{
|
||||
return mem::new(Type);
|
||||
};
|
||||
}
|
||||
|
||||
/* #expect: foo.ll
|
||||
|
||||
define weak ptr @"foo.test{int}$lambda1"() #0 {
|
||||
entry:
|
||||
%0 = call ptr @std.core.mem.calloc(i64 4) #1
|
||||
ret ptr %0
|
||||
}
|
||||
Reference in New Issue
Block a user