diff --git a/Changelog.md b/Changelog.md index f282f5d2eac..3cd6418fc80 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,12 @@ # Motoko compiler changelog +## 0.11.2 (to come) + +* motoko (`moc`) + + * bugfix: Fix the detection of unused declarations in switch and catch cases (#4560). + * improvement: Only warn on unused identifiers if type checking is error-free (#4560). + ## 0.11.1 (2024-03-15) * motoko (`moc`) diff --git a/src/lang_utils/diag.ml b/src/lang_utils/diag.ml index 1bb236e13d2..ef716dc653f 100644 --- a/src/lang_utils/diag.ml +++ b/src/lang_utils/diag.ml @@ -57,7 +57,7 @@ let add_msgs s ms = s := List.rev ms @ !s let get_msgs s = List.rev !s let has_errors : messages -> bool = - List.fold_left (fun b msg -> b || msg.sev == Error) false + List.exists (fun msg -> msg.sev == Error) let string_of_message msg = let code = match msg.sev, msg.code with @@ -77,6 +77,8 @@ let print_message msg = let print_messages = List.iter print_message +let is_error_free (ms: msg_store) = not (has_errors (get_msgs ms)) + let with_message_store f = let s = ref [] in let r = f s in diff --git a/src/lang_utils/diag.mli b/src/lang_utils/diag.mli index 7175ee1a4d9..b9a98f43dbe 100644 --- a/src/lang_utils/diag.mli +++ b/src/lang_utils/diag.mli @@ -57,6 +57,7 @@ the reported messages contain an error. *) type msg_store +val is_error_free : msg_store -> bool val add_msg : msg_store -> message -> unit val add_msgs : msg_store -> messages -> unit val with_message_store : (msg_store -> 'a option) -> 'a result diff --git a/src/mo_frontend/typing.ml b/src/mo_frontend/typing.ml index cc818699b33..33fda02ff98 100644 --- a/src/mo_frontend/typing.ml +++ b/src/mo_frontend/typing.ml @@ -205,7 +205,7 @@ let ignore_warning_for_id id = false let detect_unused env inner_identifiers = - if env.check_unused then + if not env.pre && env.check_unused then T.Env.iter (fun id (_, at, kind) -> if (not (ignore_warning_for_id id)) && (is_unused_identifier env id) then add_unused_warning env (id, at, kind) @@ -1998,8 +1998,11 @@ and check_cases env t_pat t cases = and check_case env t_pat t case = let {pat; exp} = case.it in + let initial_usage = enter_scope env in let ve = check_pat env t_pat pat in - recover (check_exp (adjoin_vals env ve) t) exp + let t' = recover (check_exp (adjoin_vals env ve) t) exp in + leave_scope env ve initial_usage; + t' and inconsistent t ts = T.opaque t && not (List.exists T.opaque ts) @@ -2931,7 +2934,7 @@ let infer_prog scope pkg_opt async_cap prog : (T.typ * Scope.t) Diag.result = env0 with async = async_cap; } in let res = infer_block env prog.it prog.at true in - if pkg_opt = None then emit_unused_warnings env; + if pkg_opt = None && Diag.is_error_free msgs then emit_unused_warnings env; res ) prog ) @@ -3011,7 +3014,7 @@ let check_lib scope pkg_opt lib : Scope.t Diag.result = (* this shouldn't really happen, as an imported program should be rewritten to a module *) error env cub.at "M0000" "compiler bug: expected a module or actor class but found a program, i.e. a sequence of declarations" in - if pkg_opt = None then emit_unused_warnings env; + if pkg_opt = None && Diag.is_error_free msgs then emit_unused_warnings env; Scope.lib lib.note.filename imp_typ ) lib ) diff --git a/test/run-drun/ignore-unused-actor-identifier.mo b/test/fail/ignore-unused-actor-identifier.mo similarity index 100% rename from test/run-drun/ignore-unused-actor-identifier.mo rename to test/fail/ignore-unused-actor-identifier.mo diff --git a/test/fail/ok/M0127.tc.ok b/test/fail/ok/M0127.tc.ok index 29b4943a89c..371d808a957 100644 --- a/test/fail/ok/M0127.tc.ok +++ b/test/fail/ok/M0127.tc.ok @@ -2,4 +2,3 @@ M0127.mo:2.3-2.40: type error [M0127], system function preupgrade is declared wi Bool -> () instead of expected type () -> () -M0127.mo:2.26-2.29: warning [M0194], unused identifier foo (delete or rename to wildcard `_` or `_foo`) diff --git a/test/fail/ok/abstract-msgs.tc.ok b/test/fail/ok/abstract-msgs.tc.ok index f3a1d965212..b42a3764525 100644 --- a/test/fail/ok/abstract-msgs.tc.ok +++ b/test/fail/ok/abstract-msgs.tc.ok @@ -14,8 +14,3 @@ abstract-msgs.mo:16.34-16.35: type error [M0031], shared function has non-shared A__16 abstract-msgs.mo:17.27-17.47: type error [M0032], shared function has non-shared return type A__17 -abstract-msgs.mo:2.33-2.34: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -abstract-msgs.mo:4.11-4.14: warning [M0194], unused identifier foo (delete or rename to wildcard `_` or `_foo`) -abstract-msgs.mo:5.25-5.26: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -abstract-msgs.mo:23.38-23.41: warning [M0194], unused identifier bar (delete or rename to wildcard `_` or `_bar`) -abstract-msgs.mo:23.42-23.43: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) diff --git a/test/fail/ok/argument-subtyping.tc.ok b/test/fail/ok/argument-subtyping.tc.ok index 33265369905..45b976b6617 100644 --- a/test/fail/ok/argument-subtyping.tc.ok +++ b/test/fail/ok/argument-subtyping.tc.ok @@ -2,7 +2,3 @@ argument-subtyping.mo:12.61-12.62: type error [M0096], expression of type shared Nat -> () cannot produce expected type shared Text -> () -argument-subtyping.mo:2.11-2.14: warning [M0194], unused identifier foo (delete or rename to wildcard `_` or `_foo`) -argument-subtyping.mo:5.11-5.14: warning [M0194], unused identifier foo (delete or rename to wildcard `_` or `_foo`) -argument-subtyping.mo:8.11-8.14: warning [M0194], unused identifier foo (delete or rename to wildcard `_` or `_foo`) -argument-subtyping.mo:9.11-9.14: warning [M0194], unused identifier foo (delete or rename to wildcard `_` or `_foo`) diff --git a/test/fail/ok/asyncret2.tc.ok b/test/fail/ok/asyncret2.tc.ok index a1ccca0cacd..dda875dd99e 100644 --- a/test/fail/ok/asyncret2.tc.ok +++ b/test/fail/ok/asyncret2.tc.ok @@ -2,4 +2,3 @@ asyncret2.mo:1.54-1.57: type error [M0096], expression of type async<$call3> Int cannot produce expected type Int -asyncret2.mo:1.6-1.11: warning [M0194], unused identifier call3 (delete or rename to wildcard `_` or `_call3`) diff --git a/test/fail/ok/bad-async-sort.tc.ok b/test/fail/ok/bad-async-sort.tc.ok index aac413f2e41..7012cfa0cce 100644 --- a/test/fail/ok/bad-async-sort.tc.ok +++ b/test/fail/ok/bad-async-sort.tc.ok @@ -16,7 +16,3 @@ Use keyword 'async*' (not 'async') to produce the expected type. bad-async-sort.mo:23.14-23.23: type error [M0183], async expression cannot produce expected async type async<$anon4> (). Use keyword 'async' (not 'async*') to produce the expected type. -bad-async-sort.mo:10.8-10.13: warning [M0194], unused identifier anon1 (delete or rename to wildcard `_` or `_anon1`) -bad-async-sort.mo:14.8-14.13: warning [M0194], unused identifier anon2 (delete or rename to wildcard `_` or `_anon2`) -bad-async-sort.mo:18.8-18.13: warning [M0194], unused identifier anon3 (delete or rename to wildcard `_` or `_anon3`) -bad-async-sort.mo:22.8-22.13: warning [M0194], unused identifier anon4 (delete or rename to wildcard `_` or `_anon4`) diff --git a/test/fail/ok/bad-unops.tc.ok b/test/fail/ok/bad-unops.tc.ok index d3a8be72de7..7535da1e76f 100644 --- a/test/fail/ok/bad-unops.tc.ok +++ b/test/fail/ok/bad-unops.tc.ok @@ -15,7 +15,3 @@ bad-unops.mo:6.20-6.22: type error [M0111], operator pattern cannot consume expe bad-unops.mo:8.20-8.22: warning [M0146], this pattern is never matched bad-unops.mo:10.21-10.23: type error [M0111], operator pattern cannot consume expected type Int -bad-unops.mo:1.5-1.6: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) -bad-unops.mo:2.5-2.6: warning [M0194], unused identifier b (delete or rename to wildcard `_` or `_b`) -bad-unops.mo:3.5-3.6: warning [M0194], unused identifier c (delete or rename to wildcard `_` or `_c`) -bad-unops.mo:4.5-4.6: warning [M0194], unused identifier d (delete or rename to wildcard `_` or `_d`) diff --git a/test/fail/ok/bang-fail.tc.ok b/test/fail/ok/bang-fail.tc.ok index de6ff28d89c..2f6525e532e 100644 --- a/test/fail/ok/bang-fail.tc.ok +++ b/test/fail/ok/bang-fail.tc.ok @@ -12,8 +12,3 @@ bang-fail.mo:18.17-18.19: type error [M0096], expression of type () cannot produce expected type Nat -bang-fail.mo:1.6-1.12: warning [M0194], unused identifier wrong1 (delete or rename to wildcard `_` or `_wrong1`) -bang-fail.mo:5.6-5.12: warning [M0194], unused identifier wrong2 (delete or rename to wildcard `_` or `_wrong2`) -bang-fail.mo:9.6-9.12: warning [M0194], unused identifier wrong3 (delete or rename to wildcard `_` or `_wrong3`) -bang-fail.mo:13.6-13.12: warning [M0194], unused identifier wrong4 (delete or rename to wildcard `_` or `_wrong4`) -bang-fail.mo:17.6-17.12: warning [M0194], unused identifier wrong5 (delete or rename to wildcard `_` or `_wrong5`) diff --git a/test/fail/ok/bounds-mismatch.tc.ok b/test/fail/ok/bounds-mismatch.tc.ok index d4c2e647e44..ee5f86b2b19 100644 --- a/test/fail/ok/bounds-mismatch.tc.ok +++ b/test/fail/ok/bounds-mismatch.tc.ok @@ -66,19 +66,3 @@ cannot produce expected type bounds-mismatch.mo:125.21-128.4: warning [M0074], this array has type [Any] because elements have inconsistent types -bounds-mismatch.mo:2.10-2.11: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -bounds-mismatch.mo:7.10-7.11: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -bounds-mismatch.mo:12.10-12.11: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -bounds-mismatch.mo:17.10-17.11: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -bounds-mismatch.mo:22.10-22.11: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -bounds-mismatch.mo:27.10-27.11: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -bounds-mismatch.mo:32.10-32.11: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -bounds-mismatch.mo:37.10-37.11: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -bounds-mismatch.mo:75.6-75.7: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -bounds-mismatch.mo:81.6-81.7: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -bounds-mismatch.mo:87.6-87.7: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -bounds-mismatch.mo:93.6-93.7: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -bounds-mismatch.mo:99.6-99.7: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -bounds-mismatch.mo:106.6-106.7: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -bounds-mismatch.mo:126.41-126.42: warning [M0194], unused identifier b (delete or rename to wildcard `_` or `_b`) -bounds-mismatch.mo:127.41-127.42: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) diff --git a/test/fail/ok/check-record.tc.ok b/test/fail/ok/check-record.tc.ok index 30be9fa2423..073732b8790 100644 --- a/test/fail/ok/check-record.tc.ok +++ b/test/fail/ok/check-record.tc.ok @@ -14,5 +14,3 @@ check-record.mo:24.9-24.27: type error [M0096], expression of type {a : Nat} cannot produce expected type {b : Nat} -check-record.mo:6.5-6.6: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) -check-record.mo:20.7-20.8: warning [M0194], unused identifier b (delete or rename to wildcard `_` or `_b`) diff --git a/test/fail/ok/const-var-array.tc.ok b/test/fail/ok/const-var-array.tc.ok index 4a4022823f6..ef87c4c77c5 100644 --- a/test/fail/ok/const-var-array.tc.ok +++ b/test/fail/ok/const-var-array.tc.ok @@ -1,3 +1,2 @@ const-var-array.mo:1.17-1.22: type error [M0091], mutable array expression cannot produce expected type [Nat] -const-var-array.mo:1.5-1.6: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) diff --git a/test/fail/ok/const-var-field.tc.ok b/test/fail/ok/const-var-field.tc.ok index d34989196c8..0e1d0a88dca 100644 --- a/test/fail/ok/const-var-field.tc.ok +++ b/test/fail/ok/const-var-field.tc.ok @@ -2,4 +2,3 @@ const-var-field.mo:1.21-1.48: type error [M0096], expression of type {var x : Nat} cannot produce expected type {x : Nat} -const-var-field.mo:1.5-1.6: warning [M0194], unused identifier o (delete or rename to wildcard `_` or `_o`) diff --git a/test/fail/ok/f-bounds-fail.tc.ok b/test/fail/ok/f-bounds-fail.tc.ok index 13cad21c683..ef6436ba0fe 100644 --- a/test/fail/ok/f-bounds-fail.tc.ok +++ b/test/fail/ok/f-bounds-fail.tc.ok @@ -174,30 +174,3 @@ f-bounds-fail.mo:82.26-82.27: type error [M0096], expression of type B__13 cannot produce expected type C__9 -f-bounds-fail.mo:3.5-3.6: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -f-bounds-fail.mo:5.6-5.9: warning [M0194], unused identifier f2a (delete or rename to wildcard `_` or `_f2a`) -f-bounds-fail.mo:7.6-7.9: warning [M0194], unused identifier f2b (delete or rename to wildcard `_` or `_f2b`) -f-bounds-fail.mo:9.6-9.9: warning [M0194], unused identifier f3a (delete or rename to wildcard `_` or `_f3a`) -f-bounds-fail.mo:10.6-10.9: warning [M0194], unused identifier f3b (delete or rename to wildcard `_` or `_f3b`) -f-bounds-fail.mo:11.6-11.9: warning [M0194], unused identifier f3c (delete or rename to wildcard `_` or `_f3c`) -f-bounds-fail.mo:45.6-45.8: warning [M0194], unused identifier u0 (delete or rename to wildcard `_` or `_u0`) -f-bounds-fail.mo:46.6-46.8: warning [M0194], unused identifier u1 (delete or rename to wildcard `_` or `_u1`) -f-bounds-fail.mo:47.6-47.8: warning [M0194], unused identifier u2 (delete or rename to wildcard `_` or `_u2`) -f-bounds-fail.mo:48.6-48.8: warning [M0194], unused identifier u3 (delete or rename to wildcard `_` or `_u3`) -f-bounds-fail.mo:49.6-49.8: warning [M0194], unused identifier u4 (delete or rename to wildcard `_` or `_u4`) -f-bounds-fail.mo:50.6-50.8: warning [M0194], unused identifier u5 (delete or rename to wildcard `_` or `_u5`) -f-bounds-fail.mo:51.6-51.8: warning [M0194], unused identifier u6 (delete or rename to wildcard `_` or `_u6`) -f-bounds-fail.mo:53.6-53.8: warning [M0194], unused identifier v0 (delete or rename to wildcard `_` or `_v0`) -f-bounds-fail.mo:54.6-54.8: warning [M0194], unused identifier v1 (delete or rename to wildcard `_` or `_v1`) -f-bounds-fail.mo:55.6-55.8: warning [M0194], unused identifier v2 (delete or rename to wildcard `_` or `_v2`) -f-bounds-fail.mo:56.6-56.8: warning [M0194], unused identifier v3 (delete or rename to wildcard `_` or `_v3`) -f-bounds-fail.mo:57.6-57.8: warning [M0194], unused identifier v4 (delete or rename to wildcard `_` or `_v4`) -f-bounds-fail.mo:58.6-58.8: warning [M0194], unused identifier v5 (delete or rename to wildcard `_` or `_v5`) -f-bounds-fail.mo:59.6-59.8: warning [M0194], unused identifier v6 (delete or rename to wildcard `_` or `_v6`) -f-bounds-fail.mo:61.6-61.8: warning [M0194], unused identifier w0 (delete or rename to wildcard `_` or `_w0`) -f-bounds-fail.mo:62.6-62.8: warning [M0194], unused identifier w1 (delete or rename to wildcard `_` or `_w1`) -f-bounds-fail.mo:63.6-63.8: warning [M0194], unused identifier w2 (delete or rename to wildcard `_` or `_w2`) -f-bounds-fail.mo:64.6-64.8: warning [M0194], unused identifier w3 (delete or rename to wildcard `_` or `_w3`) -f-bounds-fail.mo:65.6-65.8: warning [M0194], unused identifier w4 (delete or rename to wildcard `_` or `_w4`) -f-bounds-fail.mo:66.6-66.8: warning [M0194], unused identifier w5 (delete or rename to wildcard `_` or `_w5`) -f-bounds-fail.mo:67.6-67.8: warning [M0194], unused identifier w6 (delete or rename to wildcard `_` or `_w6`) diff --git a/test/fail/ok/inference.tc.ok b/test/fail/ok/inference.tc.ok index 07deb617b2d..93545774329 100644 --- a/test/fail/ok/inference.tc.ok +++ b/test/fail/ok/inference.tc.ok @@ -155,19 +155,3 @@ because no instantiation of T__117 makes {type x = Nat} <: {x : T__117} inference.mo:183.8-183.21: type error [M0045], wrong number of type arguments: expected 2 but got 0 inference.mo:186.8-186.15: type error [M0045], wrong number of type arguments: expected 1 but got 0 -inference.mo:11.14-11.15: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -inference.mo:51.6-51.11: warning [M0194], unused identifier mult1 (delete or rename to wildcard `_` or `_mult1`) -inference.mo:53.6-53.11: warning [M0194], unused identifier mult2 (delete or rename to wildcard `_` or `_mult2`) -inference.mo:56.16-56.17: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -inference.mo:75.19-75.20: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) -inference.mo:88.23-88.24: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) -inference.mo:89.23-89.24: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) -inference.mo:90.23-90.24: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) -inference.mo:135.6-135.7: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -inference.mo:136.20-136.21: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) -inference.mo:140.6-140.7: warning [M0194], unused identifier h (delete or rename to wildcard `_` or `_h`) -inference.mo:141.20-141.21: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) -inference.mo:145.6-145.7: warning [M0194], unused identifier i (delete or rename to wildcard `_` or `_i`) -inference.mo:150.6-150.7: warning [M0194], unused identifier j (delete or rename to wildcard `_` or `_j`) -inference.mo:155.6-155.7: warning [M0194], unused identifier k (delete or rename to wildcard `_` or `_k`) -inference.mo:180.19-180.20: warning [M0194], unused identifier u (delete or rename to wildcard `_` or `_u`) diff --git a/test/fail/ok/issue-3318.tc.ok b/test/fail/ok/issue-3318.tc.ok index 736f0399615..3e7d42ba5e1 100644 --- a/test/fail/ok/issue-3318.tc.ok +++ b/test/fail/ok/issue-3318.tc.ok @@ -22,16 +22,3 @@ issue-3318.mo:33.43-33.44: type error [M0096], expression of type (Nat, Nat) -> ((Nat, Nat)) cannot produce expected type ((Nat, Nat)) -> ((Nat, Nat)) -issue-3318.mo:2.13-2.14: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -issue-3318.mo:11.6-11.8: warning [M0194], unused identifier t0 (delete or rename to wildcard `_` or `_t0`) -issue-3318.mo:14.6-14.8: warning [M0194], unused identifier t1 (delete or rename to wildcard `_` or `_t1`) -issue-3318.mo:17.6-17.8: warning [M0194], unused identifier t2 (delete or rename to wildcard `_` or `_t2`) -issue-3318.mo:20.6-20.8: warning [M0194], unused identifier t3 (delete or rename to wildcard `_` or `_t3`) -issue-3318.mo:23.6-23.8: warning [M0194], unused identifier t4 (delete or rename to wildcard `_` or `_t4`) -issue-3318.mo:26.6-26.8: warning [M0194], unused identifier t5 (delete or rename to wildcard `_` or `_t5`) -issue-3318.mo:29.6-29.8: warning [M0194], unused identifier t6 (delete or rename to wildcard `_` or `_t6`) -issue-3318.mo:32.6-32.8: warning [M0194], unused identifier t7 (delete or rename to wildcard `_` or `_t7`) -issue-3318.mo:35.6-35.8: warning [M0194], unused identifier t8 (delete or rename to wildcard `_` or `_t8`) -issue-3318.mo:40.6-40.8: warning [M0194], unused identifier u0 (delete or rename to wildcard `_` or `_u0`) -issue-3318.mo:42.6-42.8: warning [M0194], unused identifier u1 (delete or rename to wildcard `_` or `_u1`) -issue-3318.mo:44.6-44.8: warning [M0194], unused identifier u2 (delete or rename to wildcard `_` or `_u2`) diff --git a/test/fail/ok/issue2062.tc.ok b/test/fail/ok/issue2062.tc.ok index 76e71a03f53..74e39a2d498 100644 --- a/test/fail/ok/issue2062.tc.ok +++ b/test/fail/ok/issue2062.tc.ok @@ -2,4 +2,3 @@ issue2062.mo:2.3-3.11: type error [M0096], expression of type () cannot produce expected type Nat -issue2062.mo:1.6-1.9: warning [M0194], unused identifier fac (delete or rename to wildcard `_` or `_fac`) diff --git a/test/fail/ok/missing-semi.tc.ok b/test/fail/ok/missing-semi.tc.ok index cff52fc4c5d..a529ed7468d 100644 --- a/test/fail/ok/missing-semi.tc.ok +++ b/test/fail/ok/missing-semi.tc.ok @@ -4,4 +4,3 @@ missing-semi.mo:3.5-4.1: info, this looks like an unintended function call, perh missing-semi.mo:9.3-9.7: type error [M0097], expected function type, but expression produces type () missing-semi.mo:9.7-10.3: info, this looks like an unintended function call, perhaps a missing ';'? -missing-semi.mo:7.6-7.7: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) diff --git a/test/fail/ok/non_static_module.tc.ok b/test/fail/ok/non_static_module.tc.ok index c091bc5a33e..48ff8b1d088 100644 --- a/test/fail/ok/non_static_module.tc.ok +++ b/test/fail/ok/non_static_module.tc.ok @@ -10,13 +10,3 @@ non_static_module.mo:11.4-11.13: type error [M0014], non-static expression in li non_static_module.mo:20.12-20.15: type error [M0014], non-static expression in library or module non_static_module.mo:21.12-21.19: type error [M0014], non-static expression in library or module non_static_module.mo:22.4-22.13: type error [M0014], non-static expression in library or module -non_static_module.mo:5.7-5.8: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -non_static_module.mo:6.7-6.8: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) -non_static_module.mo:8.10-8.16: warning [M0194], unused identifier WrongO (delete or rename to wildcard `_` or `_WrongO`) -non_static_module.mo:11.8-11.9: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -non_static_module.mo:14.10-14.13: warning [M0194], unused identifier OkO (delete or rename to wildcard `_` or `_OkO`) -non_static_module.mo:16.9-16.10: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) -non_static_module.mo:19.10-19.16: warning [M0194], unused identifier WrongM (delete or rename to wildcard `_` or `_WrongM`) -non_static_module.mo:22.8-22.9: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -non_static_module.mo:25.10-25.13: warning [M0194], unused identifier OkM (delete or rename to wildcard `_` or `_OkM`) -non_static_module.mo:27.9-27.10: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) diff --git a/test/fail/ok/object-ext-poly.tc.ok b/test/fail/ok/object-ext-poly.tc.ok index 4597ad176c1..cf5bee5afec 100644 --- a/test/fail/ok/object-ext-poly.tc.ok +++ b/test/fail/ok/object-ext-poly.tc.ok @@ -2,4 +2,3 @@ object-ext-poly.mo:2.5-2.32: type error [M0096], expression of type {a : Int; b : Char; c : Text} cannot produce expected type A__9 -object-ext-poly.mo:1.6-1.9: warning [M0194], unused identifier mix (delete or rename to wildcard `_` or `_mix`) diff --git a/test/fail/ok/objpat-infer.tc.ok b/test/fail/ok/objpat-infer.tc.ok index 87c84e02530..1fd72842ae3 100644 --- a/test/fail/ok/objpat-infer.tc.ok +++ b/test/fail/ok/objpat-infer.tc.ok @@ -20,4 +20,3 @@ objpat-infer.mo:35.15-35.23: type error [M0096], expression of type actor {} cannot produce expected type {} -objpat-infer.mo:17.17-17.18: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) diff --git a/test/fail/ok/one-tuple-ambiguity.tc.ok b/test/fail/ok/one-tuple-ambiguity.tc.ok index 8cad8fb30cc..f0810e0998e 100644 --- a/test/fail/ok/one-tuple-ambiguity.tc.ok +++ b/test/fail/ok/one-tuple-ambiguity.tc.ok @@ -2,5 +2,3 @@ one-tuple-ambiguity.mo:16.3-16.5: type error [M0050], literal of type Nat does not have expected type (Nat, Bool) -one-tuple-ambiguity.mo:13.9-13.10: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) -one-tuple-ambiguity.mo:13.18-13.19: warning [M0194], unused identifier b (delete or rename to wildcard `_` or `_b`) diff --git a/test/fail/ok/pat-inconsistent.tc.ok b/test/fail/ok/pat-inconsistent.tc.ok index 883bad81183..3de534f9340 100644 --- a/test/fail/ok/pat-inconsistent.tc.ok +++ b/test/fail/ok/pat-inconsistent.tc.ok @@ -12,4 +12,3 @@ pat-inconsistent.mo:58.1-60.2: warning [M0145], this switch of type does not cover value #sparrows pat-inconsistent.mo:64.10-64.18: warning [M0146], this pattern is never matched -pat-inconsistent.mo:62.6-62.12: warning [M0194], unused identifier absurd (delete or rename to wildcard `_` or `_absurd`) diff --git a/test/fail/ok/pat-subtyping-fail.tc.ok b/test/fail/ok/pat-subtyping-fail.tc.ok index 734b4d391dc..6a8aec8da30 100644 --- a/test/fail/ok/pat-subtyping-fail.tc.ok +++ b/test/fail/ok/pat-subtyping-fail.tc.ok @@ -114,11 +114,3 @@ pat-subtyping-fail.mo:162.11-162.35: type error [M0096], expression of type Nat -> () cannot produce expected type Int -> () -pat-subtyping-fail.mo:129.8-129.9: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -pat-subtyping-fail.mo:129.10-129.11: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -pat-subtyping-fail.mo:153.16-153.17: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -pat-subtyping-fail.mo:153.18-153.19: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -pat-subtyping-fail.mo:156.16-156.17: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -pat-subtyping-fail.mo:156.18-156.19: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -pat-subtyping-fail.mo:162.16-162.17: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -pat-subtyping-fail.mo:162.18-162.19: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) diff --git a/test/fail/ok/pretty-inference.tc.ok b/test/fail/ok/pretty-inference.tc.ok index f8443f1fbf4..e7dddc07fc2 100644 --- a/test/fail/ok/pretty-inference.tc.ok +++ b/test/fail/ok/pretty-inference.tc.ok @@ -250,7 +250,3 @@ because no instantiation of T__47, U__17 makes (T__47, U__17) and Nat <: () -pretty-inference.mo:11.17-11.18: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -pretty-inference.mo:26.30-26.31: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -pretty-inference.mo:40.14-40.15: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -pretty-inference.mo:40.20-40.21: warning [M0194], unused identifier u (delete or rename to wildcard `_` or `_u`) diff --git a/test/fail/ok/pretty.tc.ok b/test/fail/ok/pretty.tc.ok index 24778d1af00..d17d5ce522e 100644 --- a/test/fail/ok/pretty.tc.ok +++ b/test/fail/ok/pretty.tc.ok @@ -467,8 +467,3 @@ pretty.mo:145.4-145.6: type error [M0096], expression of type } cannot produce expected type () -pretty.mo:22.6-22.7: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -pretty.mo:24.6-24.7: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) -pretty.mo:26.6-26.7: warning [M0194], unused identifier h (delete or rename to wildcard `_` or `_h`) -pretty.mo:28.6-28.7: warning [M0194], unused identifier i (delete or rename to wildcard `_` or `_i`) -pretty.mo:135.21-135.22: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) diff --git a/test/fail/ok/prim-in-source.tc.ok b/test/fail/ok/prim-in-source.tc.ok index 805215a6ebd..58521aa2c57 100644 --- a/test/fail/ok/prim-in-source.tc.ok +++ b/test/fail/ok/prim-in-source.tc.ok @@ -1,2 +1 @@ prim-in-source.mo:1.22-1.26: type error [M0057], unbound variable prim -prim-in-source.mo:1.5-1.6: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) diff --git a/test/fail/ok/shared-nonexhaustive.tc.ok b/test/fail/ok/shared-nonexhaustive.tc.ok index 302b569f843..fbaf894d463 100644 --- a/test/fail/ok/shared-nonexhaustive.tc.ok +++ b/test/fail/ok/shared-nonexhaustive.tc.ok @@ -18,7 +18,3 @@ shared-nonexhaustive.mo:9.21-9.34: type error [M0145], this pattern of type Bool does not cover value false -shared-nonexhaustive.mo:3.13-3.19: warning [M0194], unused identifier wrong1 (delete or rename to wildcard `_` or `_wrong1`) -shared-nonexhaustive.mo:5.15-5.21: warning [M0194], unused identifier wrong2 (delete or rename to wildcard `_` or `_wrong2`) -shared-nonexhaustive.mo:7.13-7.19: warning [M0194], unused identifier wrong2 (delete or rename to wildcard `_` or `_wrong2`) -shared-nonexhaustive.mo:9.15-9.21: warning [M0194], unused identifier wrong2 (delete or rename to wildcard `_` or `_wrong2`) diff --git a/test/fail/ok/structural_equality.tc.ok b/test/fail/ok/structural_equality.tc.ok index 577d75947ba..9106e69fdfd 100644 --- a/test/fail/ok/structural_equality.tc.ok +++ b/test/fail/ok/structural_equality.tc.ok @@ -32,5 +32,3 @@ and B at common supertype Any -structural_equality.mo:12.6-12.10: warning [M0194], unused identifier myEq (delete or rename to wildcard `_` or `_myEq`) -structural_equality.mo:13.6-13.11: warning [M0194], unused identifier myEq2 (delete or rename to wildcard `_` or `_myEq2`) diff --git a/test/fail/ok/typed-labels.tc.ok b/test/fail/ok/typed-labels.tc.ok index c7343bc5f51..97bab818a60 100644 --- a/test/fail/ok/typed-labels.tc.ok +++ b/test/fail/ok/typed-labels.tc.ok @@ -28,23 +28,3 @@ typed-labels.mo:24.24-24.64: type error [M0096], expression of type cannot produce expected type Nat typed-labels.mo:25.33-25.34: type error [M0083], unbound label c -typed-labels.mo:3.5-3.7: warning [M0194], unused identifier a0 (delete or rename to wildcard `_` or `_a0`) -typed-labels.mo:4.5-4.7: warning [M0194], unused identifier b0 (delete or rename to wildcard `_` or `_b0`) -typed-labels.mo:5.5-5.7: warning [M0194], unused identifier c0 (delete or rename to wildcard `_` or `_c0`) -typed-labels.mo:6.5-6.7: warning [M0194], unused identifier d0 (delete or rename to wildcard `_` or `_d0`) -typed-labels.mo:7.5-7.7: warning [M0194], unused identifier e0 (delete or rename to wildcard `_` or `_e0`) -typed-labels.mo:9.5-9.7: warning [M0194], unused identifier a1 (delete or rename to wildcard `_` or `_a1`) -typed-labels.mo:10.5-10.7: warning [M0194], unused identifier b1 (delete or rename to wildcard `_` or `_b1`) -typed-labels.mo:11.5-11.7: warning [M0194], unused identifier c1 (delete or rename to wildcard `_` or `_c1`) -typed-labels.mo:12.5-12.7: warning [M0194], unused identifier d1 (delete or rename to wildcard `_` or `_d1`) -typed-labels.mo:13.5-13.7: warning [M0194], unused identifier e1 (delete or rename to wildcard `_` or `_e1`) -typed-labels.mo:15.5-15.7: warning [M0194], unused identifier a2 (delete or rename to wildcard `_` or `_a2`) -typed-labels.mo:16.5-16.7: warning [M0194], unused identifier b2 (delete or rename to wildcard `_` or `_b2`) -typed-labels.mo:17.5-17.7: warning [M0194], unused identifier c2 (delete or rename to wildcard `_` or `_c2`) -typed-labels.mo:18.5-18.7: warning [M0194], unused identifier d2 (delete or rename to wildcard `_` or `_d2`) -typed-labels.mo:19.5-19.7: warning [M0194], unused identifier e2 (delete or rename to wildcard `_` or `_e2`) -typed-labels.mo:21.5-21.7: warning [M0194], unused identifier a3 (delete or rename to wildcard `_` or `_a3`) -typed-labels.mo:22.5-22.7: warning [M0194], unused identifier b3 (delete or rename to wildcard `_` or `_b3`) -typed-labels.mo:23.5-23.7: warning [M0194], unused identifier c3 (delete or rename to wildcard `_` or `_c3`) -typed-labels.mo:24.5-24.7: warning [M0194], unused identifier d3 (delete or rename to wildcard `_` or `_d3`) -typed-labels.mo:25.5-25.7: warning [M0194], unused identifier e3 (delete or rename to wildcard `_` or `_e3`) diff --git a/test/run-drun/ok/unused-actor-class.tc.ok b/test/fail/ok/unused-actor-class.tc.ok similarity index 100% rename from test/run-drun/ok/unused-actor-class.tc.ok rename to test/fail/ok/unused-actor-class.tc.ok diff --git a/test/run-drun/ok/unused-actor-fields.tc.ok b/test/fail/ok/unused-actor-fields.tc.ok similarity index 100% rename from test/run-drun/ok/unused-actor-fields.tc.ok rename to test/fail/ok/unused-actor-fields.tc.ok diff --git a/test/run/ok/unused-class.tc.ok b/test/fail/ok/unused-class.tc.ok similarity index 100% rename from test/run/ok/unused-class.tc.ok rename to test/fail/ok/unused-class.tc.ok diff --git a/test/fail/ok/unused-exception.tc.ok b/test/fail/ok/unused-exception.tc.ok new file mode 100644 index 00000000000..ea3d56553ff --- /dev/null +++ b/test/fail/ok/unused-exception.tc.ok @@ -0,0 +1 @@ +unused-exception.mo:3.24-3.33: warning [M0194], unused identifier exception (delete or rename to wildcard `_` or `_exception`) diff --git a/test/fail/ok/unused-false-positive.tc.ok b/test/fail/ok/unused-false-positive.tc.ok new file mode 100644 index 00000000000..c375c3e5176 --- /dev/null +++ b/test/fail/ok/unused-false-positive.tc.ok @@ -0,0 +1 @@ +unused-false-positive.mo:4.16-4.17: type error [M0057], unbound variable d diff --git a/test/fail/ok/unused-false-positive.tc.ret.ok b/test/fail/ok/unused-false-positive.tc.ret.ok new file mode 100644 index 00000000000..69becfa16f9 --- /dev/null +++ b/test/fail/ok/unused-false-positive.tc.ret.ok @@ -0,0 +1 @@ +Return code 1 diff --git a/test/run/ok/unused-field-pattern.tc.ok b/test/fail/ok/unused-field-pattern.tc.ok similarity index 100% rename from test/run/ok/unused-field-pattern.tc.ok rename to test/fail/ok/unused-field-pattern.tc.ok diff --git a/test/run-drun/ok/unused-import.tc.ok b/test/fail/ok/unused-import.tc.ok similarity index 100% rename from test/run-drun/ok/unused-import.tc.ok rename to test/fail/ok/unused-import.tc.ok diff --git a/test/run/ok/unused-module-identifier.tc.ok b/test/fail/ok/unused-module-identifier.tc.ok similarity index 100% rename from test/run/ok/unused-module-identifier.tc.ok rename to test/fail/ok/unused-module-identifier.tc.ok diff --git a/test/run-drun/ok/unused-module.tc.ok b/test/fail/ok/unused-module.tc.ok similarity index 100% rename from test/run-drun/ok/unused-module.tc.ok rename to test/fail/ok/unused-module.tc.ok diff --git a/test/run/ok/unused-object.tc.ok b/test/fail/ok/unused-object.tc.ok similarity index 100% rename from test/run/ok/unused-object.tc.ok rename to test/fail/ok/unused-object.tc.ok diff --git a/test/fail/ok/unused-parameter.tc.ok b/test/fail/ok/unused-parameter.tc.ok new file mode 100644 index 00000000000..08dce6b93b8 --- /dev/null +++ b/test/fail/ok/unused-parameter.tc.ok @@ -0,0 +1,2 @@ +unused-parameter.mo:1.6-1.10: warning [M0194], unused identifier test (delete or rename to wildcard `_` or `_test`) +unused-parameter.mo:1.11-1.16: warning [M0194], unused identifier param (delete or rename to wildcard `_` or `_param`) diff --git a/test/run/ok/unused-shadowing.tc.ok b/test/fail/ok/unused-shadowing.tc.ok similarity index 100% rename from test/run/ok/unused-shadowing.tc.ok rename to test/fail/ok/unused-shadowing.tc.ok diff --git a/test/run/ok/unused-switch-case.tc.ok b/test/fail/ok/unused-switch-case.tc.ok similarity index 100% rename from test/run/ok/unused-switch-case.tc.ok rename to test/fail/ok/unused-switch-case.tc.ok diff --git a/test/fail/ok/unused-switch-in-catch.tc.ok b/test/fail/ok/unused-switch-in-catch.tc.ok new file mode 100644 index 00000000000..a78dcca1876 --- /dev/null +++ b/test/fail/ok/unused-switch-in-catch.tc.ok @@ -0,0 +1 @@ +unused-switch-in-catch.mo:5.22-5.28: warning [M0194], unused identifier unused (delete or rename to wildcard `_` or `_unused`) diff --git a/test/run/ok/unused-top-level-identifiers.tc.ok b/test/fail/ok/unused-top-level-identifiers.tc.ok similarity index 100% rename from test/run/ok/unused-top-level-identifiers.tc.ok rename to test/fail/ok/unused-top-level-identifiers.tc.ok diff --git a/test/fail/ok/unused.tc.ok b/test/fail/ok/unused.tc.ok index 183c85edb82..80df6352cc8 100644 --- a/test/fail/ok/unused.tc.ok +++ b/test/fail/ok/unused.tc.ok @@ -5,5 +5,7 @@ unused.mo:9.9-9.15: warning [M0194], unused identifier unused (delete or rename unused.mo:11.6-11.7: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) unused.mo:11.8-11.9: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) unused.mo:15.5-15.8: warning [M0194], unused identifier hmm (delete or rename to wildcard `_` or `_hmm`) +unused.mo:23.10-23.11: warning [M0194], unused identifier u (delete or rename to wildcard `_` or `_u`) +unused.mo:24.8-24.9: warning [M0194], unused identifier o (delete or rename to wildcard `_` or `_o`) unused.mo:32.5-32.6: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) unused.mo:32.29-32.30: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) diff --git a/test/fail/ok/var-const-array.tc.ok b/test/fail/ok/var-const-array.tc.ok index cfa9db68708..ff75be50a38 100644 --- a/test/fail/ok/var-const-array.tc.ok +++ b/test/fail/ok/var-const-array.tc.ok @@ -1,3 +1,2 @@ var-const-array.mo:1.21-1.23: type error [M0091], immutable array expression cannot produce expected type [var Nat] -var-const-array.mo:1.5-1.6: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) diff --git a/test/fail/ok/variance.tc.ok b/test/fail/ok/variance.tc.ok index 09d938fa18a..935fc0f7258 100644 --- a/test/fail/ok/variance.tc.ok +++ b/test/fail/ok/variance.tc.ok @@ -43,11 +43,3 @@ because implicit instantiation of type parameter A is under-constrained with where None =/= Any so that explicit type instantiation is required -variance.mo:16.7-16.8: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) -variance.mo:89.29-89.30: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -variance.mo:90.27-90.28: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -variance.mo:94.25-94.26: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -variance.mo:99.26-99.27: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -variance.mo:100.24-100.25: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) -variance.mo:104.26-104.27: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) -variance.mo:105.24-105.25: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) diff --git a/test/fail/ok/variant-check.tc.ok b/test/fail/ok/variant-check.tc.ok index b4bd4290b9e..8e0a9fd357a 100644 --- a/test/fail/ok/variant-check.tc.ok +++ b/test/fail/ok/variant-check.tc.ok @@ -2,5 +2,3 @@ variant-check.mo:6.23-6.26: type error [M0096], expression of type Nat cannot produce expected type Nat8 -variant-check.mo:3.6-3.9: warning [M0194], unused identifier foo (delete or rename to wildcard `_` or `_foo`) -variant-check.mo:6.6-6.9: warning [M0194], unused identifier bar (delete or rename to wildcard `_` or `_bar`) diff --git a/test/run-drun/unused-actor-class.mo b/test/fail/unused-actor-class.mo similarity index 100% rename from test/run-drun/unused-actor-class.mo rename to test/fail/unused-actor-class.mo diff --git a/test/run-drun/unused-actor-class/test-actor-class.mo b/test/fail/unused-actor-class/test-actor-class.mo similarity index 100% rename from test/run-drun/unused-actor-class/test-actor-class.mo rename to test/fail/unused-actor-class/test-actor-class.mo diff --git a/test/run-drun/unused-actor-fields.mo b/test/fail/unused-actor-fields.mo similarity index 100% rename from test/run-drun/unused-actor-fields.mo rename to test/fail/unused-actor-fields.mo diff --git a/test/run/unused-class.mo b/test/fail/unused-class.mo similarity index 100% rename from test/run/unused-class.mo rename to test/fail/unused-class.mo diff --git a/test/fail/unused-exception.mo b/test/fail/unused-exception.mo new file mode 100644 index 00000000000..d4c993c536b --- /dev/null +++ b/test/fail/unused-exception.mo @@ -0,0 +1,5 @@ +module { + public func foo() : async () { + try { } catch (exception) {}; + }; +}; diff --git a/test/fail/unused-false-positive.mo b/test/fail/unused-false-positive.mo new file mode 100644 index 00000000000..a3d6f0f3eb4 --- /dev/null +++ b/test/fail/unused-false-positive.mo @@ -0,0 +1,5 @@ + + +(switch (true,false) { + case (a,b) { d # a # b }; +}) : Text; diff --git a/test/run/unused-field-pattern.mo b/test/fail/unused-field-pattern.mo similarity index 100% rename from test/run/unused-field-pattern.mo rename to test/fail/unused-field-pattern.mo diff --git a/test/run-drun/unused-import.mo b/test/fail/unused-import.mo similarity index 100% rename from test/run-drun/unused-import.mo rename to test/fail/unused-import.mo diff --git a/test/run/unused-module-identifier.mo b/test/fail/unused-module-identifier.mo similarity index 100% rename from test/run/unused-module-identifier.mo rename to test/fail/unused-module-identifier.mo diff --git a/test/run-drun/unused-module.mo b/test/fail/unused-module.mo similarity index 100% rename from test/run-drun/unused-module.mo rename to test/fail/unused-module.mo diff --git a/test/run-drun/unused-module/test-module.mo b/test/fail/unused-module/test-module.mo similarity index 100% rename from test/run-drun/unused-module/test-module.mo rename to test/fail/unused-module/test-module.mo diff --git a/test/run/unused-object.mo b/test/fail/unused-object.mo similarity index 100% rename from test/run/unused-object.mo rename to test/fail/unused-object.mo diff --git a/test/run/unused-object2.mo b/test/fail/unused-object2.mo similarity index 100% rename from test/run/unused-object2.mo rename to test/fail/unused-object2.mo diff --git a/test/fail/unused-parameter.mo b/test/fail/unused-parameter.mo new file mode 100644 index 00000000000..9bf4557d53c --- /dev/null +++ b/test/fail/unused-parameter.mo @@ -0,0 +1,3 @@ +func test(param:Int) {}; + +let _ = switch (42,) { case (param) param}; diff --git a/test/run/unused-shadowing.mo b/test/fail/unused-shadowing.mo similarity index 100% rename from test/run/unused-shadowing.mo rename to test/fail/unused-shadowing.mo diff --git a/test/run/unused-switch-case.mo b/test/fail/unused-switch-case.mo similarity index 100% rename from test/run/unused-switch-case.mo rename to test/fail/unused-switch-case.mo diff --git a/test/fail/unused-switch-in-catch.mo b/test/fail/unused-switch-in-catch.mo new file mode 100644 index 00000000000..4e1643c68e4 --- /dev/null +++ b/test/fail/unused-switch-in-catch.mo @@ -0,0 +1,11 @@ +module { + public func test() : async () { + try {} catch exception { + switch exception { + case unused { + assert false; + }; + }; + }; + }; +}; diff --git a/test/run/unused-top-level-identifiers.mo b/test/fail/unused-top-level-identifiers.mo similarity index 100% rename from test/run/unused-top-level-identifiers.mo rename to test/fail/unused-top-level-identifiers.mo diff --git a/test/run/unused-underscore.mo b/test/fail/unused-underscore.mo similarity index 100% rename from test/run/unused-underscore.mo rename to test/fail/unused-underscore.mo diff --git a/test/fail/used-exception.mo b/test/fail/used-exception.mo new file mode 100644 index 00000000000..76092fd5bb1 --- /dev/null +++ b/test/fail/used-exception.mo @@ -0,0 +1,8 @@ +module { + public func foo() : async () { + var x = try {} catch (exception) { + throw exception; + }; + x; + }; +}; diff --git a/test/perf/ok/assetstorage.tc.ok b/test/perf/ok/assetstorage.tc.ok index 64a6076d547..de9f3224a19 100644 --- a/test/perf/ok/assetstorage.tc.ok +++ b/test/perf/ok/assetstorage.tc.ok @@ -1,5 +1,10 @@ +assetstorage/List.mo:66.19-66.20: warning [M0194], unused identifier t (delete or rename to wildcard `_` or `_t`) +assetstorage/List.mo:201.16-201.17: warning [M0194], unused identifier h (delete or rename to wildcard `_` or `_h`) assetstorage/Iter.mo:165.29-165.31: warning [M0194], unused identifier ix (delete or rename to wildcard `_` or `_ix`) assetstorage/RBTree.mo:45.10-45.13: warning [M0194], unused identifier res (delete or rename to wildcard `_` or `_res`) assetstorage/RBTree.mo:50.10-50.13: warning [M0194], unused identifier res (delete or rename to wildcard `_` or `_res`) +assetstorage/RBTree.mo:179.15-179.16: warning [M0194], unused identifier c (delete or rename to wildcard `_` or `_c`) assetstorage/Char.mo:8.15-8.22: warning [M0194], unused identifier toUpper (delete or rename to wildcard `_` or `_toUpper`) assetstorage/Char.mo:11.15-11.22: warning [M0194], unused identifier toLower (delete or rename to wildcard `_` or `_toLower`) +assetstorage/Text.mo:347.22-347.25: warning [M0194], unused identifier cs1 (delete or rename to wildcard `_` or `_cs1`) +assetstorage/Text.mo:548.28-548.31: warning [M0194], unused identifier cs3 (delete or rename to wildcard `_` or `_cs3`) diff --git a/test/perf/ok/dao.tc.ok b/test/perf/ok/dao.tc.ok index 933cc821311..5dd3cddfb74 100644 --- a/test/perf/ok/dao.tc.ok +++ b/test/perf/ok/dao.tc.ok @@ -1,4 +1,8 @@ +assetstorage/List.mo:66.19-66.20: warning [M0194], unused identifier t (delete or rename to wildcard `_` or `_t`) +assetstorage/List.mo:201.16-201.17: warning [M0194], unused identifier h (delete or rename to wildcard `_` or `_h`) assetstorage/Iter.mo:165.29-165.31: warning [M0194], unused identifier ix (delete or rename to wildcard `_` or `_ix`) +assetstorage/AssocList.mo:158.20-158.22: warning [M0194], unused identifier v2 (delete or rename to wildcard `_` or `_v2`) +assetstorage/AssocList.mo:313.20-313.22: warning [M0194], unused identifier v2 (delete or rename to wildcard `_` or `_v2`) assetstorage/Trie.mo:206.31-206.32: warning [M0194], unused identifier v (delete or rename to wildcard `_` or `_v`) assetstorage/Trie.mo:486.25-486.26: warning [M0194], unused identifier v (delete or rename to wildcard `_` or `_v`) assetstorage/Trie.mo:588.9-588.15: warning [M0194], unused identifier key_eq (delete or rename to wildcard `_` or `_key_eq`) diff --git a/test/perf/ok/qr.tc.ok b/test/perf/ok/qr.tc.ok index bd2bd86a236..f74e9439d34 100644 --- a/test/perf/ok/qr.tc.ok +++ b/test/perf/ok/qr.tc.ok @@ -1,5 +1,9 @@ qr/option.mo:52.8-52.11: warning [M0194], unused identifier map (delete or rename to wildcard `_` or `_map`) +qr/list.mo:124.21-124.22: warning [M0194], unused identifier t (delete or rename to wildcard `_` or `_t`) +qr/list.mo:281.18-281.19: warning [M0194], unused identifier h (delete or rename to wildcard `_` or `_h`) qr/iter.mo:36.8-36.14: warning [M0194], unused identifier length (delete or rename to wildcard `_` or `_length`) +qr/assocList.mo:105.25-105.27: warning [M0194], unused identifier v2 (delete or rename to wildcard `_` or `_v2`) +qr/assocList.mo:179.25-179.27: warning [M0194], unused identifier v2 (delete or rename to wildcard `_` or `_v2`) qr/trie.mo:515.9-515.15: warning [M0194], unused identifier key_eq (delete or rename to wildcard `_` or `_key_eq`) qr/trie.mo:893.7-893.12: warning [M0194], unused identifier k3_eq (delete or rename to wildcard `_` or `_k3_eq`) qr/trie.mo:1447.61-1447.66: warning [M0194], unused identifier k1_eq (delete or rename to wildcard `_` or `_k1_eq`) diff --git a/test/perf/ok/sha256.tc.ok b/test/perf/ok/sha256.tc.ok index d1c7d20a1ed..d129613d95c 100644 --- a/test/perf/ok/sha256.tc.ok +++ b/test/perf/ok/sha256.tc.ok @@ -1 +1,3 @@ +sha256/List.mo:67.22-67.23: warning [M0194], unused identifier t (delete or rename to wildcard `_` or `_t`) +sha256/List.mo:204.16-204.17: warning [M0194], unused identifier h (delete or rename to wildcard `_` or `_h`) sha256/Iter.mo:194.29-194.31: warning [M0194], unused identifier ix (delete or rename to wildcard `_` or `_ix`) diff --git a/test/run-drun/ok/actor-class-mgmt-interp.tc.ok b/test/run-drun/ok/actor-class-mgmt-interp.tc.ok new file mode 100644 index 00000000000..018308bd8d0 --- /dev/null +++ b/test/run-drun/ok/actor-class-mgmt-interp.tc.ok @@ -0,0 +1,4 @@ +actor-class-mgmt-interp.mo:37.15-37.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +actor-class-mgmt-interp.mo:46.15-46.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +actor-class-mgmt-interp.mo:54.15-54.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +actor-class-mgmt-interp.mo:63.13-63.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/composite-inspect-message.tc.ok b/test/run-drun/ok/composite-inspect-message.tc.ok index 58ee9d7bde2..6d056d1d66a 100644 --- a/test/run-drun/ok/composite-inspect-message.tc.ok +++ b/test/run-drun/ok/composite-inspect-message.tc.ok @@ -1 +1,2 @@ composite-inspect-message.mo:17.8-17.14: warning [M0194], unused identifier caller (delete or rename to wildcard `_` or `_caller`) +composite-inspect-message.mo:29.20-29.21: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) diff --git a/test/run-drun/ok/do-async-poly.tc.ok b/test/run-drun/ok/do-async-poly.tc.ok index a4d79c0226a..6933d16c735 100644 --- a/test/run-drun/ok/do-async-poly.tc.ok +++ b/test/run-drun/ok/do-async-poly.tc.ok @@ -8,4 +8,3 @@ do-async-poly.mo:22.42-22.43: type error [M0033], async has non-shared content t T__23 do-async-poly.mo:26.43-26.44: type error [M0033], async has non-shared content type T__24 -do-async-poly.mo:13.16-13.22: warning [M0194], unused identifier doText (delete or rename to wildcard `_` or `_doText`) diff --git a/test/run-drun/ok/error-codes.tc.ok b/test/run-drun/ok/error-codes.tc.ok index 85ed2afe24b..3d8b5261242 100644 --- a/test/run-drun/ok/error-codes.tc.ok +++ b/test/run-drun/ok/error-codes.tc.ok @@ -1 +1,3 @@ error-codes.mo:8.16-8.23: warning [M0194], unused identifier invalid (delete or rename to wildcard `_` or `_invalid`) +error-codes.mo:47.24-47.25: warning [M0194], unused identifier n (delete or rename to wildcard `_` or `_n`) +error-codes.mo:48.28-48.36: warning [M0194], unused identifier err_code (delete or rename to wildcard `_` or `_err_code`) diff --git a/test/run-drun/ok/from_candid_trap.tc.ok b/test/run-drun/ok/from_candid_trap.tc.ok new file mode 100644 index 00000000000..a4f6f3dd0df --- /dev/null +++ b/test/run-drun/ok/from_candid_trap.tc.ok @@ -0,0 +1 @@ +from_candid_trap.mo:11.13-11.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/gc-trigger-acl.tc.ok b/test/run-drun/ok/gc-trigger-acl.tc.ok new file mode 100644 index 00000000000..2e4af877257 --- /dev/null +++ b/test/run-drun/ok/gc-trigger-acl.tc.ok @@ -0,0 +1,2 @@ +gc-trigger-acl.mo:25.13-25.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +gc-trigger-acl.mo:38.13-38.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/idl-record.tc.ok b/test/run-drun/ok/idl-record.tc.ok new file mode 100644 index 00000000000..75c07fc97c1 --- /dev/null +++ b/test/run-drun/ok/idl-record.tc.ok @@ -0,0 +1 @@ +idl-record.mo:8.14-8.21: warning [M0194], unused identifier content (delete or rename to wildcard `_` or `_content`) diff --git a/test/run-drun/ok/idl-sub-ho-neg.tc.ok b/test/run-drun/ok/idl-sub-ho-neg.tc.ok index 8d0b32579e8..3ba4eac5684 100644 --- a/test/run-drun/ok/idl-sub-ho-neg.tc.ok +++ b/test/run-drun/ok/idl-sub-ho-neg.tc.ok @@ -48,3 +48,22 @@ idl-sub-ho-neg.mo:103.28-103.29: warning [M0194], unused identifier n (delete or idl-sub-ho-neg.mo:103.41-103.42: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) idl-sub-ho-neg.mo:103.56-103.57: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) idl-sub-ho-neg.mo:103.75-103.76: warning [M0194], unused identifier v (delete or rename to wildcard `_` or `_v`) +idl-sub-ho-neg.mo:131.15-131.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:145.15-145.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:159.15-159.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:173.15-173.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:187.15-187.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:201.15-201.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:215.15-215.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:232.15-232.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:248.15-248.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:264.15-264.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:279.15-279.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:296.15-296.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:313.15-313.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:330.15-330.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:346.15-346.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:362.15-362.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:377.15-377.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:394.15-394.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho-neg.mo:411.15-411.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/idl-sub-ho.tc.ok b/test/run-drun/ok/idl-sub-ho.tc.ok index c996dff24fa..948d94f030b 100644 --- a/test/run-drun/ok/idl-sub-ho.tc.ok +++ b/test/run-drun/ok/idl-sub-ho.tc.ok @@ -26,3 +26,14 @@ idl-sub-ho.mo:78.26-78.27: warning [M0194], unused identifier n (delete or renam idl-sub-ho.mo:78.39-78.40: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) idl-sub-ho.mo:78.54-78.55: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) idl-sub-ho.mo:78.73-78.74: warning [M0194], unused identifier v (delete or rename to wildcard `_` or `_v`) +idl-sub-ho.mo:100.15-100.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:111.15-111.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:122.15-122.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:133.15-133.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:145.15-145.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:159.15-159.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:173.15-173.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:188.15-188.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:203.15-203.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:217.15-217.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-ho.mo:232.15-232.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/idl-sub-opt-any-record.tc.ok b/test/run-drun/ok/idl-sub-opt-any-record.tc.ok index b093e3fbd96..2116494167a 100644 --- a/test/run-drun/ok/idl-sub-opt-any-record.tc.ok +++ b/test/run-drun/ok/idl-sub-opt-any-record.tc.ok @@ -5,3 +5,6 @@ idl-sub-opt-any-record.mo:15.24-15.25: warning [M0194], unused identifier a (del idl-sub-opt-any-record.mo:15.33-15.34: warning [M0194], unused identifier n (delete or rename to wildcard `_` or `_n`) idl-sub-opt-any-record.mo:16.24-16.25: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) idl-sub-opt-any-record.mo:16.33-16.34: warning [M0194], unused identifier n (delete or rename to wildcard `_` or `_n`) +idl-sub-opt-any-record.mo:31.15-31.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-opt-any-record.mo:46.15-46.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-opt-any-record.mo:60.15-60.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/idl-sub-opt-any.tc.ok b/test/run-drun/ok/idl-sub-opt-any.tc.ok index a070db4853e..3090b41d84b 100644 --- a/test/run-drun/ok/idl-sub-opt-any.tc.ok +++ b/test/run-drun/ok/idl-sub-opt-any.tc.ok @@ -9,3 +9,8 @@ idl-sub-opt-any.mo:17.23-17.24: warning [M0194], unused identifier n (delete or idl-sub-opt-any.mo:17.34-17.35: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) idl-sub-opt-any.mo:18.23-18.24: warning [M0194], unused identifier n (delete or rename to wildcard `_` or `_n`) idl-sub-opt-any.mo:18.32-18.33: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) +idl-sub-opt-any.mo:33.15-33.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-opt-any.mo:48.15-48.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-opt-any.mo:62.15-62.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-opt-any.mo:76.15-76.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-opt-any.mo:91.15-91.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/idl-sub-rec.tc.ok b/test/run-drun/ok/idl-sub-rec.tc.ok index 6876891bf8d..428c25b6584 100644 --- a/test/run-drun/ok/idl-sub-rec.tc.ok +++ b/test/run-drun/ok/idl-sub-rec.tc.ok @@ -7,3 +7,11 @@ idl-sub-rec.mo:54.5-54.6: warning [M0194], unused identifier a (delete or rename idl-sub-rec.mo:60.5-60.6: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) idl-sub-rec.mo:66.5-66.6: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) idl-sub-rec.mo:72.5-72.6: warning [M0194], unused identifier a (delete or rename to wildcard `_` or `_a`) +idl-sub-rec.mo:91.13-91.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-rec.mo:104.13-104.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-rec.mo:118.13-118.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-rec.mo:131.13-131.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-rec.mo:144.13-144.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-rec.mo:169.13-169.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-rec.mo:181.13-181.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +idl-sub-rec.mo:194.13-194.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/ignore-unused-actor-identifier.drun-run.ok b/test/run-drun/ok/ignore-unused-actor-identifier.drun-run.ok deleted file mode 100644 index a6f776f43c6..00000000000 --- a/test/run-drun/ok/ignore-unused-actor-identifier.drun-run.ok +++ /dev/null @@ -1,2 +0,0 @@ -ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101 -ingress Completed: Reply: 0x4449444c0000 diff --git a/test/run-drun/ok/inspect_message.tc.ok b/test/run-drun/ok/inspect_message.tc.ok index 4346feb3e7e..29eadd89c7f 100644 --- a/test/run-drun/ok/inspect_message.tc.ok +++ b/test/run-drun/ok/inspect_message.tc.ok @@ -1 +1,2 @@ inspect_message.mo:14.8-14.14: warning [M0194], unused identifier caller (delete or rename to wildcard `_` or `_caller`) +inspect_message.mo:26.20-26.21: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) diff --git a/test/run-drun/ok/issue-3910.tc.ok b/test/run-drun/ok/issue-3910.tc.ok index e0d3757ed0b..ad9eea9a3cf 100644 --- a/test/run-drun/ok/issue-3910.tc.ok +++ b/test/run-drun/ok/issue-3910.tc.ok @@ -10,3 +10,5 @@ issue-3910.mo:7.11-7.12: warning [M0194], unused identifier r (delete or rename issue-3910.mo:12.13-12.17: warning [M0194], unused identifier trap (delete or rename to wildcard `_` or `_trap`) issue-3910.mo:24.11-24.12: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) issue-3910.mo:29.13-29.17: warning [M0194], unused identifier trap (delete or rename to wildcard `_` or `_trap`) +issue-3910.mo:52.11-52.12: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +issue-3910.mo:67.11-67.12: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/local-throw.tc.ok b/test/run-drun/ok/local-throw.tc.ok new file mode 100644 index 00000000000..a5b13a2b913 --- /dev/null +++ b/test/run-drun/ok/local-throw.tc.ok @@ -0,0 +1,3 @@ +local-throw.mo:14.19-14.22: warning [M0194], unused identifier sys (delete or rename to wildcard `_` or `_sys`) +local-throw.mo:32.17-32.20: warning [M0194], unused identifier sys (delete or rename to wildcard `_` or `_sys`) +local-throw.mo:45.14-45.17: warning [M0194], unused identifier sys (delete or rename to wildcard `_` or `_sys`) diff --git a/test/run-drun/ok/neg-powers.tc.ok b/test/run-drun/ok/neg-powers.tc.ok new file mode 100644 index 00000000000..3b1ee933887 --- /dev/null +++ b/test/run-drun/ok/neg-powers.tc.ok @@ -0,0 +1,36 @@ +neg-powers.mo:11.14-11.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:17.14-17.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:23.14-23.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:29.14-29.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:36.14-36.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:42.14-42.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:48.14-48.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:54.14-54.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:61.14-61.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:67.14-67.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:73.14-73.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:79.14-79.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:86.14-86.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:92.14-92.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:98.14-98.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:104.14-104.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:111.14-111.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:117.14-117.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:123.14-123.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:129.14-129.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:136.14-136.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:142.14-142.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:148.14-148.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:154.14-154.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:161.14-161.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:167.14-167.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:173.14-173.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:179.14-179.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:186.14-186.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:192.14-192.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:198.14-198.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:204.14-204.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:211.14-211.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:217.14-217.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:223.14-223.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +neg-powers.mo:229.14-229.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/oneway.tc.ok b/test/run-drun/ok/oneway.tc.ok new file mode 100644 index 00000000000..f45d020d701 --- /dev/null +++ b/test/run-drun/ok/oneway.tc.ok @@ -0,0 +1,2 @@ +oneway.mo:13.11-13.12: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +oneway.mo:27.15-27.16: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/overflow.tc.ok b/test/run-drun/ok/overflow.tc.ok new file mode 100644 index 00000000000..7315ebd336b --- /dev/null +++ b/test/run-drun/ok/overflow.tc.ok @@ -0,0 +1,10 @@ +overflow.mo:11.14-11.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +overflow.mo:17.14-17.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +overflow.mo:23.14-23.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +overflow.mo:29.14-29.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +overflow.mo:35.14-35.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +overflow.mo:41.14-41.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +overflow.mo:47.14-47.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +overflow.mo:53.14-53.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +overflow.mo:59.14-59.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) +overflow.mo:65.14-65.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/region0-overflow.tc.ok b/test/run-drun/ok/region0-overflow.tc.ok new file mode 100644 index 00000000000..1bfc2a83fa2 --- /dev/null +++ b/test/run-drun/ok/region0-overflow.tc.ok @@ -0,0 +1 @@ +region0-overflow.mo:58.13-58.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/reject.tc.ok b/test/run-drun/ok/reject.tc.ok new file mode 100644 index 00000000000..438e7219e5c --- /dev/null +++ b/test/run-drun/ok/reject.tc.ok @@ -0,0 +1 @@ +reject.mo:12.12-12.13: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/send-failure-example-trap.tc.ok b/test/run-drun/ok/send-failure-example-trap.tc.ok new file mode 100644 index 00000000000..107a18c5c3c --- /dev/null +++ b/test/run-drun/ok/send-failure-example-trap.tc.ok @@ -0,0 +1 @@ +send-failure-example-trap.mo:22.14-22.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/send-failure-example.tc.ok b/test/run-drun/ok/send-failure-example.tc.ok new file mode 100644 index 00000000000..70987d25254 --- /dev/null +++ b/test/run-drun/ok/send-failure-example.tc.ok @@ -0,0 +1 @@ +send-failure-example.mo:21.14-21.15: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/stable-overflow.tc.ok b/test/run-drun/ok/stable-overflow.tc.ok new file mode 100644 index 00000000000..941d5d4221c --- /dev/null +++ b/test/run-drun/ok/stable-overflow.tc.ok @@ -0,0 +1 @@ +stable-overflow.mo:57.13-57.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/throw.tc.ok b/test/run-drun/ok/throw.tc.ok index 4f8e30d6174..76054d5c934 100644 --- a/test/run-drun/ok/throw.tc.ok +++ b/test/run-drun/ok/throw.tc.ok @@ -1 +1,3 @@ +throw.mo:16.19-16.22: warning [M0194], unused identifier sys (delete or rename to wildcard `_` or `_sys`) throw.mo:38.19-38.22: warning [M0194], unused identifier sys (delete or rename to wildcard `_` or `_sys`) +throw.mo:52.14-52.17: warning [M0194], unused identifier sys (delete or rename to wildcard `_` or `_sys`) diff --git a/test/run-drun/ok/trap-on-async-failure.tc.ok b/test/run-drun/ok/trap-on-async-failure.tc.ok new file mode 100644 index 00000000000..776f37cfb6b --- /dev/null +++ b/test/run-drun/ok/trap-on-async-failure.tc.ok @@ -0,0 +1 @@ +trap-on-async-failure.mo:36.13-36.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/trap-on-send-failure.tc.ok b/test/run-drun/ok/trap-on-send-failure.tc.ok new file mode 100644 index 00000000000..75b610fc5f8 --- /dev/null +++ b/test/run-drun/ok/trap-on-send-failure.tc.ok @@ -0,0 +1 @@ +trap-on-send-failure.mo:33.13-33.14: warning [M0194], unused identifier e (delete or rename to wildcard `_` or `_e`) diff --git a/test/run-drun/ok/unused-actor-class.drun-run.ok b/test/run-drun/ok/unused-actor-class.drun-run.ok deleted file mode 100644 index a6f776f43c6..00000000000 --- a/test/run-drun/ok/unused-actor-class.drun-run.ok +++ /dev/null @@ -1,2 +0,0 @@ -ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101 -ingress Completed: Reply: 0x4449444c0000 diff --git a/test/run-drun/ok/unused-actor-fields.drun-run.ok b/test/run-drun/ok/unused-actor-fields.drun-run.ok deleted file mode 100644 index a6f776f43c6..00000000000 --- a/test/run-drun/ok/unused-actor-fields.drun-run.ok +++ /dev/null @@ -1,2 +0,0 @@ -ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101 -ingress Completed: Reply: 0x4449444c0000 diff --git a/test/run-drun/ok/unused-import.drun-run.ok b/test/run-drun/ok/unused-import.drun-run.ok deleted file mode 100644 index 5bbab1e840c..00000000000 --- a/test/run-drun/ok/unused-import.drun-run.ok +++ /dev/null @@ -1,3 +0,0 @@ -ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101 -debug.print: Test -ingress Completed: Reply: 0x4449444c0000 diff --git a/test/run-drun/ok/unused-import.run-ir.ok b/test/run-drun/ok/unused-import.run-ir.ok deleted file mode 100644 index 345e6aef713..00000000000 --- a/test/run-drun/ok/unused-import.run-ir.ok +++ /dev/null @@ -1 +0,0 @@ -Test diff --git a/test/run-drun/ok/unused-import.run-low.ok b/test/run-drun/ok/unused-import.run-low.ok deleted file mode 100644 index 345e6aef713..00000000000 --- a/test/run-drun/ok/unused-import.run-low.ok +++ /dev/null @@ -1 +0,0 @@ -Test diff --git a/test/run-drun/ok/unused-import.run.ok b/test/run-drun/ok/unused-import.run.ok deleted file mode 100644 index 345e6aef713..00000000000 --- a/test/run-drun/ok/unused-import.run.ok +++ /dev/null @@ -1 +0,0 @@ -Test diff --git a/test/run-drun/ok/unused-module.drun-run.ok b/test/run-drun/ok/unused-module.drun-run.ok deleted file mode 100644 index a6f776f43c6..00000000000 --- a/test/run-drun/ok/unused-module.drun-run.ok +++ /dev/null @@ -1,2 +0,0 @@ -ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101 -ingress Completed: Reply: 0x4449444c0000 diff --git a/test/run/ok/blobs.tc.ok b/test/run/ok/blobs.tc.ok new file mode 100644 index 00000000000..6cdda86de42 --- /dev/null +++ b/test/run/ok/blobs.tc.ok @@ -0,0 +1 @@ +blobs.mo:38.10-38.11: warning [M0194], unused identifier b (delete or rename to wildcard `_` or `_b`) diff --git a/test/run/ok/coverage.tc.ok b/test/run/ok/coverage.tc.ok index 171ba1f9a4c..82405995a0d 100644 --- a/test/run/ok/coverage.tc.ok +++ b/test/run/ok/coverage.tc.ok @@ -195,4 +195,43 @@ coverage.mo:15.8-15.10: warning [M0194], unused identifier f3 (delete or rename coverage.mo:17.8-17.10: warning [M0194], unused identifier f5 (delete or rename to wildcard `_` or `_f5`) coverage.mo:18.8-18.10: warning [M0194], unused identifier f6 (delete or rename to wildcard `_` or `_f6`) coverage.mo:19.8-19.10: warning [M0194], unused identifier f7 (delete or rename to wildcard `_` or `_f7`) +coverage.mo:22.19-22.20: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:26.30-26.31: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:28.30-28.31: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:29.19-29.20: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:30.19-30.20: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:30.30-30.31: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:100.13-100.14: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:101.14-101.15: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:101.21-101.22: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +coverage.mo:102.14-102.15: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:102.22-102.23: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +coverage.mo:102.25-102.26: warning [M0194], unused identifier z (delete or rename to wildcard `_` or `_z`) +coverage.mo:103.14-103.15: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:103.22-103.23: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +coverage.mo:103.25-103.26: warning [M0194], unused identifier z (delete or rename to wildcard `_` or `_z`) +coverage.mo:104.19-104.20: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:104.22-104.23: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +coverage.mo:104.26-104.27: warning [M0194], unused identifier z (delete or rename to wildcard `_` or `_z`) +coverage.mo:105.19-105.20: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:105.22-105.23: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +coverage.mo:105.26-105.27: warning [M0194], unused identifier z (delete or rename to wildcard `_` or `_z`) +coverage.mo:106.13-106.14: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:106.20-106.21: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +coverage.mo:106.23-106.24: warning [M0194], unused identifier z (delete or rename to wildcard `_` or `_z`) +coverage.mo:106.26-106.27: warning [M0194], unused identifier v (delete or rename to wildcard `_` or `_v`) +coverage.mo:106.30-106.31: warning [M0194], unused identifier w (delete or rename to wildcard `_` or `_w`) +coverage.mo:107.14-107.15: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:107.21-107.22: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +coverage.mo:107.24-107.25: warning [M0194], unused identifier z (delete or rename to wildcard `_` or `_z`) +coverage.mo:107.27-107.28: warning [M0194], unused identifier v (delete or rename to wildcard `_` or `_v`) +coverage.mo:108.13-108.14: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:108.16-108.17: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +coverage.mo:108.24-108.25: warning [M0194], unused identifier z (delete or rename to wildcard `_` or `_z`) +coverage.mo:108.27-108.28: warning [M0194], unused identifier v (delete or rename to wildcard `_` or `_v`) +coverage.mo:109.24-109.25: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +coverage.mo:109.32-109.33: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +coverage.mo:109.35-109.36: warning [M0194], unused identifier z (delete or rename to wildcard `_` or `_z`) +coverage.mo:109.40-109.41: warning [M0194], unused identifier v (delete or rename to wildcard `_` or `_v`) +coverage.mo:109.44-109.45: warning [M0194], unused identifier w (delete or rename to wildcard `_` or `_w`) coverage.mo:178.6-178.7: warning [M0194], unused identifier h (delete or rename to wildcard `_` or `_h`) diff --git a/test/run/ok/pat-subtyping.tc.ok b/test/run/ok/pat-subtyping.tc.ok index 8dd72107e2a..ee6436c0bd3 100644 --- a/test/run/ok/pat-subtyping.tc.ok +++ b/test/run/ok/pat-subtyping.tc.ok @@ -39,3 +39,29 @@ pat-subtyping.mo:212.8-212.10: warning [M0146], this pattern is never matched pat-subtyping.mo:213.8-213.10: warning [M0146], this pattern is never matched pat-subtyping.mo:214.8-214.12: warning [M0146], this pattern is never matched pat-subtyping.mo:215.8-215.12: warning [M0146], this pattern is never matched +pat-subtyping.mo:15.9-15.10: warning [M0194], unused identifier n (delete or rename to wildcard `_` or `_n`) +pat-subtyping.mo:18.10-18.11: warning [M0194], unused identifier n (delete or rename to wildcard `_` or `_n`) +pat-subtyping.mo:29.9-29.10: warning [M0194], unused identifier p (delete or rename to wildcard `_` or `_p`) +pat-subtyping.mo:32.10-32.11: warning [M0194], unused identifier p (delete or rename to wildcard `_` or `_p`) +pat-subtyping.mo:35.10-35.11: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +pat-subtyping.mo:35.13-35.14: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +pat-subtyping.mo:38.11-38.12: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +pat-subtyping.mo:38.14-38.15: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +pat-subtyping.mo:41.9-41.10: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +pat-subtyping.mo:41.18-41.19: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +pat-subtyping.mo:44.10-44.11: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) +pat-subtyping.mo:44.19-44.20: warning [M0194], unused identifier y (delete or rename to wildcard `_` or `_y`) +pat-subtyping.mo:62.9-62.10: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) +pat-subtyping.mo:65.10-65.11: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) +pat-subtyping.mo:68.10-68.11: warning [M0198], unused field a in object pattern (delete or rewrite as `a = _`) +pat-subtyping.mo:68.13-68.14: warning [M0198], unused field b in object pattern (delete or rewrite as `b = _`) +pat-subtyping.mo:71.11-71.12: warning [M0198], unused field a in object pattern (delete or rewrite as `a = _`) +pat-subtyping.mo:71.14-71.15: warning [M0198], unused field b in object pattern (delete or rewrite as `b = _`) +pat-subtyping.mo:94.9-94.10: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) +pat-subtyping.mo:97.10-97.11: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) +pat-subtyping.mo:100.10-100.11: warning [M0198], unused field a in object pattern (delete or rewrite as `a = _`) +pat-subtyping.mo:103.11-103.12: warning [M0198], unused field a in object pattern (delete or rewrite as `a = _`) +pat-subtyping.mo:106.9-106.10: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) +pat-subtyping.mo:109.10-109.11: warning [M0194], unused identifier r (delete or rename to wildcard `_` or `_r`) +pat-subtyping.mo:133.10-133.11: warning [M0194], unused identifier n (delete or rename to wildcard `_` or `_n`) +pat-subtyping.mo:137.11-137.12: warning [M0194], unused identifier n (delete or rename to wildcard `_` or `_n`) diff --git a/test/run/ok/switch.tc.ok b/test/run/ok/switch.tc.ok index 2eb9546c271..59cd87839ac 100644 --- a/test/run/ok/switch.tc.ok +++ b/test/run/ok/switch.tc.ok @@ -17,6 +17,7 @@ switch.mo:97.11-99.2: warning [M0145], this switch of type ?Nat does not cover value ?(_) +switch.mo:31.8-31.9: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) switch.mo:80.6-80.7: warning [M0194], unused identifier f (delete or rename to wildcard `_` or `_f`) switch.mo:90.6-90.7: warning [M0194], unused identifier g (delete or rename to wildcard `_` or `_g`) switch.mo:93.10-93.11: warning [M0194], unused identifier n (delete or rename to wildcard `_` or `_n`) diff --git a/test/run/ok/unused-field-pattern.run-ir.ok b/test/run/ok/unused-field-pattern.run-ir.ok deleted file mode 100644 index d00491fd7e5..00000000000 --- a/test/run/ok/unused-field-pattern.run-ir.ok +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/test/run/ok/unused-field-pattern.run-low.ok b/test/run/ok/unused-field-pattern.run-low.ok deleted file mode 100644 index d00491fd7e5..00000000000 --- a/test/run/ok/unused-field-pattern.run-low.ok +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/test/run/ok/unused-field-pattern.run.ok b/test/run/ok/unused-field-pattern.run.ok deleted file mode 100644 index d00491fd7e5..00000000000 --- a/test/run/ok/unused-field-pattern.run.ok +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/test/run/ok/unused-field-pattern.wasm-run.ok b/test/run/ok/unused-field-pattern.wasm-run.ok deleted file mode 100644 index d00491fd7e5..00000000000 --- a/test/run/ok/unused-field-pattern.wasm-run.ok +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/test/viper/ok/private.tc.ok b/test/viper/ok/private.tc.ok new file mode 100644 index 00000000000..8ff67ecd9de --- /dev/null +++ b/test/viper/ok/private.tc.ok @@ -0,0 +1 @@ +private.mo:11.16-11.22: warning [M0194], unused identifier reward (delete or rename to wildcard `_` or `_reward`) diff --git a/test/viper/ok/private.vpr.ok b/test/viper/ok/private.vpr.ok index b483933b615..52f912acb39 100644 --- a/test/viper/ok/private.vpr.ok +++ b/test/viper/ok/private.vpr.ok @@ -1,3 +1,4 @@ +private.mo:11.16-11.22: warning [M0194], unused identifier reward (delete or rename to wildcard `_` or `_reward`) define $Perm($Self) (((true && acc(($Self).claimed,write)) && acc(($Self).count,write))) define $Inv($Self) (invariant_7($Self)) method __init__($Self: Ref) diff --git a/test/viper/ok/unsupported.tc.ok b/test/viper/ok/unsupported.tc.ok new file mode 100644 index 00000000000..a9b46438288 --- /dev/null +++ b/test/viper/ok/unsupported.tc.ok @@ -0,0 +1 @@ +unsupported.mo:5.7-5.8: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) diff --git a/test/viper/ok/unsupported.vpr.ok b/test/viper/ok/unsupported.vpr.ok index 30d4be4428b..b01792b2298 100644 --- a/test/viper/ok/unsupported.vpr.ok +++ b/test/viper/ok/unsupported.vpr.ok @@ -1,3 +1,4 @@ +unsupported.mo:5.7-5.8: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) unsupported.mo:5.3-5.13: viper error [0], translation to viper failed: (LetD (VarP x) (LitE (TextLit )))