Replace :! binding syntax with phase keywords and contextual defaults (#7479)

Implement the toolchain side of proposal #7254, removing the `:!`
binding
syntax for generic and template parameters in favor of the keywords
`generic`,
`template`, and `runtime` plus contextual defaults for phase.

For valid programs this is semantics-preserving: each binding resolves
to the
same phase, and produces the same SemIR, as it did under `:!`/`:`. The
parser
derives a binding's phase from its syntactic context plus any explicit
phase
keyword; new diagnostics and error recovery for misused keywords are
described
below.

Implementation details for each component:

- Lexer: remove the `:!` (`ColonExclaim`) token, move its virtual
parse-node
  budget onto `:`, and add the `generic` and `runtime` keywords.
- Parser: thread a `BindingContext` (`ExplicitParam`, `DeducedParam`, or
`CompileTimeEntityParam`) from declaration introducers down through
parameter
lists to each binding pattern, using a one-token lookahead to
distinguish a
name-qualifier parameter list from a declaration's own final list.
Parameters
of a compile-time entity (`class`, `interface`, `constraint`, `choice`,
`alias`, `export`, `namespace`) and deduced `[]` parameters default to
checked
generic; explicit function parameters and local bindings default to
runtime.
`HandleBindingPattern` resolves the phase from that context plus the
keyword: a
`generic` keyword needs no node of its own (the phase is carried by the
  binding's node kind), while a `runtime` keyword is preserved as a
`RuntimeBindingName` node so `check` can name it in a diagnostic. A
phase
keyword that is merely redundant with the contextual default is
diagnosed
  here, without invalidating the parse tree.
- Check: a phase keyword that is invalid for its context (for example
`runtime`
on a checked-generic parameter) is diagnosed here, and recovers by
building an
error binding that still introduces the name so that later uses of it do
not
  produce cascading errors.

The removed `:!` syntax is now rejected as an ordinary parse error.

The `form`/`:?`/`->?` ("extended types") portion of proposal #7254 is
left for a
separate change.

Assisted-by: Claude Code
This commit is contained in:
Chandler Carruth
2026-07-11 01:22:44 +00:00
committed by GitHub
parent bf106c3b4b
commit 8be274cf60
482 changed files with 16917 additions and 16226 deletions
+101 -101
View File
@@ -78,14 +78,14 @@ library "[[@TEST_NAME]]";
// CHECK:STDERR: ^~~
// CHECK:STDERR:
fn F(x:? i32);
// CHECK:STDERR: fail_form_param_not_form.carbon:[[@LINE+8]]:6: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo]
// CHECK:STDERR: fn G(ref x:? i32);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR:
// CHECK:STDERR: fail_form_param_not_form.carbon:[[@LINE+4]]:6: error: expected `:` binding after `ref` [ExpectedRuntimeBindingPatternAfterRef]
// CHECK:STDERR: fail_form_param_not_form.carbon:[[@LINE+8]]:6: error: `ref` is only allowed on a runtime binding [ExpectedRuntimeBindingPatternAfterRef]
// CHECK:STDERR: fn G(ref x:? i32);
// CHECK:STDERR: ^~~
// CHECK:STDERR:
// CHECK:STDERR: fail_form_param_not_form.carbon:[[@LINE+4]]:10: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo]
// CHECK:STDERR: fn G(ref x:? i32);
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR:
fn G(ref x:? i32);
// --- fail_missing_ref_tag.carbon
@@ -108,7 +108,7 @@ fn G() {
// --- form_generic_param.carbon
library "[[@TEST_NAME]]";
fn F(Fm:! Core.Form, unused x:? Fm) {}
fn F(generic Fm: Core.Form, unused x:? Fm) {}
fn G() {
var x: i32;
@@ -118,7 +118,7 @@ fn G() {
// --- fail_todo_composite_generic_form.carbon
library "[[@TEST_NAME]]";
fn F(Fm:! Core.Form, unused x:? Fm) {}
fn F(generic Fm: Core.Form, unused x:? Fm) {}
fn G() {
var x: i32;
@@ -128,9 +128,9 @@ fn G() {
// CHECK:STDERR: fail_todo_composite_generic_form.carbon:[[@LINE+7]]:3: note: type `(Core.Form, Core.Form)` does not implement interface `Core.ImplicitAs(Core.Form)` [MissingImplInMemberAccessInContext]
// CHECK:STDERR: F((form(var i32), form(ref i32)), (x, ref x));
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_todo_composite_generic_form.carbon:[[@LINE-10]]:6: note: initializing generic parameter `Fm` declared here [InitializingGenericParam]
// CHECK:STDERR: fn F(Fm:! Core.Form, unused x:? Fm) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~
// CHECK:STDERR: fail_todo_composite_generic_form.carbon:[[@LINE-10]]:14: note: initializing generic parameter `Fm` declared here [InitializingGenericParam]
// CHECK:STDERR: fn F(generic Fm: Core.Form, unused x:? Fm) {}
// CHECK:STDERR: ^~~~~~~~~~~~~
// CHECK:STDERR:
F((form(var i32), form(ref i32)), (x, ref x));
}
@@ -138,7 +138,7 @@ fn G() {
// --- fail_todo_deduce_generic_form.carbon
library "[[@TEST_NAME]]";
fn F[Fm:! Core.Form](v:? Fm);
fn F[Fm: Core.Form](v:? Fm);
fn G() {
var v: i32 = 0;
@@ -146,8 +146,8 @@ fn G() {
// CHECK:STDERR: F(ref v);
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: fail_todo_deduce_generic_form.carbon:[[@LINE-7]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
// CHECK:STDERR: fn F[Fm:! Core.Form](v:? Fm);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fn F[Fm: Core.Form](v:? Fm);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
F(ref v);
}
@@ -155,7 +155,7 @@ fn G() {
// --- fail_form_generic_arg_not_form.carbon
library "[[@TEST_NAME]]";
fn F(Fm:! Core.Form, unused x:? Fm) {}
fn F(generic Fm: Core.Form, unused x:? Fm) {}
fn G() {
var x: i32;
@@ -165,9 +165,9 @@ fn G() {
// CHECK:STDERR: fail_form_generic_arg_not_form.carbon:[[@LINE+7]]:3: note: type `type` does not implement interface `Core.ImplicitAs(Core.Form)` [MissingImplInMemberAccessInContext]
// CHECK:STDERR: F(i32, x);
// CHECK:STDERR: ^~~~~~~~~
// CHECK:STDERR: fail_form_generic_arg_not_form.carbon:[[@LINE-10]]:6: note: initializing generic parameter `Fm` declared here [InitializingGenericParam]
// CHECK:STDERR: fn F(Fm:! Core.Form, unused x:? Fm) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~
// CHECK:STDERR: fail_form_generic_arg_not_form.carbon:[[@LINE-10]]:14: note: initializing generic parameter `Fm` declared here [InitializingGenericParam]
// CHECK:STDERR: fn F(generic Fm: Core.Form, unused x:? Fm) {}
// CHECK:STDERR: ^~~~~~~~~~~~~
// CHECK:STDERR:
F(i32, x);
}
@@ -175,7 +175,7 @@ fn G() {
// --- fail_form_generic_missing_ref_tag.carbon
library "[[@TEST_NAME]]";
fn F(Fm:! Core.Form, unused x:? Fm) {}
fn F(generic Fm: Core.Form, unused x:? Fm) {}
fn G() {
var x: i32;
@@ -183,9 +183,9 @@ fn G() {
// CHECK:STDERR: F(form(ref i32), x);
// CHECK:STDERR: ^
// CHECK:STDERR: fail_form_generic_missing_ref_tag.carbon: note: initializing function parameter [InCallToFunctionParam]
// CHECK:STDERR: fail_form_generic_missing_ref_tag.carbon:[[@LINE-8]]:29: note: initializing function parameter [InCallToFunctionParam]
// CHECK:STDERR: fn F(Fm:! Core.Form, unused x:? Fm) {}
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: fail_form_generic_missing_ref_tag.carbon:[[@LINE-8]]:36: note: initializing function parameter [InCallToFunctionParam]
// CHECK:STDERR: fn F(generic Fm: Core.Form, unused x:? Fm) {}
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR:
F(form(ref i32), x);
}
@@ -206,7 +206,7 @@ library "[[@TEST_NAME]]";
// TODO: this code should fail for a different reason, but right now we don't
// have a way to write correct code that reaches the TODO we're exercising here.
fn F(Form:! Core.Form) {
fn F(generic Form: Core.Form) {
// CHECK:STDERR: fail_todo_local_symbolic_form_binding.carbon:[[@LINE+4]]:7: error: semantics TODO: `support local form bindings` [SemanticsTodo]
// CHECK:STDERR: let y:? Form = 0;
// CHECK:STDERR: ^~~~~~~~
@@ -274,7 +274,7 @@ fn F() ->? ref i32;
library "[[@TEST_NAME]]";
//@include-in-dumps
fn F(Fm:! Core.Form, v:? Fm) ->? Fm {
fn F(generic Fm: Core.Form, v:? Fm) ->? Fm {
// TODO: This should fail because `Fm` might be `form(var T)` for a
// non-copyable `T`.
return v;
@@ -673,9 +673,9 @@ fn G() {
// CHECK:STDOUT: %Fm: Core.Form = symbolic_binding Fm, 0 [symbolic]
// CHECK:STDOUT: %.42f: type = type_component_of %Fm [symbolic]
// CHECK:STDOUT: %pattern_type.177: type = pattern_type %.42f [symbolic]
// CHECK:STDOUT: %.f15: %pattern_type.177 = splice_inst @F.%.loc4_23.3 [template]
// CHECK:STDOUT: %.f15: %pattern_type.177 = splice_inst @F.%.loc4_30.3 [template]
// CHECK:STDOUT: %v.patt.0b3: %pattern_type.177 = at_binding_pattern v, %.f15 [template]
// CHECK:STDOUT: %.677: %pattern_type.177 = splice_inst @F.%.loc4_30.3 [template]
// CHECK:STDOUT: %.677: %pattern_type.177 = splice_inst @F.%.loc4_37.3 [template]
// CHECK:STDOUT: %return.patt.113: %pattern_type.177 = return_slot_pattern %.677, %.42f [template]
// CHECK:STDOUT: %.cfa: <instruction> = form_param_pattern_action %Fm, v [template]
// CHECK:STDOUT: %.26b: %pattern_type.177 = splice_inst %.cfa [template]
@@ -816,52 +816,52 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %Fm.patt.loc4_8.1: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_8.2 (constants.%Fm.patt)]
// CHECK:STDOUT: %.loc4_23.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_23.3 [template = %.loc4_23.4 (constants.%.f15)]
// CHECK:STDOUT: %v.patt.loc4_23.1: @F.%pattern_type (%pattern_type.177) = at_binding_pattern v, %.loc4_23.2 [template = %v.patt.loc4_23.2 (constants.%v.patt.0b3)]
// CHECK:STDOUT: %.loc4_30.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.677)]
// CHECK:STDOUT: %return.patt.loc4_30.1: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_30.2, %.loc4_34 [template = %return.patt.loc4_30.2 (constants.%return.patt.113)]
// CHECK:STDOUT: %Fm.patt.loc4_16.1: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_16.2 (constants.%Fm.patt)]
// CHECK:STDOUT: %.loc4_30.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.f15)]
// CHECK:STDOUT: %v.patt.loc4_30.1: @F.%pattern_type (%pattern_type.177) = at_binding_pattern v, %.loc4_30.2 [template = %v.patt.loc4_30.2 (constants.%v.patt.0b3)]
// CHECK:STDOUT: %.loc4_37.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_37.3 [template = %.loc4_37.4 (constants.%.677)]
// CHECK:STDOUT: %return.patt.loc4_37.1: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_37.2, %.loc4_41 [template = %return.patt.loc4_37.2 (constants.%return.patt.113)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Fm.ref.loc4_34: Core.Form = name_ref Fm, %Fm.loc4_8.2 [symbolic = %Fm.loc4_8.1 (constants.%Fm)]
// CHECK:STDOUT: %.loc4_34: type = type_component_of %Fm.ref.loc4_34 [symbolic = %.loc4_26.1 (constants.%.42f)]
// CHECK:STDOUT: %.loc4_15: type = splice_block %Form.ref [concrete = Core.Form] {
// CHECK:STDOUT: %Fm.ref.loc4_41: Core.Form = name_ref Fm, %Fm.loc4_16.2 [symbolic = %Fm.loc4_16.1 (constants.%Fm)]
// CHECK:STDOUT: %.loc4_41: type = type_component_of %Fm.ref.loc4_41 [symbolic = %.loc4_33.1 (constants.%.42f)]
// CHECK:STDOUT: %.loc4_22: type = splice_block %Form.ref [concrete = Core.Form] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Form.ref: type = name_ref Form, imports.%Core.Form [concrete = Core.Form]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Fm.loc4_8.2: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_8.1 (constants.%Fm)]
// CHECK:STDOUT: %.loc4_23.1: @F.%.loc4_26.1 (%.42f) = splice_inst %.loc4_23.5
// CHECK:STDOUT: %.loc4_26.2: Core.Form = splice_block %Fm.ref.loc4_26 [symbolic = %Fm.loc4_8.1 (constants.%Fm)] {
// CHECK:STDOUT: %Fm.ref.loc4_26: Core.Form = name_ref Fm, %Fm.loc4_8.2 [symbolic = %Fm.loc4_8.1 (constants.%Fm)]
// CHECK:STDOUT: %.loc4_26.3: type = type_component_of %Fm.ref.loc4_26 [symbolic = %.loc4_26.1 (constants.%.42f)]
// CHECK:STDOUT: %Fm.loc4_16.2: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_16.1 (constants.%Fm)]
// CHECK:STDOUT: %.loc4_30.1: @F.%.loc4_33.1 (%.42f) = splice_inst %.loc4_30.5
// CHECK:STDOUT: %.loc4_33.2: Core.Form = splice_block %Fm.ref.loc4_33 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] {
// CHECK:STDOUT: %Fm.ref.loc4_33: Core.Form = name_ref Fm, %Fm.loc4_16.2 [symbolic = %Fm.loc4_16.1 (constants.%Fm)]
// CHECK:STDOUT: %.loc4_33.3: type = type_component_of %Fm.ref.loc4_33 [symbolic = %.loc4_33.1 (constants.%.42f)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %v: @F.%.loc4_26.1 (%.42f) = wrapper_binding v, %.loc4_23.1
// CHECK:STDOUT: %.loc4_30.1: @F.%.loc4_26.1 (%.42f) = splice_inst %.loc4_30.5
// CHECK:STDOUT: %return: @F.%.loc4_26.1 (%.42f) = return_slot %.loc4_30.1
// CHECK:STDOUT: %v: @F.%.loc4_33.1 (%.42f) = wrapper_binding v, %.loc4_30.1
// CHECK:STDOUT: %.loc4_37.1: @F.%.loc4_33.1 (%.42f) = splice_inst %.loc4_37.5
// CHECK:STDOUT: %return: @F.%.loc4_33.1 (%.42f) = return_slot %.loc4_37.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%Fm.loc4_8.2: Core.Form) {
// CHECK:STDOUT: %Fm.patt.loc4_8.2: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_8.2 (constants.%Fm.patt)]
// CHECK:STDOUT: %Fm.loc4_8.1: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_8.1 (constants.%Fm)]
// CHECK:STDOUT: %.loc4_26.1: type = type_component_of %Fm.loc4_8.1 [symbolic = %.loc4_26.1 (constants.%.42f)]
// CHECK:STDOUT: %.loc4_23.3: <instruction> = form_param_pattern_action %Fm.ref.loc4_26, v [template]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc4_26.1 [symbolic = %pattern_type (constants.%pattern_type.177)]
// CHECK:STDOUT: %.loc4_23.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_23.3 [template = %.loc4_23.4 (constants.%.f15)]
// CHECK:STDOUT: %v.patt.loc4_23.2: @F.%pattern_type (%pattern_type.177) = at_binding_pattern v, %.loc4_23.4 [template = %v.patt.loc4_23.2 (constants.%v.patt.0b3)]
// CHECK:STDOUT: %.loc4_30.3: <instruction> = out_form_param_pattern_action %Fm.ref.loc4_34 [template]
// CHECK:STDOUT: %.loc4_30.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.677)]
// CHECK:STDOUT: %return.patt.loc4_30.2: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_30.4, %.loc4_26.1 [template = %return.patt.loc4_30.2 (constants.%return.patt.113)]
// CHECK:STDOUT: %.loc4_23.5: <instruction> = callee_pattern_match_action constants.%.f15, call_param0 [template]
// CHECK:STDOUT: %.loc4_30.5: <instruction> = callee_pattern_match_action constants.%.677, call_param1 [template]
// CHECK:STDOUT: generic fn @F(%Fm.loc4_16.2: Core.Form) {
// CHECK:STDOUT: %Fm.patt.loc4_16.2: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_16.2 (constants.%Fm.patt)]
// CHECK:STDOUT: %Fm.loc4_16.1: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_16.1 (constants.%Fm)]
// CHECK:STDOUT: %.loc4_33.1: type = type_component_of %Fm.loc4_16.1 [symbolic = %.loc4_33.1 (constants.%.42f)]
// CHECK:STDOUT: %.loc4_30.3: <instruction> = form_param_pattern_action %Fm.ref.loc4_33, v [template]
// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc4_33.1 [symbolic = %pattern_type (constants.%pattern_type.177)]
// CHECK:STDOUT: %.loc4_30.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.f15)]
// CHECK:STDOUT: %v.patt.loc4_30.2: @F.%pattern_type (%pattern_type.177) = at_binding_pattern v, %.loc4_30.4 [template = %v.patt.loc4_30.2 (constants.%v.patt.0b3)]
// CHECK:STDOUT: %.loc4_37.3: <instruction> = out_form_param_pattern_action %Fm.ref.loc4_41 [template]
// CHECK:STDOUT: %.loc4_37.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_37.3 [template = %.loc4_37.4 (constants.%.677)]
// CHECK:STDOUT: %return.patt.loc4_37.2: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_37.4, %.loc4_33.1 [template = %return.patt.loc4_37.2 (constants.%return.patt.113)]
// CHECK:STDOUT: %.loc4_30.5: <instruction> = callee_pattern_match_action constants.%.f15, call_param0 [template]
// CHECK:STDOUT: %.loc4_37.5: <instruction> = callee_pattern_match_action constants.%.677, call_param1 [template]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc4_26.1 [symbolic = %require_complete (constants.%require_complete.c9b)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc4_33.1 [symbolic = %require_complete (constants.%require_complete.c9b)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%.loc4_23.1: @F.%.loc4_26.1 (%.42f)) -> out %.loc4_30.1:? %Fm {
// CHECK:STDOUT: fn(%.loc4_30.1: @F.%.loc4_33.1 (%.42f)) -> out %.loc4_37.1:? %Fm {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %v.ref: @F.%.loc4_26.1 (%.42f) = name_ref v, %v
// CHECK:STDOUT: %v.ref: @F.%.loc4_33.1 (%.42f) = name_ref v, %v
// CHECK:STDOUT: return %v.ref
// CHECK:STDOUT:
// CHECK:STDOUT: !observes:
@@ -954,69 +954,69 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%Fm) {
// CHECK:STDOUT: %Fm.patt.loc4_8.2 => constants.%Fm.patt
// CHECK:STDOUT: %Fm.loc4_8.1 => constants.%Fm
// CHECK:STDOUT: %.loc4_26.1 => constants.%.42f
// CHECK:STDOUT: %.loc4_23.3 => constants.%.cfa
// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt
// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%Fm
// CHECK:STDOUT: %.loc4_33.1 => constants.%.42f
// CHECK:STDOUT: %.loc4_30.3 => constants.%.cfa
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.177
// CHECK:STDOUT: %.loc4_23.4 => constants.%.26b
// CHECK:STDOUT: %v.patt.loc4_23.2 => constants.%v.patt.cda
// CHECK:STDOUT: %.loc4_30.3 => constants.%.94f
// CHECK:STDOUT: %.loc4_30.4 => constants.%.1ac
// CHECK:STDOUT: %return.patt.loc4_30.2 => constants.%return.patt.333
// CHECK:STDOUT: %.loc4_23.5 => constants.%.095
// CHECK:STDOUT: %.loc4_30.5 => constants.%.efc
// CHECK:STDOUT: %.loc4_30.4 => constants.%.26b
// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.cda
// CHECK:STDOUT: %.loc4_37.3 => constants.%.94f
// CHECK:STDOUT: %.loc4_37.4 => constants.%.1ac
// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.333
// CHECK:STDOUT: %.loc4_30.5 => constants.%.095
// CHECK:STDOUT: %.loc4_37.5 => constants.%.efc
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%.795) {
// CHECK:STDOUT: %Fm.patt.loc4_8.2 => constants.%Fm.patt
// CHECK:STDOUT: %Fm.loc4_8.1 => constants.%.795
// CHECK:STDOUT: %.loc4_26.1 => constants.%i32
// CHECK:STDOUT: %.loc4_23.3 => constants.%inst.splice_block
// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt
// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%.795
// CHECK:STDOUT: %.loc4_33.1 => constants.%i32
// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.splice_block
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6
// CHECK:STDOUT: %.loc4_23.4 => constants.%v.var_patt.13561f.1
// CHECK:STDOUT: %v.patt.loc4_23.2 => constants.%v.patt.b2b
// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.out_param_pattern
// CHECK:STDOUT: %.loc4_30.4 => constants.%return.param_patt.a9a4c7.1
// CHECK:STDOUT: %return.patt.loc4_30.2 => constants.%return.patt.e1b
// CHECK:STDOUT: %.loc4_23.5 => constants.%.095
// CHECK:STDOUT: %.loc4_30.5 => constants.%.efc
// CHECK:STDOUT: %.loc4_30.4 => constants.%v.var_patt.13561f.1
// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.b2b
// CHECK:STDOUT: %.loc4_37.3 => constants.%inst.out_param_pattern
// CHECK:STDOUT: %.loc4_37.4 => constants.%return.param_patt.a9a4c7.1
// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.e1b
// CHECK:STDOUT: %.loc4_30.5 => constants.%.095
// CHECK:STDOUT: %.loc4_37.5 => constants.%.efc
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%.512) {
// CHECK:STDOUT: %Fm.patt.loc4_8.2 => constants.%Fm.patt
// CHECK:STDOUT: %Fm.loc4_8.1 => constants.%.512
// CHECK:STDOUT: %.loc4_26.1 => constants.%i32
// CHECK:STDOUT: %.loc4_23.3 => constants.%inst.ref_param_pattern
// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt
// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%.512
// CHECK:STDOUT: %.loc4_33.1 => constants.%i32
// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.ref_param_pattern
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6
// CHECK:STDOUT: %.loc4_23.4 => constants.%v.param_patt.e9ad17.1
// CHECK:STDOUT: %v.patt.loc4_23.2 => constants.%v.patt.5c0
// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.ref_return_pattern
// CHECK:STDOUT: %.loc4_30.4 => constants.%.ae0167.1
// CHECK:STDOUT: %return.patt.loc4_30.2 => constants.%return.patt.c62
// CHECK:STDOUT: %.loc4_23.5 => constants.%.095
// CHECK:STDOUT: %.loc4_30.5 => constants.%.efc
// CHECK:STDOUT: %.loc4_30.4 => constants.%v.param_patt.e9ad17.1
// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.5c0
// CHECK:STDOUT: %.loc4_37.3 => constants.%inst.ref_return_pattern
// CHECK:STDOUT: %.loc4_37.4 => constants.%.ae0167.1
// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.c62
// CHECK:STDOUT: %.loc4_30.5 => constants.%.095
// CHECK:STDOUT: %.loc4_37.5 => constants.%.efc
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%.c2a) {
// CHECK:STDOUT: %Fm.patt.loc4_8.2 => constants.%Fm.patt
// CHECK:STDOUT: %Fm.loc4_8.1 => constants.%.c2a
// CHECK:STDOUT: %.loc4_26.1 => constants.%i32
// CHECK:STDOUT: %.loc4_23.3 => constants.%inst.value_param_pattern
// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt
// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%.c2a
// CHECK:STDOUT: %.loc4_33.1 => constants.%i32
// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.value_param_pattern
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6
// CHECK:STDOUT: %.loc4_23.4 => constants.%v.param_patt.733534.1
// CHECK:STDOUT: %v.patt.loc4_23.2 => constants.%v.patt.971
// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.value_return_pattern
// CHECK:STDOUT: %.loc4_30.4 => constants.%.1a588f.1
// CHECK:STDOUT: %return.patt.loc4_30.2 => constants.%return.patt.45a
// CHECK:STDOUT: %.loc4_23.5 => constants.%.095
// CHECK:STDOUT: %.loc4_30.5 => constants.%.efc
// CHECK:STDOUT: %.loc4_30.4 => constants.%v.param_patt.733534.1
// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.971
// CHECK:STDOUT: %.loc4_37.3 => constants.%inst.value_return_pattern
// CHECK:STDOUT: %.loc4_37.4 => constants.%.1a588f.1
// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.45a
// CHECK:STDOUT: %.loc4_30.5 => constants.%.095
// CHECK:STDOUT: %.loc4_37.5 => constants.%.efc
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete => constants.%complete_type.f8a