feat: 泛型基础设施 — <T>解析 + 类型推断 (单态化 codegen 待补)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
fn id<T>(x: T) -> T {
|
||||
return x;
|
||||
}
|
||||
|
||||
fn main() -> i64 {
|
||||
let a = id(42);
|
||||
print_i64(a); // 42
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user