fix(0127): namespaced generic calls type their result from the call's bindings
The plan producer's namespace-fn arms returned the declared return type
without checking type_params, so a qualified generic call's result
carried the unbound T stub: print boxed it as 'T{}', and a non-s64
binding failed LLVM verification (pack monomorphized for the stub,
call returning double). Both fn_ast_map-backed arms now classify
generic callees as generic_fn and infer the return through
inferGenericReturnType, mirroring the bare-identifier path.
This commit is contained in:
9
examples/0213-generics-namespaced-call-result/m.sx
Normal file
9
examples/0213-generics-namespaced-call-result/m.sx
Normal file
@@ -0,0 +1,9 @@
|
||||
#import "modules/std.sx";
|
||||
|
||||
pick :: (a: $T, b: T) -> T {
|
||||
if a > b then a else b
|
||||
}
|
||||
|
||||
double :: (x: $T) -> T {
|
||||
x + x
|
||||
}
|
||||
Reference in New Issue
Block a user