mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Generic inference (#2475)
* Change generic symbol resolution.
* Infer generic parameters lhs -> rhs: `List{int} x = list::NOHEAP`.
* Regression: Compiler segfault when assigning struct literal with too few members #2483
This commit is contained in:
committed by
GitHub
parent
8342ac80d3
commit
92aefb15f8
@@ -78,11 +78,11 @@ fn void quicksort_with_lambda()
|
||||
}
|
||||
}
|
||||
|
||||
alias List = List{int};
|
||||
alias List2 = List{int};
|
||||
|
||||
fn void quicksort_list()
|
||||
{
|
||||
List list;
|
||||
List2 list;
|
||||
list.push_all({ 2, 1, 3});
|
||||
sort::quicksort(list, &sort::cmp_int_value);
|
||||
assert(check::int_sort(list.array_view()));
|
||||
|
||||
Reference in New Issue
Block a user