Result: done Files: crates/nikaia/src/parser/mod.rs crates/nikaia-std/src/tools/check_core_args.nika crates/nikaia-std/src/tools/check_core_call.nika crates/nikaia-std/src/tools/check_core_pilot.nika crates/nikaia-std/src/tools/check_function.nika crates/nikaia-std/src/tools/check_program.nika crates/nikaia-std/src/tools/emit_core_args.nika crates/nikaia-std/src/tools/emit_core_types.nika crates/nikaia-std/src/tools/emit_function.nika crates/nikaia-std/src/tools/emit_misc.nika crates/nikaia-std/src/tools/emit_program.nika crates/nikaia-std/src/tools/emit_state.nika crates/nikaia-std/src/tools/emit_walk.nika crates/nikaia-std/src/tools/lowered.rs crates/nikaia-std/src/tools/lowered/check_core_args.rs crates/nikaia-std/src/tools/lowered/check_core_call.rs crates/nikaia-std/src/tools/lowered/check_core_pilot.rs crates/nikaia-std/src/tools/lowered/check_function.rs crates/nikaia-std/src/tools/lowered/check_program.rs crates/nikaia-std/src/tools/lowered/emit_core_args.rs crates/nikaia-std/src/tools/lowered/emit_core_types.rs crates/nikaia-std/src/tools/lowered/emit_function.rs crates/nikaia-std/src/tools/lowered/emit_misc.rs crates/nikaia-std/src/tools/lowered/emit_program.rs crates/nikaia-std/src/tools/lowered/emit_state.rs crates/nikaia-std/src/tools/lowered/emit_walk.rs crates/nikaia-std/src/tools/lowered/prove_text.rs crates/nikaia-std/src/tools/lowered/prover_loops.rs tests/compiler/tests/type_arguments_at_a_call.nika tests/compiler/tests/type_arguments_at_a_call.stdout tests/compiler/tests/type_arguments_warned.nika tests/compiler/tests/type_arguments_warned.stderr tests/compiler/tests/type_arguments_warned.stdout tests/compiler/tests/type_as_argument.nika tests/compiler/tests/type_as_argument.stdout tests/compiler/tests/type_as_argument_value_refused.nika tests/compiler/tests/type_as_argument_value_refused.stderr tests/specification/EXPECTED.txt assets/badges/self-hosted.svg Commit: parser, check, emit: a type as an argument (ADR-330 D1) and fT filling type parameters, NK1233 only where a value could say the type (ADR-330 D9, ADR-grammar-2 D11, #859 steps 2 and 8) Body: fn f[T](T): a parameter written as a type alone is an FnArg with the empty name (no AST change); a call fills it from a type name, a type parameter, field.ty or an arm binding, each copy’s own slot calls are added to unrolled (worklist), and the emitter writes the copy without the slot. f[T](…) parses as Call { func: Index { base: f, index: T or Tuple } }, read only where ( follows on the line; the checker takes it as type arguments only where f is a generic function this file declares and no local of that name exists, else it stays an index. The emitter writes the copy, or f::<T>(…). A copy whose type no value parameter names writes the type in place of T. x.f[T]() stays a parse error. Also fixed: visited_in_expr did not visit f-string holes (re-lowers prove_text.rs, prover_loops.rs: a code parameter passed inside an f-string is now &dyn). Part: #859 Tests: 4 new tests/compiler programs, all failed on the unfixed compiler (parse errors: “Expected : … found )” at (T), “Expected ) … found (” at pick[User](1)); tests/compiler –both-settings 440 ok, including reflected_field_ty, match_on_a_kind, type_kind_; full it binary 2886 ok + specification:: (EXPECTED.txt regenerated) ok; two load flakes (facts_at_calls::bytes_compare_with_a_cut_of_bytes, examples::every_example_package…) pass alone; sequences unanswered not worsened (guard passes); clippy clean; pre-push ok Gate: green Deviation: one commit for both steps (they share check_core_call.nika, check_core_pilot.nika and the parser rule, so they cannot be split without partial staging); tests/specification/EXPECTED.txt is outside the brief’s list: two spec blocks (20-advance #6 schema[T](T), 30-tooling #35 json::read[Contact]) now parse and are refused (NK1117 undeclared CreateUser; NK1175/NK1181/NK1230) instead of “fragment”; lowered prove_text.rs/prover_loops.rs re-lowered by the emit_walk fix; self-hosted badge redrawn Found: NK1233 was not raised anywhere before (specified, not built); ADR-grammar-2 D11 shows parse[Config](text) as warned, but under the brief’s rule (warn only where every bracketed type is named by a value parameter’s type) parse[T](text: String) -> T is not warned: the owner should say which; json::read[Contact](…) (a path callee, std’s) still walks Contact as a value (NK1230): type arguments are read only for a function this file declares Needs: none Changelog: Types as arguments: fn schema[T](T) takes a type where the parameter list holds one, schema(User), and a call fills it from a type, a type parameter, field.ty or an arm’s binding; a value there is NK1230 (ADR-330 D1); and pick[User](1) fills a function’s type parameters in order; warning[NK1233] (naming #514) only where a value argument already says the type, id[i64](3) (ADR-330 D9, ADR-grammar-2 D11) Owner: decide D11’s parse[Config](text) example against the rule built (see Found) Disk freed: 0.02 GB (scratch; target/nikaia-project-tests 3.4G, / 19G free; new over 100 MB: rlib/af187e66 265 MB, run-bundle/2df20709 286 MB) Rs2nika: none Pushed: rejected (committed 3b886041, needs rebase by the supervisor)

This site is open source. Improve this page.