checker: fix generic fn with generic fn call returning generic map (fix #20106) (#20150)

This commit is contained in:
yuyi 2023-12-12 17:41:58 +08:00 committed by GitHub
parent d2fdbaf67e
commit 5d99138cb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 5 deletions

View file

@ -53,7 +53,7 @@ fn print_sol(dist []int) {
// to all other vertices using Bellman-Ford algorithm. The
// function also detects negative weight cycle
fn bellman_ford[T](graph [][]T, src int) {
mut edges := build_map_edges_from_graph(graph)
mut edges := build_map_edges_from_graph[int](graph)
// this function was done to adapt a graph representation
// by a adjacency matrix, to list of adjacency (using a MAP)
n_edges := edges.len // number of EDGES