Repository navigation
v1 infer: a qualified function name in value position is typed by its arrow, not its return (#12143 exposure) - #12231
Merged
gunbai-bot[bot] merged 2 commits intoSep 24, 2026
Conversation
… arrow, not its return qualified_value_projection read a function declaration's inferred (its RETURN) as the value's type, so pred: m.analyze.finding_is_suspect was typed Bool; after #12143 began judging function-typed arguments that refused a correct program (roster_gate.dag, reddening v2.test.claim.long.live_read_classification unit_closure_is_local_read). The qualified arm now makes the bare arm's judgment (resolved_callable_type, same nullary rule). Stage0 mirror to be regenerated by --required-regen. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
required-regen drifted v1_compiler_infer.rs and v1_compiler_emit.rs after the 04_infer.dag change. Installed the candidate, rebuilt, and a second regen round exited 0 with every candidate byte-equal (fixed point). Before the regen, qualified_matching_accepted failed and unit_closure_is_local_read refused on roster_gate; after it, both pass, and qualified_mismatched_parameter_refuses passes throughout. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot
Bot
deleted the
session/still-seal-357-seed-qualified-fn-value
branch
September 24, 2026 18:36
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Sep 24, 2026
… projection + the callees_from_decl rename
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fifth claim red on unmodified main, found during adhoc-9d86ad93-96c (companion to gunbc#12230, split out at neat-boar-16's direction because this is a seed change).
Defect (a regression on main, exposed by #12143)
v1.compiler.inferqualified_value_projectiontyped a qualified function name in value position by the declaration'sinferred, and for a function declaration that is its return type. Sopred: v2.lens.complexity_accumulator_copy.analyze.finding_is_suspectwas typedBool. Before #12143, function-typed arguments were never judged, so this was harmless. After #12143 it refused a correct program:roster_gate.dagexpected Node(fn), got Coproduct(Bool), which reddenedv2.test.long… live_read_classificationunit_closure_is_local_readand blocks #12202's floor. The bare spelling of the same reference was accepted, because the bare arm already types a function value withresolved_callable_type.Repair, at the owning link
qualified_function_value_type: for aModuleItemFunctiondeclaration, the qualified arm makes the bare arm's judgment, typing the name by its arrow (resolved_callable_type(params, return)). It uses the same nullary rule: a nullary function where no arrow is expected keeps its existing reading.expectedis threaded intoqualified_or_service_projection. Qualified calls are unaffected: they route ExprMethodCall → dotted ExprCall, not through this projection.Evidence (srv1, neat-boar-16)
dag/test/claim/infer_function_value_argument_arrow_witness_test.dag(required prefixtest.claim.infer_):qualified_matching_acceptedis the discriminating red: FAIL before the change, PASS after.qualified_mismatched_parameter_refusesis the control that a qualified function value is still judged: PASS before and after.unit_closure_is_local_read: refused on roster_gate:162/163/247 before the change, PASS after.v1_compiler_infer.rsandv1_compiler_emit.rs; the second exited 0 at a byte-identical fixed point. Thev1_compiler_emit.rshunk (one removedpub use crate::v1_compiler_infer_items::item_resource_names;) is authority-derived drift that main already carried, not part of this change's semantics.v1 purpose test: admitted, because it unblocks v2 claims and #12202's floor.
🤖 Generated with Claude Code