mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Allow generics over distinct types #2216.
This commit is contained in:
23
test/test_suite/generic/generic_distinct.c3t
Normal file
23
test/test_suite/generic/generic_distinct.c3t
Normal file
@@ -0,0 +1,23 @@
|
||||
// #target: macos-x64
|
||||
module test;
|
||||
import test1;
|
||||
typedef Foo = int;
|
||||
|
||||
fn void main()
|
||||
{
|
||||
Foo $f = 1;
|
||||
test1::foo{$f}();
|
||||
}
|
||||
module test1 {FOO};
|
||||
|
||||
fn void foo() {}
|
||||
|
||||
/* #expect: test.ll
|
||||
|
||||
define void @test.main() #0 {
|
||||
entry:
|
||||
call void @"test1$test.Foo$1$.foo"()
|
||||
ret void
|
||||
}
|
||||
|
||||
declare extern_weak void @"test1$test.Foo$1$.foo"() #0
|
||||
Reference in New Issue
Block a user