mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: disallow the array init: attr, when the len: attr is not provided (#16735)
This commit is contained in:
@@ -16,7 +16,7 @@ fn main() {
|
||||
// Breadth-First Search (BFS) allows you to find the shortest distance between two nodes in the graph.
|
||||
fn breadth_first_search_path(graph map[string][]string, vertex string, target string) []string {
|
||||
mut path := []string{}
|
||||
mut visited := []string{init: vertex}
|
||||
mut visited := []string{len: 6, init: vertex}
|
||||
mut queue := [][][]string{}
|
||||
queue << [[vertex], path]
|
||||
for queue.len > 0 {
|
||||
|
Reference in New Issue
Block a user