From 83288ed7da4bdaffb4c53e8dfe1e63209f694d9c Mon Sep 17 00:00:00 2001 From: Marten/Qqwy Date: Sat, 25 Jun 2022 22:39:46 +0200 Subject: [PATCH] And also add it to the symbol.rs list --- compiler/module/src/symbol.rs | 1 + compiler/test_gen/src/gen_list.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/compiler/module/src/symbol.rs b/compiler/module/src/symbol.rs index 69abddf757..c3c6d67c33 100644 --- a/compiler/module/src/symbol.rs +++ b/compiler/module/src/symbol.rs @@ -1246,6 +1246,7 @@ define_builtins! { 56 LIST_SORT_DESC_COMPARE: "#sortDescCompare" 57 LIST_REPLACE: "replace" 58 LIST_IS_UNIQUE: "#isUnique" + 59 LIST_FIND_INDEX: "findIndex" } 5 RESULT: "Result" => { 0 RESULT_RESULT: "Result" // the Result.Result type alias diff --git a/compiler/test_gen/src/gen_list.rs b/compiler/test_gen/src/gen_list.rs index d1dd249a55..e0359cc67f 100644 --- a/compiler/test_gen/src/gen_list.rs +++ b/compiler/test_gen/src/gen_list.rs @@ -2888,7 +2888,7 @@ fn list_find_index() { r#" when List.findIndex ["a", "bc", "def"] (\s -> Str.countGraphemes s > 1) is Ok v -> v - Err _ -> "not found" + Err _ -> 999 "# ), 1, @@ -2904,11 +2904,11 @@ fn list_find_index_not_found() { r#" when List.findIndex ["a", "bc", "def"] (\s -> Str.countGraphemes s > 5) is Ok v -> v - Err _ -> "not found" + Err _ -> 999 "# ), - RocStr::from("not found"), - RocStr + 999, + i64 ); } @@ -2920,11 +2920,11 @@ fn list_find_index_empty_typed_list() { r#" when List.findIndex [] (\s -> Str.countGraphemes s > 5) is Ok v -> v - Err _ -> "not found" + Err _ -> 999 "# ), - RocStr::from("not found"), - RocStr + 999, + i64 ); }