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
+10 -10
View File
@@ -18,7 +18,7 @@ class C {}
impl C as Empty {}
fn F(T:! Empty) {
fn F(generic T: Empty) {
var unused x: T*;
}
@@ -90,13 +90,13 @@ fn F(T:! Empty) {
// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %T.patt.loc21_7.1: %pattern_type.894 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_7.2 (constants.%T.patt.1d7)]
// CHECK:STDOUT: %T.patt.loc21_15.1: %pattern_type.894 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_15.2 (constants.%T.patt.1d7)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc21: type = splice_block %Empty.ref [concrete = constants.%Empty.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc21_7.2: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc21_7.1 (constants.%T.4e8)]
// CHECK:STDOUT: %T.loc21_15.2: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc21_15.1 (constants.%T.4e8)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -130,12 +130,12 @@ fn F(T:! Empty) {
// CHECK:STDOUT: .Self = constants.%C
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%T.loc21_7.2: %Empty.type) {
// CHECK:STDOUT: %T.patt.loc21_7.2: %pattern_type.894 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_7.2 (constants.%T.patt.1d7)]
// CHECK:STDOUT: %T.loc21_7.1: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc21_7.1 (constants.%T.4e8)]
// CHECK:STDOUT: generic fn @F(%T.loc21_15.2: %Empty.type) {
// CHECK:STDOUT: %T.patt.loc21_15.2: %pattern_type.894 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_15.2 (constants.%T.patt.1d7)]
// CHECK:STDOUT: %T.loc21_15.1: %Empty.type = symbolic_binding T, 0 [symbolic = %T.loc21_15.1 (constants.%T.4e8)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc22_18.2: type = facet_access_type %T.loc21_7.1 [symbolic = %T.as_type.loc22_18.2 (constants.%T.as_type.22c)]
// CHECK:STDOUT: %T.as_type.loc22_18.2: type = facet_access_type %T.loc21_15.1 [symbolic = %T.as_type.loc22_18.2 (constants.%T.as_type.22c)]
// CHECK:STDOUT: %ptr.loc22_18.2: type = ptr_type %T.as_type.loc22_18.2 [symbolic = %ptr.loc22_18.2 (constants.%ptr)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc22_18.2 [symbolic = %require_complete (constants.%require_complete.ee8)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc22_18.2 [symbolic = %pattern_type (constants.%pattern_type.777)]
@@ -167,7 +167,7 @@ fn F(T:! Empty) {
// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call: init @F.%ptr.loc22_18.2 (%ptr) = call %specific_impl_fn.loc22_19.1()
// CHECK:STDOUT: assign %x.var, %DefaultOrUnformed.WithSelf.Op.call
// CHECK:STDOUT: %.loc22_18.1: type = splice_block %ptr.loc22_18.1 [symbolic = %ptr.loc22_18.2 (constants.%ptr)] {
// CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc21_7.2 [symbolic = %T.loc21_7.1 (constants.%T.4e8)]
// CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc21_15.2 [symbolic = %T.loc21_15.1 (constants.%T.4e8)]
// CHECK:STDOUT: %T.as_type.loc22_18.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc22_18.2 (constants.%T.as_type.22c)]
// CHECK:STDOUT: %.loc22_18.2: type = converted %T.ref, %T.as_type.loc22_18.1 [symbolic = %T.as_type.loc22_18.2 (constants.%T.as_type.22c)]
// CHECK:STDOUT: %ptr.loc22_18.1: type = ptr_type %.loc22_18.2 [symbolic = %ptr.loc22_18.2 (constants.%ptr)]
@@ -201,7 +201,7 @@ fn F(T:! Empty) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%T.4e8) {
// CHECK:STDOUT: %T.patt.loc21_7.2 => constants.%T.patt.1d7
// CHECK:STDOUT: %T.loc21_7.1 => constants.%T.4e8
// CHECK:STDOUT: %T.patt.loc21_15.2 => constants.%T.patt.1d7
// CHECK:STDOUT: %T.loc21_15.1 => constants.%T.4e8
// CHECK:STDOUT: }
// CHECK:STDOUT:
+3 -3
View File
@@ -13,9 +13,9 @@
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/assoc_const.carbon
interface I {
let T:! type;
let N:! i32;
let Empty:! ();
let T: type;
let N: i32;
let Empty: ();
}
// CHECK:STDOUT: --- assoc_const.carbon
@@ -12,11 +12,11 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/assoc_const_in_generic.carbon
interface I(T:! type) {
fn F(U:! type) -> U;
interface I(T: type) {
fn F(generic U: type) -> U;
}
fn G(T:! type) {
fn G(generic T: type) {
// This should not result in a `fn_decl` instruction being added to the eval
// block for the generic G. This used to crash when printing formatted SemIR
// because the same instruction ended up in multiple scopes.
@@ -76,20 +76,20 @@ fn H() {
// CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] {
// CHECK:STDOUT: %T.patt.loc15_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] {
// CHECK:STDOUT: %.loc15_16.1: type = splice_block %.loc15_16.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc15_17.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc15_16.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc15_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
// CHECK:STDOUT: %T.patt.loc19_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc19_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_15.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc19_10.1: type = splice_block %.loc19_10.2 [concrete = type] {
// CHECK:STDOUT: %.loc19_17.1: type = splice_block %.loc19_17.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc19_10.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc19_17.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc19_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T)]
// CHECK:STDOUT: %T.loc19_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc19_15.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {}
// CHECK:STDOUT: }
@@ -100,33 +100,33 @@ fn H() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc15_14.1)> [symbolic = %I.type (constants.%I.type.3fe)]
// CHECK:STDOUT: %Self.loc15_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self.191)]
// CHECK:STDOUT: %Self.loc15_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self.191)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc15_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self.191)]
// CHECK:STDOUT: %Self.loc15_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self.191)]
// CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
// CHECK:STDOUT: %I.WithSelf.F.decl: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.09f) = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.5f2)] {
// CHECK:STDOUT: %U.patt.loc16_9.1: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc16_9.2 (constants.%U.patt)]
// CHECK:STDOUT: %return.param_patt.loc16_21.1: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = out_param_pattern [symbolic = %return.param_patt.loc16_21.2 (constants.%return.param_patt)]
// CHECK:STDOUT: %return.patt.loc16_18.1: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = return_slot_pattern %return.param_patt.loc16_21.1, %U.ref [symbolic = %return.patt.loc16_18.2 (constants.%return.patt)]
// CHECK:STDOUT: %U.patt.loc16_17.1: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt)]
// CHECK:STDOUT: %return.param_patt.loc16_28.1: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = out_param_pattern [symbolic = %return.param_patt.loc16_28.2 (constants.%return.param_patt)]
// CHECK:STDOUT: %return.patt.loc16_25.1: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = return_slot_pattern %return.param_patt.loc16_28.1, %U.ref [symbolic = %return.patt.loc16_25.2 (constants.%return.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc16_9.2 [symbolic = %U.loc16_9.1 (constants.%U)]
// CHECK:STDOUT: %.loc16_21.2: Core.Form = init_form %U.ref [symbolic = %.loc16_21.1 (constants.%.a6b)]
// CHECK:STDOUT: %.loc16_12.1: type = splice_block %.loc16_12.2 [concrete = type] {
// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc16_17.2 [symbolic = %U.loc16_17.1 (constants.%U)]
// CHECK:STDOUT: %.loc16_28.2: Core.Form = init_form %U.ref [symbolic = %.loc16_28.1 (constants.%.a6b)]
// CHECK:STDOUT: %.loc16_19.1: type = splice_block %.loc16_19.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc16_12.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc16_19.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %U.loc16_9.2: type = symbolic_binding U, 2 [symbolic = %U.loc16_9.1 (constants.%U)]
// CHECK:STDOUT: %return.param: ref @I.WithSelf.F.%U.loc16_9.1 (%U) = out_param call_param0
// CHECK:STDOUT: %return: ref @I.WithSelf.F.%U.loc16_9.1 (%U) = return_slot %return.param
// CHECK:STDOUT: %U.loc16_17.2: type = symbolic_binding U, 2 [symbolic = %U.loc16_17.1 (constants.%U)]
// CHECK:STDOUT: %return.param: ref @I.WithSelf.F.%U.loc16_17.1 (%U) = out_param call_param0
// CHECK:STDOUT: %return: ref @I.WithSelf.F.%U.loc16_17.1 (%U) = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc0.loc16_22.1: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc16_22.2 (constants.%assoc0.13b)]
// CHECK:STDOUT: %assoc0.loc16_29.1: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc16_29.2 (constants.%assoc0.13b)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc15_23.1
// CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc16_22.1
// CHECK:STDOUT: .Self = %Self.loc15_22.1
// CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc16_29.1
// CHECK:STDOUT: witness = (@I.WithSelf.%I.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -135,33 +135,33 @@ fn H() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc15_14.2: type, @I.%Self.loc15_23.1: @I.%I.type (%I.type.3fe), %U.loc16_9.2: type) {
// CHECK:STDOUT: %U.patt.loc16_9.2: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc16_9.2 (constants.%U.patt)]
// CHECK:STDOUT: %U.loc16_9.1: type = symbolic_binding U, 2 [symbolic = %U.loc16_9.1 (constants.%U)]
// CHECK:STDOUT: %.loc16_21.1: Core.Form = init_form %U.loc16_9.1 [symbolic = %.loc16_21.1 (constants.%.a6b)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.loc16_9.1 [symbolic = %pattern_type (constants.%pattern_type.62e)]
// CHECK:STDOUT: %return.param_patt.loc16_21.2: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = out_param_pattern [symbolic = %return.param_patt.loc16_21.2 (constants.%return.param_patt)]
// CHECK:STDOUT: %return.patt.loc16_18.2: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = return_slot_pattern %return.param_patt.loc16_21.2, %U.loc16_9.1 [symbolic = %return.patt.loc16_18.2 (constants.%return.patt)]
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc15_14.2: type, @I.%Self.loc15_22.1: @I.%I.type (%I.type.3fe), %U.loc16_17.2: type) {
// CHECK:STDOUT: %U.patt.loc16_17.2: %pattern_type.98f = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt)]
// CHECK:STDOUT: %U.loc16_17.1: type = symbolic_binding U, 2 [symbolic = %U.loc16_17.1 (constants.%U)]
// CHECK:STDOUT: %.loc16_28.1: Core.Form = init_form %U.loc16_17.1 [symbolic = %.loc16_28.1 (constants.%.a6b)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.loc16_17.1 [symbolic = %pattern_type (constants.%pattern_type.62e)]
// CHECK:STDOUT: %return.param_patt.loc16_28.2: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = out_param_pattern [symbolic = %return.param_patt.loc16_28.2 (constants.%return.param_patt)]
// CHECK:STDOUT: %return.patt.loc16_25.2: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = return_slot_pattern %return.param_patt.loc16_28.2, %U.loc16_17.1 [symbolic = %return.patt.loc16_25.2 (constants.%return.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> out %return.param: @I.WithSelf.F.%U.loc16_9.1 (%U);
// CHECK:STDOUT: fn() -> out %return.param: @I.WithSelf.F.%U.loc16_17.1 (%U);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @G(%T.loc19_7.2: type) {
// CHECK:STDOUT: %T.patt.loc19_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc19_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T)]
// CHECK:STDOUT: generic fn @G(%T.loc19_15.2: type) {
// CHECK:STDOUT: %T.patt.loc19_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_15.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc19_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc19_15.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %I.type.loc23_6.2: type = facet_type <@I, @I(%T.loc19_7.1)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.3fe)]
// CHECK:STDOUT: %I.type.loc23_6.2: type = facet_type <@I, @I(%T.loc19_15.1)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.3fe)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc23_6.2 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc19_7.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.b71)]
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc19_15.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.b71)]
// CHECK:STDOUT: %assoc0: @G.%I.assoc_type (%I.assoc_type.b71) = assoc_entity element0, @I.WithSelf.%I.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.13b)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_7.2 [symbolic = %T.loc19_7.1 (constants.%T)]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_15.2 [symbolic = %T.loc19_15.1 (constants.%T)]
// CHECK:STDOUT: %I.type.loc23_6.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.3fe)]
// CHECK:STDOUT: %.loc23: @G.%I.assoc_type (%I.assoc_type.b71) = specific_constant @I.WithSelf.%assoc0.loc16_22.1, @I.WithSelf(constants.%T, constants.%Self.191) [symbolic = %assoc0 (constants.%assoc0.13b)]
// CHECK:STDOUT: %.loc23: @G.%I.assoc_type (%I.assoc_type.b71) = specific_constant @I.WithSelf.%assoc0.loc16_29.1, @I.WithSelf(constants.%T, constants.%Self.191) [symbolic = %assoc0 (constants.%assoc0.13b)]
// CHECK:STDOUT: %F.ref: @G.%I.assoc_type (%I.assoc_type.b71) = name_ref F, %.loc23 [symbolic = %assoc0 (constants.%assoc0.13b)]
// CHECK:STDOUT: return
// CHECK:STDOUT:
@@ -187,7 +187,7 @@ fn H() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %I.type => constants.%I.type.3fe
// CHECK:STDOUT: %Self.loc15_23.2 => constants.%Self.191
// CHECK:STDOUT: %Self.loc15_22.2 => constants.%Self.191
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf(constants.%T, constants.%Self.191) {
@@ -198,26 +198,26 @@ fn H() {
// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.09f
// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.5f2
// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.b71
// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.13b
// CHECK:STDOUT: %assoc0.loc16_29.2 => constants.%assoc0.13b
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T, constants.%Self.191, constants.%U) {
// CHECK:STDOUT: %U.patt.loc16_9.2 => constants.%U.patt
// CHECK:STDOUT: %U.loc16_9.1 => constants.%U
// CHECK:STDOUT: %.loc16_21.1 => constants.%.a6b
// CHECK:STDOUT: %U.patt.loc16_17.2 => constants.%U.patt
// CHECK:STDOUT: %U.loc16_17.1 => constants.%U
// CHECK:STDOUT: %.loc16_28.1 => constants.%.a6b
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.62e
// CHECK:STDOUT: %return.param_patt.loc16_21.2 => constants.%return.param_patt
// CHECK:STDOUT: %return.patt.loc16_18.2 => constants.%return.patt
// CHECK:STDOUT: %return.param_patt.loc16_28.2 => constants.%return.param_patt
// CHECK:STDOUT: %return.patt.loc16_25.2 => constants.%return.patt
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @G(constants.%T) {
// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc19_7.1 => constants.%T
// CHECK:STDOUT: %T.patt.loc19_15.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc19_15.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @G(constants.%empty_struct_type) {
// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc19_7.1 => constants.%empty_struct_type
// CHECK:STDOUT: %T.patt.loc19_15.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc19_15.1 => constants.%empty_struct_type
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %I.type.loc23_6.2 => constants.%I.type.81d
@@ -232,7 +232,7 @@ fn H() {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %I.type => constants.%I.type.81d
// CHECK:STDOUT: %Self.loc15_23.2 => constants.%Self.524
// CHECK:STDOUT: %Self.loc15_22.2 => constants.%Self.524
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf(constants.%empty_struct_type, constants.%Self.191) {
@@ -243,6 +243,6 @@ fn H() {
// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.272
// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.fb6
// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.cd3
// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.a4c
// CHECK:STDOUT: %assoc0.loc16_29.2 => constants.%assoc0.a4c
// CHECK:STDOUT: }
// CHECK:STDOUT:
+284 -284
View File
@@ -16,14 +16,14 @@
library "[[@TEST_NAME]]";
interface J {
let U:! type;
let U: type;
}
// Simple member access.
fn Simple1(T:! J, unused S:! T.U) {}
fn Simple1(generic T: J, unused generic S: T.U) {}
// This should be equivalent to `Simple1` above, but using compound member access.
fn Compound1(V:! J, unused W:! V.(J.U)) {}
fn Compound1(generic V: J, unused generic W: V.(J.U)) {}
// --- non_instance.carbon
library "[[@TEST_NAME]]";
@@ -33,12 +33,12 @@ interface K1 {
}
// Simple member access.
fn Simple2(T:! K1) {
fn Simple2(generic T: K1) {
T.Q1();
}
// This should be equivalent to `Simple2` above, but using compound member access.
fn Compound2(V:! K1) {
fn Compound2(generic V: K1) {
V.(K1.Q1)();
}
@@ -50,13 +50,13 @@ interface K2 {
}
// Simple member access allows this.
fn Simple3(T:! K2, x: T) {
fn Simple3(generic T: K2, x: T) {
x.Q2();
}
// Compound member access does not. It tries to convert `y` to `K2`, but only
// its type `V` can.
fn Compound3(V:! K2, y: V) {
fn Compound3(generic V: K2, y: V) {
// CHECK:STDERR: fail_caller_instance_interface_not.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `V` into type implementing `K2` [ConversionFailureNonTypeToFacet]
// CHECK:STDERR: y.(K2.Q2)();
// CHECK:STDERR: ^~~~~~~~~
@@ -76,13 +76,13 @@ interface L1 {
}
// Simple member access.
fn Simple4(T:! L1, x: T, p: T*) {
fn Simple4(generic T: L1, x: T, p: T*) {
x.R1();
p->S1();
}
// This should be equivalent to `Simple4` above, but using compound member access.
fn Compound4(V:! L1, y: V, p: V*) {
fn Compound4(generic V: L1, y: V, p: V*) {
y.(L1.R1)();
p->(L1.S1)();
}
@@ -97,7 +97,7 @@ interface L2 {
}
// Simple member access. Fails since calling an instance method without an object.
fn Simple5(T:! L2) {
fn Simple5(generic T: L2) {
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+7]]:3: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch]
// CHECK:STDERR: T.R2();
// CHECK:STDERR: ^~~~~~
@@ -117,7 +117,7 @@ fn Simple5(T:! L2) {
}
// TODO: Expected to fail in the same way as `Simple5`.
fn Compound5(V:! L2) {
fn Compound5(generic V: L2) {
// CHECK:STDERR: fail_interface_instance_caller_not.carbon:[[@LINE+4]]:3: error: cannot access member of interface `L2` in type `L2` that does not implement that interface [MissingImplInMemberAccess]
// CHECK:STDERR: V.(L2.R2)();
// CHECK:STDERR: ^~~~~~~~~
@@ -238,41 +238,41 @@ fn Works() {
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
// CHECK:STDOUT: %Simple1.decl: %Simple1.type = fn_decl @Simple1 [concrete = constants.%Simple1] {
// CHECK:STDOUT: %T.patt.loc8_13.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %S.patt.loc8_27.1: @Simple1.%pattern_type (%pattern_type.0f6fa4.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_27.2 (constants.%S.patt)]
// CHECK:STDOUT: %T.patt.loc8_21.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)]
// CHECK:STDOUT: %S.patt.loc8_42.1: @Simple1.%pattern_type (%pattern_type.0f6fa4.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_42.2 (constants.%S.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc8_16: type = splice_block %J.ref [concrete = constants.%J.type] {
// CHECK:STDOUT: %.Self.frozen.loc8_13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc8_23: type = splice_block %J.ref [concrete = constants.%J.type] {
// CHECK:STDOUT: %.Self.frozen.loc8_21: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_13.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)]
// CHECK:STDOUT: %.loc8_31.1: type = splice_block %impl.elem0.loc8_31.2 [symbolic = %impl.elem0.loc8_31.1 (constants.%impl.elem0.436176.1)] {
// CHECK:STDOUT: %.Self.frozen.loc8_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc8_13.2 [symbolic = %T.loc8_13.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc8_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc8_31.2: type = converted %T.ref, %T.as_type.loc8_31.2 [symbolic = %T.as_type.loc8_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %T.loc8_21.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)]
// CHECK:STDOUT: %.loc8_45.1: type = splice_block %impl.elem0.loc8_45.2 [symbolic = %impl.elem0.loc8_45.1 (constants.%impl.elem0.436176.1)] {
// CHECK:STDOUT: %.Self.frozen.loc8_42: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc8_21.2 [symbolic = %T.loc8_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc8_45.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc8_45.2: type = converted %T.ref, %T.as_type.loc8_45.2 [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)]
// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
// CHECK:STDOUT: %impl.elem0.loc8_31.2: type = impl_witness_access constants.%J.lookup_impl_witness.1952bf.1, element0 [symbolic = %impl.elem0.loc8_31.1 (constants.%impl.elem0.436176.1)]
// CHECK:STDOUT: %impl.elem0.loc8_45.2: type = impl_witness_access constants.%J.lookup_impl_witness.1952bf.1, element0 [symbolic = %impl.elem0.loc8_45.1 (constants.%impl.elem0.436176.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %S.loc8_27.2: @Simple1.%impl.elem0.loc8_31.1 (%impl.elem0.436176.1) = symbolic_binding S, 1 [symbolic = %S.loc8_27.1 (constants.%S)]
// CHECK:STDOUT: %S.loc8_42.2: @Simple1.%impl.elem0.loc8_45.1 (%impl.elem0.436176.1) = symbolic_binding S, 1 [symbolic = %S.loc8_42.1 (constants.%S)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Compound1.decl: %Compound1.type = fn_decl @Compound1 [concrete = constants.%Compound1] {
// CHECK:STDOUT: %V.patt.loc11_15.1: %pattern_type.2c5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %W.patt.loc11_29.1: @Compound1.%pattern_type (%pattern_type.0f6fa4.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_29.2 (constants.%W.patt)]
// CHECK:STDOUT: %V.patt.loc11_23.1: %pattern_type.2c5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_23.2 (constants.%V.patt)]
// CHECK:STDOUT: %W.patt.loc11_44.1: @Compound1.%pattern_type (%pattern_type.0f6fa4.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_44.2 (constants.%W.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc11_18: type = splice_block %J.ref.loc11_18 [concrete = constants.%J.type] {
// CHECK:STDOUT: %.Self.frozen.loc11_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %J.ref.loc11_18: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
// CHECK:STDOUT: %.loc11_25: type = splice_block %J.ref.loc11_25 [concrete = constants.%J.type] {
// CHECK:STDOUT: %.Self.frozen.loc11_23: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %J.ref.loc11_25: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %V.loc11_15.2: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_15.1 (constants.%V)]
// CHECK:STDOUT: %.loc11_33: type = splice_block %impl.elem0.loc11_33.2 [symbolic = %impl.elem0.loc11_33.1 (constants.%impl.elem0.436176.2)] {
// CHECK:STDOUT: %.Self.frozen.loc11_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %V.ref: %J.type = name_ref V, %V.loc11_15.2 [symbolic = %V.loc11_15.1 (constants.%V)]
// CHECK:STDOUT: %J.ref.loc11_35: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
// CHECK:STDOUT: %V.loc11_23.2: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_23.1 (constants.%V)]
// CHECK:STDOUT: %.loc11_47: type = splice_block %impl.elem0.loc11_47.2 [symbolic = %impl.elem0.loc11_47.1 (constants.%impl.elem0.436176.2)] {
// CHECK:STDOUT: %.Self.frozen.loc11_44: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %V.ref: %J.type = name_ref V, %V.loc11_23.2 [symbolic = %V.loc11_23.1 (constants.%V)]
// CHECK:STDOUT: %J.ref.loc11_49: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0]
// CHECK:STDOUT: %impl.elem0.loc11_33.2: type = impl_witness_access constants.%J.lookup_impl_witness.1952bf.2, element0 [symbolic = %impl.elem0.loc11_33.1 (constants.%impl.elem0.436176.2)]
// CHECK:STDOUT: %impl.elem0.loc11_47.2: type = impl_witness_access constants.%J.lookup_impl_witness.1952bf.2, element0 [symbolic = %impl.elem0.loc11_47.1 (constants.%impl.elem0.436176.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %W.loc11_29.2: @Compound1.%impl.elem0.loc11_33.1 (%impl.elem0.436176.2) = symbolic_binding W, 1 [symbolic = %W.loc11_29.1 (constants.%W)]
// CHECK:STDOUT: %W.loc11_44.2: @Compound1.%impl.elem0.loc11_47.1 (%impl.elem0.436176.2) = symbolic_binding W, 1 [symbolic = %W.loc11_44.1 (constants.%W)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -295,15 +295,15 @@ fn Works() {
// CHECK:STDOUT: !observes:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Simple1(%T.loc8_13.2: %J.type, %S.loc8_27.2: @Simple1.%impl.elem0.loc8_31.1 (%impl.elem0.436176.1)) {
// CHECK:STDOUT: %T.patt.loc8_13.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc8_13.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc8_31.1: type = facet_access_type %T.loc8_13.1 [symbolic = %T.as_type.loc8_31.1 (constants.%T.as_type)]
// CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_13.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.1952bf.1)]
// CHECK:STDOUT: %impl.elem0.loc8_31.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_31.1 (constants.%impl.elem0.436176.1)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc8_31.1 [symbolic = %pattern_type (constants.%pattern_type.0f6fa4.1)]
// CHECK:STDOUT: %S.patt.loc8_27.2: @Simple1.%pattern_type (%pattern_type.0f6fa4.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_27.2 (constants.%S.patt)]
// CHECK:STDOUT: %S.loc8_27.1: @Simple1.%impl.elem0.loc8_31.1 (%impl.elem0.436176.1) = symbolic_binding S, 1 [symbolic = %S.loc8_27.1 (constants.%S)]
// CHECK:STDOUT: generic fn @Simple1(%T.loc8_21.2: %J.type, %S.loc8_42.2: @Simple1.%impl.elem0.loc8_45.1 (%impl.elem0.436176.1)) {
// CHECK:STDOUT: %T.patt.loc8_21.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc8_21.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc8_45.1: type = facet_access_type %T.loc8_21.1 [symbolic = %T.as_type.loc8_45.1 (constants.%T.as_type)]
// CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_21.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.1952bf.1)]
// CHECK:STDOUT: %impl.elem0.loc8_45.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc8_45.1 (constants.%impl.elem0.436176.1)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc8_45.1 [symbolic = %pattern_type (constants.%pattern_type.0f6fa4.1)]
// CHECK:STDOUT: %S.patt.loc8_42.2: @Simple1.%pattern_type (%pattern_type.0f6fa4.1) = symbolic_binding_pattern S, 1 [symbolic = %S.patt.loc8_42.2 (constants.%S.patt)]
// CHECK:STDOUT: %S.loc8_42.1: @Simple1.%impl.elem0.loc8_45.1 (%impl.elem0.436176.1) = symbolic_binding S, 1 [symbolic = %S.loc8_42.1 (constants.%S)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
@@ -315,14 +315,14 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Compound1(%V.loc11_15.2: %J.type, %W.loc11_29.2: @Compound1.%impl.elem0.loc11_33.1 (%impl.elem0.436176.2)) {
// CHECK:STDOUT: %V.patt.loc11_15.2: %pattern_type.2c5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc11_15.1: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_15.1 (constants.%V)]
// CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc11_15.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.1952bf.2)]
// CHECK:STDOUT: %impl.elem0.loc11_33.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_33.1 (constants.%impl.elem0.436176.2)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc11_33.1 [symbolic = %pattern_type (constants.%pattern_type.0f6fa4.2)]
// CHECK:STDOUT: %W.patt.loc11_29.2: @Compound1.%pattern_type (%pattern_type.0f6fa4.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_29.2 (constants.%W.patt)]
// CHECK:STDOUT: %W.loc11_29.1: @Compound1.%impl.elem0.loc11_33.1 (%impl.elem0.436176.2) = symbolic_binding W, 1 [symbolic = %W.loc11_29.1 (constants.%W)]
// CHECK:STDOUT: generic fn @Compound1(%V.loc11_23.2: %J.type, %W.loc11_44.2: @Compound1.%impl.elem0.loc11_47.1 (%impl.elem0.436176.2)) {
// CHECK:STDOUT: %V.patt.loc11_23.2: %pattern_type.2c5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_23.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc11_23.1: %J.type = symbolic_binding V, 0 [symbolic = %V.loc11_23.1 (constants.%V)]
// CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc11_23.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.1952bf.2)]
// CHECK:STDOUT: %impl.elem0.loc11_47.1: type = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_47.1 (constants.%impl.elem0.436176.2)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc11_47.1 [symbolic = %pattern_type (constants.%pattern_type.0f6fa4.2)]
// CHECK:STDOUT: %W.patt.loc11_44.2: @Compound1.%pattern_type (%pattern_type.0f6fa4.2) = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc11_44.2 (constants.%W.patt)]
// CHECK:STDOUT: %W.loc11_44.1: @Compound1.%impl.elem0.loc11_47.1 (%impl.elem0.436176.2) = symbolic_binding W, 1 [symbolic = %W.loc11_44.1 (constants.%W)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
@@ -343,14 +343,14 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Simple1(constants.%T, constants.%S) {
// CHECK:STDOUT: %T.patt.loc8_13.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc8_13.1 => constants.%T
// CHECK:STDOUT: %T.as_type.loc8_31.1 => constants.%T.as_type
// CHECK:STDOUT: %T.patt.loc8_21.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc8_21.1 => constants.%T
// CHECK:STDOUT: %T.as_type.loc8_45.1 => constants.%T.as_type
// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.1952bf.1
// CHECK:STDOUT: %impl.elem0.loc8_31.1 => constants.%impl.elem0.436176.1
// CHECK:STDOUT: %impl.elem0.loc8_45.1 => constants.%impl.elem0.436176.1
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.0f6fa4.1
// CHECK:STDOUT: %S.patt.loc8_27.2 => constants.%S.patt
// CHECK:STDOUT: %S.loc8_27.1 => constants.%S
// CHECK:STDOUT: %S.patt.loc8_42.2 => constants.%S.patt
// CHECK:STDOUT: %S.loc8_42.1 => constants.%S
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @J.WithSelf(constants.%V) {
@@ -358,13 +358,13 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Compound1(constants.%V, constants.%W) {
// CHECK:STDOUT: %V.patt.loc11_15.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc11_15.1 => constants.%V
// CHECK:STDOUT: %V.patt.loc11_23.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc11_23.1 => constants.%V
// CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.lookup_impl_witness.1952bf.2
// CHECK:STDOUT: %impl.elem0.loc11_33.1 => constants.%impl.elem0.436176.2
// CHECK:STDOUT: %impl.elem0.loc11_47.1 => constants.%impl.elem0.436176.2
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.0f6fa4.2
// CHECK:STDOUT: %W.patt.loc11_29.2 => constants.%W.patt
// CHECK:STDOUT: %W.loc11_29.1 => constants.%W
// CHECK:STDOUT: %W.patt.loc11_44.2 => constants.%W.patt
// CHECK:STDOUT: %W.loc11_44.1 => constants.%W
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- non_instance.carbon
@@ -420,22 +420,22 @@ fn Works() {
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %K1.decl: type = interface_decl @K1 [concrete = constants.%K1.type] {} {}
// CHECK:STDOUT: %Simple2.decl: %Simple2.type = fn_decl @Simple2 [concrete = constants.%Simple2] {
// CHECK:STDOUT: %T.patt.loc8_13.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc8_21.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc8: type = splice_block %K1.ref [concrete = constants.%K1.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %K1.ref: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_13.2: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)]
// CHECK:STDOUT: %T.loc8_21.2: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Compound2.decl: %Compound2.type = fn_decl @Compound2 [concrete = constants.%Compound2] {
// CHECK:STDOUT: %V.patt.loc13_15.1: %pattern_type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.patt.loc13_23.1: %pattern_type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_23.2 (constants.%V.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc13: type = splice_block %K1.ref.loc13 [concrete = constants.%K1.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %K1.ref.loc13: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %V.loc13_15.2: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_15.1 (constants.%V)]
// CHECK:STDOUT: %V.loc13_23.2: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_23.1 (constants.%V)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -461,21 +461,21 @@ fn Works() {
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Simple2(%T.loc8_13.2: %K1.type) {
// CHECK:STDOUT: %T.patt.loc8_13.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc8_13.1: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)]
// CHECK:STDOUT: generic fn @Simple2(%T.loc8_21.2: %K1.type) {
// CHECK:STDOUT: %T.patt.loc8_21.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc8_21.1: %K1.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc9_4.2: type = facet_access_type %T.loc8_13.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1.WithSelf(%T.loc8_13.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.95e2e8.1)]
// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %T.loc8_13.1 [symbolic = %.loc9_4.2 (constants.%.ad76f4.1)]
// CHECK:STDOUT: %K1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_13.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.27af5e.1)]
// CHECK:STDOUT: %T.as_type.loc9_4.2: type = facet_access_type %T.loc8_21.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1.WithSelf(%T.loc8_21.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.95e2e8.1)]
// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %T.loc8_21.1 [symbolic = %.loc9_4.2 (constants.%.ad76f4.1)]
// CHECK:STDOUT: %K1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_21.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.27af5e.1)]
// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple2.%.loc9_4.2 (%.ad76f4.1) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.6d291b.1)]
// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: <specific function> = specific_impl_function %impl.elem0.loc9_4.2, @K1.WithSelf.Q1(%T.loc8_13.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.747340.1)]
// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: <specific function> = specific_impl_function %impl.elem0.loc9_4.2, @K1.WithSelf.Q1(%T.loc8_21.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.747340.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref: %K1.type = name_ref T, %T.loc8_13.2 [symbolic = %T.loc8_13.1 (constants.%T)]
// CHECK:STDOUT: %T.ref: %K1.type = name_ref T, %T.loc8_21.2 [symbolic = %T.loc8_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc9_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc9_4.1: type = converted %T.ref, %T.as_type.loc9_4.1 [symbolic = %T.as_type.loc9_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.WithSelf.%assoc0 [concrete = constants.%assoc0]
@@ -488,20 +488,20 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Compound2(%V.loc13_15.2: %K1.type) {
// CHECK:STDOUT: %V.patt.loc13_15.2: %pattern_type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc13_15.1: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_15.1 (constants.%V)]
// CHECK:STDOUT: generic fn @Compound2(%V.loc13_23.2: %K1.type) {
// CHECK:STDOUT: %V.patt.loc13_23.2: %pattern_type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_23.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc13_23.1: %K1.type = symbolic_binding V, 0 [symbolic = %V.loc13_23.1 (constants.%V)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1.WithSelf(%V.loc13_15.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.95e2e8.2)]
// CHECK:STDOUT: %.loc14: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %V.loc13_15.1 [symbolic = %.loc14 (constants.%.ad76f4.2)]
// CHECK:STDOUT: %K1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc13_15.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.27af5e.2)]
// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1.WithSelf(%V.loc13_23.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.95e2e8.2)]
// CHECK:STDOUT: %.loc14: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %V.loc13_23.1 [symbolic = %.loc14 (constants.%.ad76f4.2)]
// CHECK:STDOUT: %K1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc13_23.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.27af5e.2)]
// CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14 (%.ad76f4.2) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.6d291b.2)]
// CHECK:STDOUT: %specific_impl_fn.loc14_4.2: <specific function> = specific_impl_function %impl.elem0.loc14_4.2, @K1.WithSelf.Q1(%V.loc13_15.1) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.747340.2)]
// CHECK:STDOUT: %specific_impl_fn.loc14_4.2: <specific function> = specific_impl_function %impl.elem0.loc14_4.2, @K1.WithSelf.Q1(%V.loc13_23.1) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.747340.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %V.ref: %K1.type = name_ref V, %V.loc13_15.2 [symbolic = %V.loc13_15.1 (constants.%V)]
// CHECK:STDOUT: %V.ref: %K1.type = name_ref V, %V.loc13_23.2 [symbolic = %V.loc13_23.1 (constants.%V)]
// CHECK:STDOUT: %K1.ref.loc14: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type]
// CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.WithSelf.%assoc0 [concrete = constants.%assoc0]
// CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14 (%.ad76f4.2) = impl_witness_access constants.%K1.lookup_impl_witness.27af5e.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.6d291b.2)]
@@ -523,8 +523,8 @@ fn Works() {
// CHECK:STDOUT: specific @K1.WithSelf.Q1(constants.%Self) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Simple2(constants.%T) {
// CHECK:STDOUT: %T.patt.loc8_13.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc8_13.1 => constants.%T
// CHECK:STDOUT: %T.patt.loc8_21.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc8_21.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @K1.WithSelf(constants.%T) {
@@ -537,8 +537,8 @@ fn Works() {
// CHECK:STDOUT: specific @K1.WithSelf.Q1(constants.%T) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Compound2(constants.%V) {
// CHECK:STDOUT: %V.patt.loc13_15.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc13_15.1 => constants.%V
// CHECK:STDOUT: %V.patt.loc13_23.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc13_23.1 => constants.%V
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @K1.WithSelf(constants.%V) {
@@ -610,40 +610,40 @@ fn Works() {
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %K2.decl: type = interface_decl @K2 [concrete = constants.%K2.type] {} {}
// CHECK:STDOUT: %Simple3.decl: %Simple3.type = fn_decl @Simple3 [concrete = constants.%Simple3] {
// CHECK:STDOUT: %T.patt.loc8_13.1: %pattern_type.583 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %x.param_patt.loc8_21.1: @Simple3.%pattern_type (%pattern_type.f2711c.1) = value_param_pattern [symbolic = %x.param_patt.loc8_21.2 (constants.%x.param_patt)]
// CHECK:STDOUT: %x.patt.loc8_21.1: @Simple3.%pattern_type (%pattern_type.f2711c.1) = at_binding_pattern x, %x.param_patt.loc8_21.1 [symbolic = %x.patt.loc8_21.2 (constants.%x.patt)]
// CHECK:STDOUT: %T.patt.loc8_21.1: %pattern_type.583 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)]
// CHECK:STDOUT: %x.param_patt.loc8_28.1: @Simple3.%pattern_type (%pattern_type.f2711c.1) = value_param_pattern [symbolic = %x.param_patt.loc8_28.2 (constants.%x.param_patt)]
// CHECK:STDOUT: %x.patt.loc8_28.1: @Simple3.%pattern_type (%pattern_type.f2711c.1) = at_binding_pattern x, %x.param_patt.loc8_28.1 [symbolic = %x.patt.loc8_28.2 (constants.%x.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc8_16: type = splice_block %K2.ref [concrete = constants.%K2.type] {
// CHECK:STDOUT: %.loc8_23: type = splice_block %K2.ref [concrete = constants.%K2.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %K2.ref: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_13.2: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)]
// CHECK:STDOUT: %x.param: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc8_23.1: type = splice_block %.loc8_23.2 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref: %K2.type = name_ref T, %T.loc8_13.2 [symbolic = %T.loc8_13.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc8_23.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc8_23.2: type = converted %T.ref, %T.as_type.loc8_23.2 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)]
// CHECK:STDOUT: %T.loc8_21.2: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)]
// CHECK:STDOUT: %x.param: @Simple3.%T.as_type.loc8_30.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc8_30.1: type = splice_block %.loc8_30.2 [symbolic = %T.as_type.loc8_30.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref: %K2.type = name_ref T, %T.loc8_21.2 [symbolic = %T.loc8_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc8_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc8_30.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc8_30.2: type = converted %T.ref, %T.as_type.loc8_30.2 [symbolic = %T.as_type.loc8_30.1 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = wrapper_binding x, %x.param
// CHECK:STDOUT: %x: @Simple3.%T.as_type.loc8_30.1 (%T.as_type) = wrapper_binding x, %x.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Compound3.decl: %Compound3.type = fn_decl @Compound3 [concrete = constants.%Compound3] {
// CHECK:STDOUT: %V.patt.loc14_15.1: %pattern_type.583 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %y.param_patt.loc14_23.1: @Compound3.%pattern_type (%pattern_type.f2711c.2) = value_param_pattern [symbolic = %y.param_patt.loc14_23.2 (constants.%y.param_patt)]
// CHECK:STDOUT: %y.patt.loc14_23.1: @Compound3.%pattern_type (%pattern_type.f2711c.2) = at_binding_pattern y, %y.param_patt.loc14_23.1 [symbolic = %y.patt.loc14_23.2 (constants.%y.patt)]
// CHECK:STDOUT: %V.patt.loc14_23.1: %pattern_type.583 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_23.2 (constants.%V.patt)]
// CHECK:STDOUT: %y.param_patt.loc14_30.1: @Compound3.%pattern_type (%pattern_type.f2711c.2) = value_param_pattern [symbolic = %y.param_patt.loc14_30.2 (constants.%y.param_patt)]
// CHECK:STDOUT: %y.patt.loc14_30.1: @Compound3.%pattern_type (%pattern_type.f2711c.2) = at_binding_pattern y, %y.param_patt.loc14_30.1 [symbolic = %y.patt.loc14_30.2 (constants.%y.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc14_18: type = splice_block %K2.ref.loc14 [concrete = constants.%K2.type] {
// CHECK:STDOUT: %.loc14_25: type = splice_block %K2.ref.loc14 [concrete = constants.%K2.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %K2.ref.loc14: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %V.loc14_15.2: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_15.1 (constants.%V)]
// CHECK:STDOUT: %y.param: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc14_25.1: type = splice_block %.loc14_25.2 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)] {
// CHECK:STDOUT: %V.ref: %K2.type = name_ref V, %V.loc14_15.2 [symbolic = %V.loc14_15.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc14_25.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)]
// CHECK:STDOUT: %.loc14_25.2: type = converted %V.ref, %V.as_type.loc14_25.2 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)]
// CHECK:STDOUT: %V.loc14_23.2: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_23.1 (constants.%V)]
// CHECK:STDOUT: %y.param: @Compound3.%V.as_type.loc14_32.1 (%V.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc14_32.1: type = splice_block %.loc14_32.2 [symbolic = %V.as_type.loc14_32.1 (constants.%V.as_type)] {
// CHECK:STDOUT: %V.ref: %K2.type = name_ref V, %V.loc14_23.2 [symbolic = %V.loc14_23.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc14_32.2: type = facet_access_type %V.ref [symbolic = %V.as_type.loc14_32.1 (constants.%V.as_type)]
// CHECK:STDOUT: %.loc14_32.2: type = converted %V.ref, %V.as_type.loc14_32.2 [symbolic = %V.as_type.loc14_32.1 (constants.%V.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %y: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = wrapper_binding y, %y.param
// CHECK:STDOUT: %y: @Compound3.%V.as_type.loc14_32.1 (%V.as_type) = wrapper_binding y, %y.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -669,25 +669,25 @@ fn Works() {
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Simple3(%T.loc8_13.2: %K2.type) {
// CHECK:STDOUT: %T.patt.loc8_13.2: %pattern_type.583 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc8_13.1: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_13.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc8_23.1: type = facet_access_type %T.loc8_13.1 [symbolic = %T.as_type.loc8_23.1 (constants.%T.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_23.1 [symbolic = %pattern_type (constants.%pattern_type.f2711c.1)]
// CHECK:STDOUT: %x.param_patt.loc8_21.2: @Simple3.%pattern_type (%pattern_type.f2711c.1) = value_param_pattern [symbolic = %x.param_patt.loc8_21.2 (constants.%x.param_patt)]
// CHECK:STDOUT: %x.patt.loc8_21.2: @Simple3.%pattern_type (%pattern_type.f2711c.1) = at_binding_pattern x, %x.param_patt.loc8_21.2 [symbolic = %x.patt.loc8_21.2 (constants.%x.patt)]
// CHECK:STDOUT: generic fn @Simple3(%T.loc8_21.2: %K2.type) {
// CHECK:STDOUT: %T.patt.loc8_21.2: %pattern_type.583 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_21.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc8_21.1: %K2.type = symbolic_binding T, 0 [symbolic = %T.loc8_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc8_30.1: type = facet_access_type %T.loc8_21.1 [symbolic = %T.as_type.loc8_30.1 (constants.%T.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc8_30.1 [symbolic = %pattern_type (constants.%pattern_type.f2711c.1)]
// CHECK:STDOUT: %x.param_patt.loc8_28.2: @Simple3.%pattern_type (%pattern_type.f2711c.1) = value_param_pattern [symbolic = %x.param_patt.loc8_28.2 (constants.%x.param_patt)]
// CHECK:STDOUT: %x.patt.loc8_28.2: @Simple3.%pattern_type (%pattern_type.f2711c.1) = at_binding_pattern x, %x.param_patt.loc8_28.2 [symbolic = %x.patt.loc8_28.2 (constants.%x.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc8_23.1 [symbolic = %require_complete (constants.%require_complete.041d4e.1)]
// CHECK:STDOUT: %K2.WithSelf.Q2.type: type = fn_type @K2.WithSelf.Q2, @K2.WithSelf(%T.loc8_13.1) [symbolic = %K2.WithSelf.Q2.type (constants.%K2.WithSelf.Q2.type.71e)]
// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type %K2.WithSelf.Q2.type, %T.loc8_13.1 [symbolic = %.loc9 (constants.%.13a)]
// CHECK:STDOUT: %K2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_13.1, @K2 [symbolic = %K2.lookup_impl_witness (constants.%K2.lookup_impl_witness)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc8_30.1 [symbolic = %require_complete (constants.%require_complete.041d4e.1)]
// CHECK:STDOUT: %K2.WithSelf.Q2.type: type = fn_type @K2.WithSelf.Q2, @K2.WithSelf(%T.loc8_21.1) [symbolic = %K2.WithSelf.Q2.type (constants.%K2.WithSelf.Q2.type.71e)]
// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type %K2.WithSelf.Q2.type, %T.loc8_21.1 [symbolic = %.loc9 (constants.%.13a)]
// CHECK:STDOUT: %K2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_21.1, @K2 [symbolic = %K2.lookup_impl_witness (constants.%K2.lookup_impl_witness)]
// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9 (%.13a) = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: <specific function> = specific_impl_function %impl.elem0.loc9_4.2, @K2.WithSelf.Q2(%T.loc8_13.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: <specific function> = specific_impl_function %impl.elem0.loc9_4.2, @K2.WithSelf.Q2(%T.loc8_21.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @Simple3.%T.as_type.loc8_23.1 (%T.as_type)) {
// CHECK:STDOUT: fn(%x.param: @Simple3.%T.as_type.loc8_30.1 (%T.as_type)) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %x.ref: @Simple3.%T.as_type.loc8_23.1 (%T.as_type) = name_ref x, %x
// CHECK:STDOUT: %x.ref: @Simple3.%T.as_type.loc8_30.1 (%T.as_type) = name_ref x, %x
// CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.WithSelf.%assoc0 [concrete = constants.%assoc0.7f8]
// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9 (%.13a) = impl_witness_access constants.%K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc9_4.1: <specific function> = specific_impl_function %impl.elem0.loc9_4.1, @K2.WithSelf.Q2(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)]
@@ -698,20 +698,20 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Compound3(%V.loc14_15.2: %K2.type) {
// CHECK:STDOUT: %V.patt.loc14_15.2: %pattern_type.583 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc14_15.1: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_15.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc14_25.1: type = facet_access_type %V.loc14_15.1 [symbolic = %V.as_type.loc14_25.1 (constants.%V.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc14_25.1 [symbolic = %pattern_type (constants.%pattern_type.f2711c.2)]
// CHECK:STDOUT: %y.param_patt.loc14_23.2: @Compound3.%pattern_type (%pattern_type.f2711c.2) = value_param_pattern [symbolic = %y.param_patt.loc14_23.2 (constants.%y.param_patt)]
// CHECK:STDOUT: %y.patt.loc14_23.2: @Compound3.%pattern_type (%pattern_type.f2711c.2) = at_binding_pattern y, %y.param_patt.loc14_23.2 [symbolic = %y.patt.loc14_23.2 (constants.%y.patt)]
// CHECK:STDOUT: generic fn @Compound3(%V.loc14_23.2: %K2.type) {
// CHECK:STDOUT: %V.patt.loc14_23.2: %pattern_type.583 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc14_23.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc14_23.1: %K2.type = symbolic_binding V, 0 [symbolic = %V.loc14_23.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc14_32.1: type = facet_access_type %V.loc14_23.1 [symbolic = %V.as_type.loc14_32.1 (constants.%V.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %V.as_type.loc14_32.1 [symbolic = %pattern_type (constants.%pattern_type.f2711c.2)]
// CHECK:STDOUT: %y.param_patt.loc14_30.2: @Compound3.%pattern_type (%pattern_type.f2711c.2) = value_param_pattern [symbolic = %y.param_patt.loc14_30.2 (constants.%y.param_patt)]
// CHECK:STDOUT: %y.patt.loc14_30.2: @Compound3.%pattern_type (%pattern_type.f2711c.2) = at_binding_pattern y, %y.param_patt.loc14_30.2 [symbolic = %y.patt.loc14_30.2 (constants.%y.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %V.as_type.loc14_25.1 [symbolic = %require_complete (constants.%require_complete.041d4e.2)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %V.as_type.loc14_32.1 [symbolic = %require_complete (constants.%require_complete.041d4e.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%y.param: @Compound3.%V.as_type.loc14_25.1 (%V.as_type)) {
// CHECK:STDOUT: fn(%y.param: @Compound3.%V.as_type.loc14_32.1 (%V.as_type)) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %y.ref: @Compound3.%V.as_type.loc14_25.1 (%V.as_type) = name_ref y, %y
// CHECK:STDOUT: %y.ref: @Compound3.%V.as_type.loc14_32.1 (%V.as_type) = name_ref y, %y
// CHECK:STDOUT: %K2.ref.loc22: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type]
// CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.WithSelf.%assoc0 [concrete = constants.%assoc0.7f8]
// CHECK:STDOUT: %.loc22: %K2.type = converted %y.ref, <error> [concrete = <error>]
@@ -731,12 +731,12 @@ fn Works() {
// CHECK:STDOUT: specific @K2.WithSelf.Q2(constants.%Self.b0c) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Simple3(constants.%T) {
// CHECK:STDOUT: %T.patt.loc8_13.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc8_13.1 => constants.%T
// CHECK:STDOUT: %T.as_type.loc8_23.1 => constants.%T.as_type
// CHECK:STDOUT: %T.patt.loc8_21.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc8_21.1 => constants.%T
// CHECK:STDOUT: %T.as_type.loc8_30.1 => constants.%T.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.f2711c.1
// CHECK:STDOUT: %x.param_patt.loc8_21.2 => constants.%x.param_patt
// CHECK:STDOUT: %x.patt.loc8_21.2 => constants.%x.patt
// CHECK:STDOUT: %x.param_patt.loc8_28.2 => constants.%x.param_patt
// CHECK:STDOUT: %x.patt.loc8_28.2 => constants.%x.patt
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @K2.WithSelf(constants.%T) {
@@ -749,12 +749,12 @@ fn Works() {
// CHECK:STDOUT: specific @K2.WithSelf.Q2(constants.%T) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Compound3(constants.%V) {
// CHECK:STDOUT: %V.patt.loc14_15.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc14_15.1 => constants.%V
// CHECK:STDOUT: %V.as_type.loc14_25.1 => constants.%V.as_type
// CHECK:STDOUT: %V.patt.loc14_23.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc14_23.1 => constants.%V
// CHECK:STDOUT: %V.as_type.loc14_32.1 => constants.%V.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.f2711c.2
// CHECK:STDOUT: %y.param_patt.loc14_23.2 => constants.%y.param_patt
// CHECK:STDOUT: %y.patt.loc14_23.2 => constants.%y.patt
// CHECK:STDOUT: %y.param_patt.loc14_30.2 => constants.%y.param_patt
// CHECK:STDOUT: %y.patt.loc14_30.2 => constants.%y.patt
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- instance.carbon
@@ -856,60 +856,60 @@ fn Works() {
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %L1.decl: type = interface_decl @L1 [concrete = constants.%L1.type] {} {}
// CHECK:STDOUT: %Simple4.decl: %Simple4.type = fn_decl @Simple4 [concrete = constants.%Simple4] {
// CHECK:STDOUT: %T.patt.loc9_13.1: %pattern_type.b7b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %x.param_patt.loc9_21.1: @Simple4.%pattern_type.loc9_21 (%pattern_type.5697a7.1) = value_param_pattern [symbolic = %x.param_patt.loc9_21.2 (constants.%x.param_patt)]
// CHECK:STDOUT: %x.patt.loc9_21.1: @Simple4.%pattern_type.loc9_21 (%pattern_type.5697a7.1) = at_binding_pattern x, %x.param_patt.loc9_21.1 [symbolic = %x.patt.loc9_21.2 (constants.%x.patt)]
// CHECK:STDOUT: %p.param_patt.loc9_27.1: @Simple4.%pattern_type.loc9_27 (%pattern_type.e0b9be.1) = value_param_pattern [symbolic = %p.param_patt.loc9_27.2 (constants.%p.param_patt.f2a353.1)]
// CHECK:STDOUT: %p.patt.loc9_27.1: @Simple4.%pattern_type.loc9_27 (%pattern_type.e0b9be.1) = at_binding_pattern p, %p.param_patt.loc9_27.1 [symbolic = %p.patt.loc9_27.2 (constants.%p.patt.4967c5.1)]
// CHECK:STDOUT: %T.patt.loc9_21.1: %pattern_type.b7b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_21.2 (constants.%T.patt)]
// CHECK:STDOUT: %x.param_patt.loc9_28.1: @Simple4.%pattern_type.loc9_28 (%pattern_type.5697a7.1) = value_param_pattern [symbolic = %x.param_patt.loc9_28.2 (constants.%x.param_patt)]
// CHECK:STDOUT: %x.patt.loc9_28.1: @Simple4.%pattern_type.loc9_28 (%pattern_type.5697a7.1) = at_binding_pattern x, %x.param_patt.loc9_28.1 [symbolic = %x.patt.loc9_28.2 (constants.%x.patt)]
// CHECK:STDOUT: %p.param_patt.loc9_34.1: @Simple4.%pattern_type.loc9_34 (%pattern_type.e0b9be.1) = value_param_pattern [symbolic = %p.param_patt.loc9_34.2 (constants.%p.param_patt.f2a353.1)]
// CHECK:STDOUT: %p.patt.loc9_34.1: @Simple4.%pattern_type.loc9_34 (%pattern_type.e0b9be.1) = at_binding_pattern p, %p.param_patt.loc9_34.1 [symbolic = %p.patt.loc9_34.2 (constants.%p.patt.4967c5.1)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc9_16: type = splice_block %L1.ref [concrete = constants.%L1.type] {
// CHECK:STDOUT: %.loc9_23: type = splice_block %L1.ref [concrete = constants.%L1.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %L1.ref: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc9_13.2: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_13.1 (constants.%T)]
// CHECK:STDOUT: %x.param: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc9_23.1: type = splice_block %.loc9_23.2 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref.loc9_23: %L1.type = name_ref T, %T.loc9_13.2 [symbolic = %T.loc9_13.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc9_23.2: type = facet_access_type %T.ref.loc9_23 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc9_23.2: type = converted %T.ref.loc9_23, %T.as_type.loc9_23.2 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
// CHECK:STDOUT: %T.loc9_21.2: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_21.1 (constants.%T)]
// CHECK:STDOUT: %x.param: @Simple4.%T.as_type.loc9_30.1 (%T.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc9_30.1: type = splice_block %.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] {
// CHECK:STDOUT: %T.ref.loc9_30: %L1.type = name_ref T, %T.loc9_21.2 [symbolic = %T.loc9_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc9_30.2: type = facet_access_type %T.ref.loc9_30 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref.loc9_30, %T.as_type.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %x: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = wrapper_binding x, %x.param
// CHECK:STDOUT: %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.ed22b9.1) = value_param call_param1
// CHECK:STDOUT: %.loc9_30.1: type = splice_block %ptr.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.ed22b9.1)] {
// CHECK:STDOUT: %T.ref.loc9_29: %L1.type = name_ref T, %T.loc9_13.2 [symbolic = %T.loc9_13.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc9_30: type = facet_access_type %T.ref.loc9_29 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref.loc9_29, %T.as_type.loc9_30 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
// CHECK:STDOUT: %ptr.loc9_30.2: type = ptr_type %.loc9_30.2 [symbolic = %ptr.loc9_30.1 (constants.%ptr.ed22b9.1)]
// CHECK:STDOUT: %x: @Simple4.%T.as_type.loc9_30.1 (%T.as_type) = wrapper_binding x, %x.param
// CHECK:STDOUT: %p.param: @Simple4.%ptr.loc9_37.1 (%ptr.ed22b9.1) = value_param call_param1
// CHECK:STDOUT: %.loc9_37.1: type = splice_block %ptr.loc9_37.2 [symbolic = %ptr.loc9_37.1 (constants.%ptr.ed22b9.1)] {
// CHECK:STDOUT: %T.ref.loc9_36: %L1.type = name_ref T, %T.loc9_21.2 [symbolic = %T.loc9_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc9_37: type = facet_access_type %T.ref.loc9_36 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc9_37.2: type = converted %T.ref.loc9_36, %T.as_type.loc9_37 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)]
// CHECK:STDOUT: %ptr.loc9_37.2: type = ptr_type %.loc9_37.2 [symbolic = %ptr.loc9_37.1 (constants.%ptr.ed22b9.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %p: @Simple4.%ptr.loc9_30.1 (%ptr.ed22b9.1) = wrapper_binding p, %p.param
// CHECK:STDOUT: %p: @Simple4.%ptr.loc9_37.1 (%ptr.ed22b9.1) = wrapper_binding p, %p.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Compound4.decl: %Compound4.type = fn_decl @Compound4 [concrete = constants.%Compound4] {
// CHECK:STDOUT: %V.patt.loc15_15.1: %pattern_type.b7b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc15_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %y.param_patt.loc15_23.1: @Compound4.%pattern_type.loc15_23 (%pattern_type.5697a7.2) = value_param_pattern [symbolic = %y.param_patt.loc15_23.2 (constants.%y.param_patt)]
// CHECK:STDOUT: %y.patt.loc15_23.1: @Compound4.%pattern_type.loc15_23 (%pattern_type.5697a7.2) = at_binding_pattern y, %y.param_patt.loc15_23.1 [symbolic = %y.patt.loc15_23.2 (constants.%y.patt)]
// CHECK:STDOUT: %p.param_patt.loc15_29.1: @Compound4.%pattern_type.loc15_29 (%pattern_type.e0b9be.2) = value_param_pattern [symbolic = %p.param_patt.loc15_29.2 (constants.%p.param_patt.f2a353.2)]
// CHECK:STDOUT: %p.patt.loc15_29.1: @Compound4.%pattern_type.loc15_29 (%pattern_type.e0b9be.2) = at_binding_pattern p, %p.param_patt.loc15_29.1 [symbolic = %p.patt.loc15_29.2 (constants.%p.patt.4967c5.2)]
// CHECK:STDOUT: %V.patt.loc15_23.1: %pattern_type.b7b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc15_23.2 (constants.%V.patt)]
// CHECK:STDOUT: %y.param_patt.loc15_30.1: @Compound4.%pattern_type.loc15_30 (%pattern_type.5697a7.2) = value_param_pattern [symbolic = %y.param_patt.loc15_30.2 (constants.%y.param_patt)]
// CHECK:STDOUT: %y.patt.loc15_30.1: @Compound4.%pattern_type.loc15_30 (%pattern_type.5697a7.2) = at_binding_pattern y, %y.param_patt.loc15_30.1 [symbolic = %y.patt.loc15_30.2 (constants.%y.patt)]
// CHECK:STDOUT: %p.param_patt.loc15_36.1: @Compound4.%pattern_type.loc15_36 (%pattern_type.e0b9be.2) = value_param_pattern [symbolic = %p.param_patt.loc15_36.2 (constants.%p.param_patt.f2a353.2)]
// CHECK:STDOUT: %p.patt.loc15_36.1: @Compound4.%pattern_type.loc15_36 (%pattern_type.e0b9be.2) = at_binding_pattern p, %p.param_patt.loc15_36.1 [symbolic = %p.patt.loc15_36.2 (constants.%p.patt.4967c5.2)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc15_18: type = splice_block %L1.ref.loc15 [concrete = constants.%L1.type] {
// CHECK:STDOUT: %.loc15_25: type = splice_block %L1.ref.loc15 [concrete = constants.%L1.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %L1.ref.loc15: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %V.loc15_15.2: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_15.1 (constants.%V)]
// CHECK:STDOUT: %y.param: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc15_25.1: type = splice_block %.loc15_25.2 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)] {
// CHECK:STDOUT: %V.ref.loc15_25: %L1.type = name_ref V, %V.loc15_15.2 [symbolic = %V.loc15_15.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc15_25.2: type = facet_access_type %V.ref.loc15_25 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
// CHECK:STDOUT: %.loc15_25.2: type = converted %V.ref.loc15_25, %V.as_type.loc15_25.2 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
// CHECK:STDOUT: %V.loc15_23.2: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_23.1 (constants.%V)]
// CHECK:STDOUT: %y.param: @Compound4.%V.as_type.loc15_32.1 (%V.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc15_32.1: type = splice_block %.loc15_32.2 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)] {
// CHECK:STDOUT: %V.ref.loc15_32: %L1.type = name_ref V, %V.loc15_23.2 [symbolic = %V.loc15_23.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc15_32.2: type = facet_access_type %V.ref.loc15_32 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)]
// CHECK:STDOUT: %.loc15_32.2: type = converted %V.ref.loc15_32, %V.as_type.loc15_32.2 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %y: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = wrapper_binding y, %y.param
// CHECK:STDOUT: %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.ed22b9.2) = value_param call_param1
// CHECK:STDOUT: %.loc15_32.1: type = splice_block %ptr.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.ed22b9.2)] {
// CHECK:STDOUT: %V.ref.loc15_31: %L1.type = name_ref V, %V.loc15_15.2 [symbolic = %V.loc15_15.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc15_32: type = facet_access_type %V.ref.loc15_31 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
// CHECK:STDOUT: %.loc15_32.2: type = converted %V.ref.loc15_31, %V.as_type.loc15_32 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
// CHECK:STDOUT: %ptr.loc15_32.2: type = ptr_type %.loc15_32.2 [symbolic = %ptr.loc15_32.1 (constants.%ptr.ed22b9.2)]
// CHECK:STDOUT: %y: @Compound4.%V.as_type.loc15_32.1 (%V.as_type) = wrapper_binding y, %y.param
// CHECK:STDOUT: %p.param: @Compound4.%ptr.loc15_39.1 (%ptr.ed22b9.2) = value_param call_param1
// CHECK:STDOUT: %.loc15_39.1: type = splice_block %ptr.loc15_39.2 [symbolic = %ptr.loc15_39.1 (constants.%ptr.ed22b9.2)] {
// CHECK:STDOUT: %V.ref.loc15_38: %L1.type = name_ref V, %V.loc15_23.2 [symbolic = %V.loc15_23.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc15_39: type = facet_access_type %V.ref.loc15_38 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)]
// CHECK:STDOUT: %.loc15_39.2: type = converted %V.ref.loc15_38, %V.as_type.loc15_39 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)]
// CHECK:STDOUT: %ptr.loc15_39.2: type = ptr_type %.loc15_39.2 [symbolic = %ptr.loc15_39.1 (constants.%ptr.ed22b9.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %p: @Compound4.%ptr.loc15_32.1 (%ptr.ed22b9.2) = wrapper_binding p, %p.param
// CHECK:STDOUT: %p: @Compound4.%ptr.loc15_39.1 (%ptr.ed22b9.2) = wrapper_binding p, %p.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -976,49 +976,49 @@ fn Works() {
// CHECK:STDOUT: fn(%self.param: ref @L1.WithSelf.S1.%Self.as_type.loc5_13.1 (%Self.as_type));
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Simple4(%T.loc9_13.2: %L1.type) {
// CHECK:STDOUT: %T.patt.loc9_13.2: %pattern_type.b7b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc9_13.1: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_13.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc9_23.1: type = facet_access_type %T.loc9_13.1 [symbolic = %T.as_type.loc9_23.1 (constants.%T.as_type)]
// CHECK:STDOUT: %pattern_type.loc9_21: type = pattern_type %T.as_type.loc9_23.1 [symbolic = %pattern_type.loc9_21 (constants.%pattern_type.5697a7.1)]
// CHECK:STDOUT: %x.param_patt.loc9_21.2: @Simple4.%pattern_type.loc9_21 (%pattern_type.5697a7.1) = value_param_pattern [symbolic = %x.param_patt.loc9_21.2 (constants.%x.param_patt)]
// CHECK:STDOUT: %x.patt.loc9_21.2: @Simple4.%pattern_type.loc9_21 (%pattern_type.5697a7.1) = at_binding_pattern x, %x.param_patt.loc9_21.2 [symbolic = %x.patt.loc9_21.2 (constants.%x.patt)]
// CHECK:STDOUT: %ptr.loc9_30.1: type = ptr_type %T.as_type.loc9_23.1 [symbolic = %ptr.loc9_30.1 (constants.%ptr.ed22b9.1)]
// CHECK:STDOUT: %pattern_type.loc9_27: type = pattern_type %ptr.loc9_30.1 [symbolic = %pattern_type.loc9_27 (constants.%pattern_type.e0b9be.1)]
// CHECK:STDOUT: %p.param_patt.loc9_27.2: @Simple4.%pattern_type.loc9_27 (%pattern_type.e0b9be.1) = value_param_pattern [symbolic = %p.param_patt.loc9_27.2 (constants.%p.param_patt.f2a353.1)]
// CHECK:STDOUT: %p.patt.loc9_27.2: @Simple4.%pattern_type.loc9_27 (%pattern_type.e0b9be.1) = at_binding_pattern p, %p.param_patt.loc9_27.2 [symbolic = %p.patt.loc9_27.2 (constants.%p.patt.4967c5.1)]
// CHECK:STDOUT: generic fn @Simple4(%T.loc9_21.2: %L1.type) {
// CHECK:STDOUT: %T.patt.loc9_21.2: %pattern_type.b7b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_21.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc9_21.1: %L1.type = symbolic_binding T, 0 [symbolic = %T.loc9_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc9_30.1: type = facet_access_type %T.loc9_21.1 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)]
// CHECK:STDOUT: %pattern_type.loc9_28: type = pattern_type %T.as_type.loc9_30.1 [symbolic = %pattern_type.loc9_28 (constants.%pattern_type.5697a7.1)]
// CHECK:STDOUT: %x.param_patt.loc9_28.2: @Simple4.%pattern_type.loc9_28 (%pattern_type.5697a7.1) = value_param_pattern [symbolic = %x.param_patt.loc9_28.2 (constants.%x.param_patt)]
// CHECK:STDOUT: %x.patt.loc9_28.2: @Simple4.%pattern_type.loc9_28 (%pattern_type.5697a7.1) = at_binding_pattern x, %x.param_patt.loc9_28.2 [symbolic = %x.patt.loc9_28.2 (constants.%x.patt)]
// CHECK:STDOUT: %ptr.loc9_37.1: type = ptr_type %T.as_type.loc9_30.1 [symbolic = %ptr.loc9_37.1 (constants.%ptr.ed22b9.1)]
// CHECK:STDOUT: %pattern_type.loc9_34: type = pattern_type %ptr.loc9_37.1 [symbolic = %pattern_type.loc9_34 (constants.%pattern_type.e0b9be.1)]
// CHECK:STDOUT: %p.param_patt.loc9_34.2: @Simple4.%pattern_type.loc9_34 (%pattern_type.e0b9be.1) = value_param_pattern [symbolic = %p.param_patt.loc9_34.2 (constants.%p.param_patt.f2a353.1)]
// CHECK:STDOUT: %p.patt.loc9_34.2: @Simple4.%pattern_type.loc9_34 (%pattern_type.e0b9be.1) = at_binding_pattern p, %p.param_patt.loc9_34.2 [symbolic = %p.patt.loc9_34.2 (constants.%p.patt.4967c5.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc9_21: <witness> = require_complete_type %T.as_type.loc9_23.1 [symbolic = %require_complete.loc9_21 (constants.%require_complete.770490.1)]
// CHECK:STDOUT: %require_complete.loc9_27: <witness> = require_complete_type %ptr.loc9_30.1 [symbolic = %require_complete.loc9_27 (constants.%require_complete.0d59a1.1)]
// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1.WithSelf(%T.loc9_13.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.62535e.1)]
// CHECK:STDOUT: %.loc10_4: type = fn_type_with_self_type %L1.WithSelf.R1.type, %T.loc9_13.1 [symbolic = %.loc10_4 (constants.%.56f6e0.1)]
// CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc9_13.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.1)]
// CHECK:STDOUT: %require_complete.loc9_28: <witness> = require_complete_type %T.as_type.loc9_30.1 [symbolic = %require_complete.loc9_28 (constants.%require_complete.770490.1)]
// CHECK:STDOUT: %require_complete.loc9_34: <witness> = require_complete_type %ptr.loc9_37.1 [symbolic = %require_complete.loc9_34 (constants.%require_complete.0d59a1.1)]
// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1.WithSelf(%T.loc9_21.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.62535e.1)]
// CHECK:STDOUT: %.loc10_4: type = fn_type_with_self_type %L1.WithSelf.R1.type, %T.loc9_21.1 [symbolic = %.loc10_4 (constants.%.56f6e0.1)]
// CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc9_21.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.1)]
// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10_4 (%.56f6e0.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.4e8926.1)]
// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: <specific function> = specific_impl_function %impl.elem0.loc10_4.2, @L1.WithSelf.R1(%T.loc9_13.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.e046e8.1)]
// CHECK:STDOUT: %L1.WithSelf.S1.type: type = fn_type @L1.WithSelf.S1, @L1.WithSelf(%T.loc9_13.1) [symbolic = %L1.WithSelf.S1.type (constants.%L1.WithSelf.S1.type.690082.1)]
// CHECK:STDOUT: %.loc11_4.2: type = fn_type_with_self_type %L1.WithSelf.S1.type, %T.loc9_13.1 [symbolic = %.loc11_4.2 (constants.%.b63157.1)]
// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: <specific function> = specific_impl_function %impl.elem0.loc10_4.2, @L1.WithSelf.R1(%T.loc9_21.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.e046e8.1)]
// CHECK:STDOUT: %L1.WithSelf.S1.type: type = fn_type @L1.WithSelf.S1, @L1.WithSelf(%T.loc9_21.1) [symbolic = %L1.WithSelf.S1.type (constants.%L1.WithSelf.S1.type.690082.1)]
// CHECK:STDOUT: %.loc11_4.2: type = fn_type_with_self_type %L1.WithSelf.S1.type, %T.loc9_21.1 [symbolic = %.loc11_4.2 (constants.%.b63157.1)]
// CHECK:STDOUT: %impl.elem1.loc11_4.2: @Simple4.%.loc11_4.2 (%.b63157.1) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.86bb43.1)]
// CHECK:STDOUT: %specific_impl_fn.loc11_4.2: <specific function> = specific_impl_function %impl.elem1.loc11_4.2, @L1.WithSelf.S1(%T.loc9_13.1) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.340d61.1)]
// CHECK:STDOUT: %specific_impl_fn.loc11_4.2: <specific function> = specific_impl_function %impl.elem1.loc11_4.2, @L1.WithSelf.S1(%T.loc9_21.1) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.340d61.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%x.param: @Simple4.%T.as_type.loc9_23.1 (%T.as_type), %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.ed22b9.1)) {
// CHECK:STDOUT: fn(%x.param: @Simple4.%T.as_type.loc9_30.1 (%T.as_type), %p.param: @Simple4.%ptr.loc9_37.1 (%ptr.ed22b9.1)) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %x.ref: @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = name_ref x, %x
// CHECK:STDOUT: %x.ref: @Simple4.%T.as_type.loc9_30.1 (%T.as_type) = name_ref x, %x
// CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.WithSelf.%assoc0 [concrete = constants.%assoc0]
// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10_4 (%.56f6e0.1) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.4e8926.1)]
// CHECK:STDOUT: %bound_method.loc10_4: <bound method> = bound_method %x.ref, %impl.elem0.loc10_4.1
// CHECK:STDOUT: %.loc10_8.1: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)]
// CHECK:STDOUT: %.loc10_8.2: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)]
// CHECK:STDOUT: %.loc10_8.1: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_21.1 (constants.%T)]
// CHECK:STDOUT: %.loc10_8.2: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_21.1 (constants.%T)]
// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: <specific function> = specific_impl_function %impl.elem0.loc10_4.1, @L1.WithSelf.R1(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.e046e8.1)]
// CHECK:STDOUT: %bound_method.loc10_8: <bound method> = bound_method %x.ref, %specific_impl_fn.loc10_4.1
// CHECK:STDOUT: %L1.WithSelf.R1.call: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref)
// CHECK:STDOUT: %p.ref: @Simple4.%ptr.loc9_30.1 (%ptr.ed22b9.1) = name_ref p, %p
// CHECK:STDOUT: %.loc11_4.1: ref @Simple4.%T.as_type.loc9_23.1 (%T.as_type) = deref %p.ref
// CHECK:STDOUT: %p.ref: @Simple4.%ptr.loc9_37.1 (%ptr.ed22b9.1) = name_ref p, %p
// CHECK:STDOUT: %.loc11_4.1: ref @Simple4.%T.as_type.loc9_30.1 (%T.as_type) = deref %p.ref
// CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.WithSelf.%assoc1 [concrete = constants.%assoc1]
// CHECK:STDOUT: %impl.elem1.loc11_4.1: @Simple4.%.loc11_4.2 (%.b63157.1) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.1, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.86bb43.1)]
// CHECK:STDOUT: %bound_method.loc11_4: <bound method> = bound_method %.loc11_4.1, %impl.elem1.loc11_4.1
// CHECK:STDOUT: %.loc11_9.1: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)]
// CHECK:STDOUT: %.loc11_9.2: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_13.1 (constants.%T)]
// CHECK:STDOUT: %.loc11_9.1: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_21.1 (constants.%T)]
// CHECK:STDOUT: %.loc11_9.2: %L1.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc9_21.1 (constants.%T)]
// CHECK:STDOUT: %specific_impl_fn.loc11_4.1: <specific function> = specific_impl_function %impl.elem1.loc11_4.1, @L1.WithSelf.S1(constants.%T) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.340d61.1)]
// CHECK:STDOUT: %bound_method.loc11_9: <bound method> = bound_method %.loc11_4.1, %specific_impl_fn.loc11_4.1
// CHECK:STDOUT: %L1.WithSelf.S1.call: init %empty_tuple.type = call %bound_method.loc11_9(%.loc11_4.1)
@@ -1028,51 +1028,51 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Compound4(%V.loc15_15.2: %L1.type) {
// CHECK:STDOUT: %V.patt.loc15_15.2: %pattern_type.b7b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc15_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc15_15.1: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_15.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc15_25.1: type = facet_access_type %V.loc15_15.1 [symbolic = %V.as_type.loc15_25.1 (constants.%V.as_type)]
// CHECK:STDOUT: %pattern_type.loc15_23: type = pattern_type %V.as_type.loc15_25.1 [symbolic = %pattern_type.loc15_23 (constants.%pattern_type.5697a7.2)]
// CHECK:STDOUT: %y.param_patt.loc15_23.2: @Compound4.%pattern_type.loc15_23 (%pattern_type.5697a7.2) = value_param_pattern [symbolic = %y.param_patt.loc15_23.2 (constants.%y.param_patt)]
// CHECK:STDOUT: %y.patt.loc15_23.2: @Compound4.%pattern_type.loc15_23 (%pattern_type.5697a7.2) = at_binding_pattern y, %y.param_patt.loc15_23.2 [symbolic = %y.patt.loc15_23.2 (constants.%y.patt)]
// CHECK:STDOUT: %ptr.loc15_32.1: type = ptr_type %V.as_type.loc15_25.1 [symbolic = %ptr.loc15_32.1 (constants.%ptr.ed22b9.2)]
// CHECK:STDOUT: %pattern_type.loc15_29: type = pattern_type %ptr.loc15_32.1 [symbolic = %pattern_type.loc15_29 (constants.%pattern_type.e0b9be.2)]
// CHECK:STDOUT: %p.param_patt.loc15_29.2: @Compound4.%pattern_type.loc15_29 (%pattern_type.e0b9be.2) = value_param_pattern [symbolic = %p.param_patt.loc15_29.2 (constants.%p.param_patt.f2a353.2)]
// CHECK:STDOUT: %p.patt.loc15_29.2: @Compound4.%pattern_type.loc15_29 (%pattern_type.e0b9be.2) = at_binding_pattern p, %p.param_patt.loc15_29.2 [symbolic = %p.patt.loc15_29.2 (constants.%p.patt.4967c5.2)]
// CHECK:STDOUT: generic fn @Compound4(%V.loc15_23.2: %L1.type) {
// CHECK:STDOUT: %V.patt.loc15_23.2: %pattern_type.b7b = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc15_23.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc15_23.1: %L1.type = symbolic_binding V, 0 [symbolic = %V.loc15_23.1 (constants.%V)]
// CHECK:STDOUT: %V.as_type.loc15_32.1: type = facet_access_type %V.loc15_23.1 [symbolic = %V.as_type.loc15_32.1 (constants.%V.as_type)]
// CHECK:STDOUT: %pattern_type.loc15_30: type = pattern_type %V.as_type.loc15_32.1 [symbolic = %pattern_type.loc15_30 (constants.%pattern_type.5697a7.2)]
// CHECK:STDOUT: %y.param_patt.loc15_30.2: @Compound4.%pattern_type.loc15_30 (%pattern_type.5697a7.2) = value_param_pattern [symbolic = %y.param_patt.loc15_30.2 (constants.%y.param_patt)]
// CHECK:STDOUT: %y.patt.loc15_30.2: @Compound4.%pattern_type.loc15_30 (%pattern_type.5697a7.2) = at_binding_pattern y, %y.param_patt.loc15_30.2 [symbolic = %y.patt.loc15_30.2 (constants.%y.patt)]
// CHECK:STDOUT: %ptr.loc15_39.1: type = ptr_type %V.as_type.loc15_32.1 [symbolic = %ptr.loc15_39.1 (constants.%ptr.ed22b9.2)]
// CHECK:STDOUT: %pattern_type.loc15_36: type = pattern_type %ptr.loc15_39.1 [symbolic = %pattern_type.loc15_36 (constants.%pattern_type.e0b9be.2)]
// CHECK:STDOUT: %p.param_patt.loc15_36.2: @Compound4.%pattern_type.loc15_36 (%pattern_type.e0b9be.2) = value_param_pattern [symbolic = %p.param_patt.loc15_36.2 (constants.%p.param_patt.f2a353.2)]
// CHECK:STDOUT: %p.patt.loc15_36.2: @Compound4.%pattern_type.loc15_36 (%pattern_type.e0b9be.2) = at_binding_pattern p, %p.param_patt.loc15_36.2 [symbolic = %p.patt.loc15_36.2 (constants.%p.patt.4967c5.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc15_23: <witness> = require_complete_type %V.as_type.loc15_25.1 [symbolic = %require_complete.loc15_23 (constants.%require_complete.770490.2)]
// CHECK:STDOUT: %require_complete.loc15_29: <witness> = require_complete_type %ptr.loc15_32.1 [symbolic = %require_complete.loc15_29 (constants.%require_complete.0d59a1.2)]
// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1.WithSelf(%V.loc15_15.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.62535e.2)]
// CHECK:STDOUT: %.loc16_4: type = fn_type_with_self_type %L1.WithSelf.R1.type, %V.loc15_15.1 [symbolic = %.loc16_4 (constants.%.56f6e0.2)]
// CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc15_15.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.2)]
// CHECK:STDOUT: %require_complete.loc15_30: <witness> = require_complete_type %V.as_type.loc15_32.1 [symbolic = %require_complete.loc15_30 (constants.%require_complete.770490.2)]
// CHECK:STDOUT: %require_complete.loc15_36: <witness> = require_complete_type %ptr.loc15_39.1 [symbolic = %require_complete.loc15_36 (constants.%require_complete.0d59a1.2)]
// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1.WithSelf(%V.loc15_23.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.62535e.2)]
// CHECK:STDOUT: %.loc16_4: type = fn_type_with_self_type %L1.WithSelf.R1.type, %V.loc15_23.1 [symbolic = %.loc16_4 (constants.%.56f6e0.2)]
// CHECK:STDOUT: %L1.lookup_impl_witness: <witness> = lookup_impl_witness %V.loc15_23.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.cca206.2)]
// CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16_4 (%.56f6e0.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.4e8926.2)]
// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: <specific function> = specific_impl_function %impl.elem0.loc16_4.2, @L1.WithSelf.R1(%V.loc15_15.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.e046e8.2)]
// CHECK:STDOUT: %L1.WithSelf.S1.type: type = fn_type @L1.WithSelf.S1, @L1.WithSelf(%V.loc15_15.1) [symbolic = %L1.WithSelf.S1.type (constants.%L1.WithSelf.S1.type.690082.2)]
// CHECK:STDOUT: %.loc17_4.2: type = fn_type_with_self_type %L1.WithSelf.S1.type, %V.loc15_15.1 [symbolic = %.loc17_4.2 (constants.%.b63157.2)]
// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: <specific function> = specific_impl_function %impl.elem0.loc16_4.2, @L1.WithSelf.R1(%V.loc15_23.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.e046e8.2)]
// CHECK:STDOUT: %L1.WithSelf.S1.type: type = fn_type @L1.WithSelf.S1, @L1.WithSelf(%V.loc15_23.1) [symbolic = %L1.WithSelf.S1.type (constants.%L1.WithSelf.S1.type.690082.2)]
// CHECK:STDOUT: %.loc17_4.2: type = fn_type_with_self_type %L1.WithSelf.S1.type, %V.loc15_23.1 [symbolic = %.loc17_4.2 (constants.%.b63157.2)]
// CHECK:STDOUT: %impl.elem1.loc17_4.2: @Compound4.%.loc17_4.2 (%.b63157.2) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.86bb43.2)]
// CHECK:STDOUT: %specific_impl_fn.loc17_4.2: <specific function> = specific_impl_function %impl.elem1.loc17_4.2, @L1.WithSelf.S1(%V.loc15_15.1) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.340d61.2)]
// CHECK:STDOUT: %specific_impl_fn.loc17_4.2: <specific function> = specific_impl_function %impl.elem1.loc17_4.2, @L1.WithSelf.S1(%V.loc15_23.1) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.340d61.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%y.param: @Compound4.%V.as_type.loc15_25.1 (%V.as_type), %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.ed22b9.2)) {
// CHECK:STDOUT: fn(%y.param: @Compound4.%V.as_type.loc15_32.1 (%V.as_type), %p.param: @Compound4.%ptr.loc15_39.1 (%ptr.ed22b9.2)) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %y.ref: @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = name_ref y, %y
// CHECK:STDOUT: %y.ref: @Compound4.%V.as_type.loc15_32.1 (%V.as_type) = name_ref y, %y
// CHECK:STDOUT: %L1.ref.loc16: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
// CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.WithSelf.%assoc0 [concrete = constants.%assoc0]
// CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16_4 (%.56f6e0.2) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.4e8926.2)]
// CHECK:STDOUT: %bound_method.loc16_4: <bound method> = bound_method %y.ref, %impl.elem0.loc16_4.1
// CHECK:STDOUT: %.loc16_13.1: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)]
// CHECK:STDOUT: %.loc16_13.2: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)]
// CHECK:STDOUT: %.loc16_13.1: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_23.1 (constants.%V)]
// CHECK:STDOUT: %.loc16_13.2: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_23.1 (constants.%V)]
// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: <specific function> = specific_impl_function %impl.elem0.loc16_4.1, @L1.WithSelf.R1(constants.%V) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.e046e8.2)]
// CHECK:STDOUT: %bound_method.loc16_13: <bound method> = bound_method %y.ref, %specific_impl_fn.loc16_4.1
// CHECK:STDOUT: %L1.WithSelf.R1.call: init %empty_tuple.type = call %bound_method.loc16_13(%y.ref)
// CHECK:STDOUT: %p.ref: @Compound4.%ptr.loc15_32.1 (%ptr.ed22b9.2) = name_ref p, %p
// CHECK:STDOUT: %p.ref: @Compound4.%ptr.loc15_39.1 (%ptr.ed22b9.2) = name_ref p, %p
// CHECK:STDOUT: %L1.ref.loc17: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type]
// CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.WithSelf.%assoc1 [concrete = constants.%assoc1]
// CHECK:STDOUT: %.loc17_4.1: ref @Compound4.%V.as_type.loc15_25.1 (%V.as_type) = deref %p.ref
// CHECK:STDOUT: %.loc17_4.1: ref @Compound4.%V.as_type.loc15_32.1 (%V.as_type) = deref %p.ref
// CHECK:STDOUT: %impl.elem1.loc17_4.1: @Compound4.%.loc17_4.2 (%.b63157.2) = impl_witness_access constants.%L1.lookup_impl_witness.cca206.2, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.86bb43.2)]
// CHECK:STDOUT: %bound_method.loc17_4: <bound method> = bound_method %.loc17_4.1, %impl.elem1.loc17_4.1
// CHECK:STDOUT: %.loc17_14.1: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)]
// CHECK:STDOUT: %.loc17_14.2: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_15.1 (constants.%V)]
// CHECK:STDOUT: %.loc17_14.1: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_23.1 (constants.%V)]
// CHECK:STDOUT: %.loc17_14.2: %L1.type = converted constants.%V.as_type, constants.%V [symbolic = %V.loc15_23.1 (constants.%V)]
// CHECK:STDOUT: %specific_impl_fn.loc17_4.1: <specific function> = specific_impl_function %impl.elem1.loc17_4.1, @L1.WithSelf.S1(constants.%V) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.340d61.2)]
// CHECK:STDOUT: %bound_method.loc17_14: <bound method> = bound_method %.loc17_4.1, %specific_impl_fn.loc17_4.1
// CHECK:STDOUT: %L1.WithSelf.S1.call: init %empty_tuple.type = call %bound_method.loc17_14(%.loc17_4.1)
@@ -1108,16 +1108,16 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Simple4(constants.%T) {
// CHECK:STDOUT: %T.patt.loc9_13.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc9_13.1 => constants.%T
// CHECK:STDOUT: %T.as_type.loc9_23.1 => constants.%T.as_type
// CHECK:STDOUT: %pattern_type.loc9_21 => constants.%pattern_type.5697a7.1
// CHECK:STDOUT: %x.param_patt.loc9_21.2 => constants.%x.param_patt
// CHECK:STDOUT: %x.patt.loc9_21.2 => constants.%x.patt
// CHECK:STDOUT: %ptr.loc9_30.1 => constants.%ptr.ed22b9.1
// CHECK:STDOUT: %pattern_type.loc9_27 => constants.%pattern_type.e0b9be.1
// CHECK:STDOUT: %p.param_patt.loc9_27.2 => constants.%p.param_patt.f2a353.1
// CHECK:STDOUT: %p.patt.loc9_27.2 => constants.%p.patt.4967c5.1
// CHECK:STDOUT: %T.patt.loc9_21.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc9_21.1 => constants.%T
// CHECK:STDOUT: %T.as_type.loc9_30.1 => constants.%T.as_type
// CHECK:STDOUT: %pattern_type.loc9_28 => constants.%pattern_type.5697a7.1
// CHECK:STDOUT: %x.param_patt.loc9_28.2 => constants.%x.param_patt
// CHECK:STDOUT: %x.patt.loc9_28.2 => constants.%x.patt
// CHECK:STDOUT: %ptr.loc9_37.1 => constants.%ptr.ed22b9.1
// CHECK:STDOUT: %pattern_type.loc9_34 => constants.%pattern_type.e0b9be.1
// CHECK:STDOUT: %p.param_patt.loc9_34.2 => constants.%p.param_patt.f2a353.1
// CHECK:STDOUT: %p.patt.loc9_34.2 => constants.%p.patt.4967c5.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @L1.WithSelf(constants.%T) {
@@ -1146,16 +1146,16 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Compound4(constants.%V) {
// CHECK:STDOUT: %V.patt.loc15_15.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc15_15.1 => constants.%V
// CHECK:STDOUT: %V.as_type.loc15_25.1 => constants.%V.as_type
// CHECK:STDOUT: %pattern_type.loc15_23 => constants.%pattern_type.5697a7.2
// CHECK:STDOUT: %y.param_patt.loc15_23.2 => constants.%y.param_patt
// CHECK:STDOUT: %y.patt.loc15_23.2 => constants.%y.patt
// CHECK:STDOUT: %ptr.loc15_32.1 => constants.%ptr.ed22b9.2
// CHECK:STDOUT: %pattern_type.loc15_29 => constants.%pattern_type.e0b9be.2
// CHECK:STDOUT: %p.param_patt.loc15_29.2 => constants.%p.param_patt.f2a353.2
// CHECK:STDOUT: %p.patt.loc15_29.2 => constants.%p.patt.4967c5.2
// CHECK:STDOUT: %V.patt.loc15_23.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc15_23.1 => constants.%V
// CHECK:STDOUT: %V.as_type.loc15_32.1 => constants.%V.as_type
// CHECK:STDOUT: %pattern_type.loc15_30 => constants.%pattern_type.5697a7.2
// CHECK:STDOUT: %y.param_patt.loc15_30.2 => constants.%y.param_patt
// CHECK:STDOUT: %y.patt.loc15_30.2 => constants.%y.patt
// CHECK:STDOUT: %ptr.loc15_39.1 => constants.%ptr.ed22b9.2
// CHECK:STDOUT: %pattern_type.loc15_36 => constants.%pattern_type.e0b9be.2
// CHECK:STDOUT: %p.param_patt.loc15_36.2 => constants.%p.param_patt.f2a353.2
// CHECK:STDOUT: %p.patt.loc15_36.2 => constants.%p.patt.4967c5.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @L1.WithSelf(constants.%V) {
@@ -1241,22 +1241,22 @@ fn Works() {
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %L2.decl: type = interface_decl @L2 [concrete = constants.%L2.type] {} {}
// CHECK:STDOUT: %Simple5.decl: %Simple5.type = fn_decl @Simple5 [concrete = constants.%Simple5] {
// CHECK:STDOUT: %T.patt.loc10_13.1: %pattern_type.5b3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc10_21.1: %pattern_type.5b3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_21.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc10: type = splice_block %L2.ref [concrete = constants.%L2.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %L2.ref: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc10_13.2: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_13.1 (constants.%T)]
// CHECK:STDOUT: %T.loc10_21.2: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_21.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Compound5.decl: %Compound5.type = fn_decl @Compound5 [concrete = constants.%Compound5] {
// CHECK:STDOUT: %V.patt.loc30_15.1: %pattern_type.5b3 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc30_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.patt.loc30_23.1: %pattern_type.5b3 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc30_23.2 (constants.%V.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc30: type = splice_block %L2.ref.loc30 [concrete = constants.%L2.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %L2.ref.loc30: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %V.loc30_15.2: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_15.1 (constants.%V)]
// CHECK:STDOUT: %V.loc30_23.2: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_23.1 (constants.%V)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1323,28 +1323,28 @@ fn Works() {
// CHECK:STDOUT: fn(%self.param: ref @L2.WithSelf.S2.%Self.as_type.loc6_13.1 (%Self.as_type));
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Simple5(%T.loc10_13.2: %L2.type) {
// CHECK:STDOUT: %T.patt.loc10_13.2: %pattern_type.5b3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_13.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc10_13.1: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_13.1 (constants.%T)]
// CHECK:STDOUT: generic fn @Simple5(%T.loc10_21.2: %L2.type) {
// CHECK:STDOUT: %T.patt.loc10_21.2: %pattern_type.5b3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_21.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc10_21.1: %L2.type = symbolic_binding T, 0 [symbolic = %T.loc10_21.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc18_4.2: type = facet_access_type %T.loc10_13.1 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %L2.WithSelf.R2.type: type = fn_type @L2.WithSelf.R2, @L2.WithSelf(%T.loc10_13.1) [symbolic = %L2.WithSelf.R2.type (constants.%L2.WithSelf.R2.type.1a9)]
// CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type %L2.WithSelf.R2.type, %T.loc10_13.1 [symbolic = %.loc18_4.2 (constants.%.244)]
// CHECK:STDOUT: %L2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc10_13.1, @L2 [symbolic = %L2.lookup_impl_witness (constants.%L2.lookup_impl_witness.d84)]
// CHECK:STDOUT: %T.as_type.loc18_4.2: type = facet_access_type %T.loc10_21.1 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %L2.WithSelf.R2.type: type = fn_type @L2.WithSelf.R2, @L2.WithSelf(%T.loc10_21.1) [symbolic = %L2.WithSelf.R2.type (constants.%L2.WithSelf.R2.type.1a9)]
// CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type %L2.WithSelf.R2.type, %T.loc10_21.1 [symbolic = %.loc18_4.2 (constants.%.244)]
// CHECK:STDOUT: %L2.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc10_21.1, @L2 [symbolic = %L2.lookup_impl_witness (constants.%L2.lookup_impl_witness.d84)]
// CHECK:STDOUT: %impl.elem0.loc18_4.2: @Simple5.%.loc18_4.2 (%.244) = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %L2.WithSelf.S2.type: type = fn_type @L2.WithSelf.S2, @L2.WithSelf(%T.loc10_13.1) [symbolic = %L2.WithSelf.S2.type (constants.%L2.WithSelf.S2.type.937)]
// CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type %L2.WithSelf.S2.type, %T.loc10_13.1 [symbolic = %.loc26_4.2 (constants.%.451)]
// CHECK:STDOUT: %L2.WithSelf.S2.type: type = fn_type @L2.WithSelf.S2, @L2.WithSelf(%T.loc10_21.1) [symbolic = %L2.WithSelf.S2.type (constants.%L2.WithSelf.S2.type.937)]
// CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type %L2.WithSelf.S2.type, %T.loc10_21.1 [symbolic = %.loc26_4.2 (constants.%.451)]
// CHECK:STDOUT: %impl.elem1.loc26_4.2: @Simple5.%.loc26_4.2 (%.451) = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref.loc18: %L2.type = name_ref T, %T.loc10_13.2 [symbolic = %T.loc10_13.1 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc18: %L2.type = name_ref T, %T.loc10_21.2 [symbolic = %T.loc10_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc18_4.1: type = facet_access_type %T.ref.loc18 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc18_4.1: type = converted %T.ref.loc18, %T.as_type.loc18_4.1 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.WithSelf.%assoc0 [concrete = constants.%assoc0]
// CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.244) = impl_witness_access constants.%L2.lookup_impl_witness.d84, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_13.2 [symbolic = %T.loc10_13.1 (constants.%T)]
// CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_21.2 [symbolic = %T.loc10_21.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc26_4.1: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.as_type.loc18_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.WithSelf.%assoc1 [concrete = constants.%assoc1]
@@ -1355,18 +1355,18 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Compound5(%V.loc30_15.2: %L2.type) {
// CHECK:STDOUT: %V.patt.loc30_15.2: %pattern_type.5b3 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc30_15.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc30_15.1: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_15.1 (constants.%V)]
// CHECK:STDOUT: generic fn @Compound5(%V.loc30_23.2: %L2.type) {
// CHECK:STDOUT: %V.patt.loc30_23.2: %pattern_type.5b3 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc30_23.2 (constants.%V.patt)]
// CHECK:STDOUT: %V.loc30_23.1: %L2.type = symbolic_binding V, 0 [symbolic = %V.loc30_23.1 (constants.%V)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %V.ref.loc35: %L2.type = name_ref V, %V.loc30_15.2 [symbolic = %V.loc30_15.1 (constants.%V)]
// CHECK:STDOUT: %V.ref.loc35: %L2.type = name_ref V, %V.loc30_23.2 [symbolic = %V.loc30_23.1 (constants.%V)]
// CHECK:STDOUT: %L2.ref.loc35: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
// CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.WithSelf.%assoc0 [concrete = constants.%assoc0]
// CHECK:STDOUT: %V.ref.loc40: %L2.type = name_ref V, %V.loc30_15.2 [symbolic = %V.loc30_15.1 (constants.%V)]
// CHECK:STDOUT: %V.ref.loc40: %L2.type = name_ref V, %V.loc30_23.2 [symbolic = %V.loc30_23.1 (constants.%V)]
// CHECK:STDOUT: %L2.ref.loc40: type = name_ref L2, file.%L2.decl [concrete = constants.%L2.type]
// CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.WithSelf.%assoc1 [concrete = constants.%assoc1]
// CHECK:STDOUT: return
@@ -1401,8 +1401,8 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Simple5(constants.%T) {
// CHECK:STDOUT: %T.patt.loc10_13.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc10_13.1 => constants.%T
// CHECK:STDOUT: %T.patt.loc10_21.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc10_21.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @L2.WithSelf(constants.%T) {
@@ -1415,8 +1415,8 @@ fn Works() {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Compound5(constants.%V) {
// CHECK:STDOUT: %V.patt.loc30_15.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc30_15.1 => constants.%V
// CHECK:STDOUT: %V.patt.loc30_23.2 => constants.%V.patt
// CHECK:STDOUT: %V.loc30_23.1 => constants.%V
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_combine_non_instance.carbon
@@ -14,7 +14,7 @@
library "[[@TEST_NAME]]";
interface I {
let T:! type;
let T: type;
}
interface J {
@@ -30,12 +30,12 @@ interface J {
library "[[@TEST_NAME]]";
interface I2 {
let T2:! type;
let T2: type;
}
interface J2;
impl forall [V:! J2] V as I2 where .T2 = () {}
impl forall [V: J2] V as I2 where .T2 = () {}
//@dump-sem-ir-begin
interface J2 {
@@ -14,13 +14,13 @@
interface I {
// CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+7]]:3: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
// CHECK:STDERR: let T:! type = 42;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR: let T: type = 42;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+4]]:3: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
// CHECK:STDERR: let T:! type = 42;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR: let T: type = 42;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let T:! type = 42;
let T: type = 42;
}
// CHECK:STDOUT: --- fail_assoc_const_bad_default.carbon
@@ -20,7 +20,7 @@ interface I {
fn F(self);
}
fn Use(T:! I) {
fn Use(generic T: I) {
// CHECK:STDERR: fail_member_access.carbon:[[@LINE+4]]:3: error: type `<type of F in T>` does not support qualified expressions [QualifiedExprUnsupported]
// CHECK:STDERR: T.F.member;
// CHECK:STDERR: ^~~~~~~~~~
@@ -65,13 +65,13 @@ fn Use(T:! I) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
// CHECK:STDOUT: %Use.decl: %Use.type = fn_decl @Use [concrete = constants.%Use] {
// CHECK:STDOUT: %T.patt.loc8_9.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc8_17.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_17.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc8: type = splice_block %I.ref [concrete = constants.%I.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_9.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)]
// CHECK:STDOUT: %T.loc8_17.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc8_17.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -114,21 +114,21 @@ fn Use(T:! I) {
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type));
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Use(%T.loc8_9.2: %I.type) {
// CHECK:STDOUT: %T.patt.loc8_9.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc8_9.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)]
// CHECK:STDOUT: generic fn @Use(%T.loc8_17.2: %I.type) {
// CHECK:STDOUT: %T.patt.loc8_17.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_17.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc8_17.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc8_17.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc13_4.2: type = facet_access_type %T.loc8_9.1 [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%T.loc8_9.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.418)]
// CHECK:STDOUT: %.loc13_4.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc8_9.1 [symbolic = %.loc13_4.2 (constants.%.81d)]
// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_9.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
// CHECK:STDOUT: %T.as_type.loc13_4.2: type = facet_access_type %T.loc8_17.1 [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%T.loc8_17.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.418)]
// CHECK:STDOUT: %.loc13_4.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc8_17.1 [symbolic = %.loc13_4.2 (constants.%.81d)]
// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc8_17.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
// CHECK:STDOUT: %impl.elem0.loc13_4.2: @Use.%.loc13_4.2 (%.81d) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %.loc13_4.2 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc8_9.2 [symbolic = %T.loc8_9.1 (constants.%T)]
// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc8_17.2 [symbolic = %T.loc8_17.1 (constants.%T)]
// CHECK:STDOUT: %T.as_type.loc13_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %.loc13_4.1: type = converted %T.ref, %T.as_type.loc13_4.1 [symbolic = %T.as_type.loc13_4.2 (constants.%T.as_type)]
// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.WithSelf.%assoc0 [concrete = constants.%assoc0]
@@ -155,8 +155,8 @@ fn Use(T:! I) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Use(constants.%T) {
// CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc8_9.1 => constants.%T
// CHECK:STDOUT: %T.patt.loc8_17.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc8_17.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf(constants.%T) {
@@ -14,33 +14,33 @@
interface NotGeneric;
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list [RedeclParamListDiffers]
// CHECK:STDERR: interface NotGeneric(T:! type) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: interface NotGeneric(T: type) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious]
// CHECK:STDERR: interface NotGeneric;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
interface NotGeneric(T:! type) {}
interface NotGeneric(T: type) {}
interface Generic(T:! type);
interface Generic(T: type);
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of missing parameter list [RedeclParamListDiffers]
// CHECK:STDERR: interface Generic {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note: previously declared with parameter list [RedeclParamListPrevious]
// CHECK:STDERR: interface Generic(T:! type);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: interface Generic(T: type);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
interface Generic {}
interface DifferentParams(T:! type);
interface DifferentParams(T: type);
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:27: error: type `<pattern for ()>` of parameter 1 in redeclaration differs from previous parameter type `<pattern for type>` [RedeclParamDiffersType]
// CHECK:STDERR: interface DifferentParams(T:! ()) {}
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: interface DifferentParams(T: ()) {}
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:27: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
// CHECK:STDERR: interface DifferentParams(T:! type);
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: interface DifferentParams(T: type);
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR:
interface DifferentParams(T:! ()) {}
interface DifferentParams(T: ()) {}
// CHECK:STDOUT: --- fail_generic_redeclaration.carbon
// CHECK:STDOUT:
@@ -82,18 +82,18 @@ interface DifferentParams(T:! ()) {}
// CHECK:STDOUT: %NotGeneric.decl.loc23: %NotGeneric.type.fec = interface_decl @NotGeneric.loc23 [concrete = constants.%NotGeneric.generic] {
// CHECK:STDOUT: %T.patt.loc23_23.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc23_23.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc23_26.1: type = splice_block %.loc23_26.2 [concrete = type] {
// CHECK:STDOUT: %.loc23_25.1: type = splice_block %.loc23_25.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc23_26.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc23_25.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc23_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc23_23.1 (constants.%T.67d)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Generic.decl.loc25: %Generic.type.30d = interface_decl @Generic.loc25 [concrete = constants.%Generic.generic] {
// CHECK:STDOUT: %T.patt.loc25_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_20.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc25_23.1: type = splice_block %.loc25_23.2 [concrete = type] {
// CHECK:STDOUT: %.loc25_22.1: type = splice_block %.loc25_22.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc25_23.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc25_22.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc25_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc25_20.1 (constants.%T.67d)]
// CHECK:STDOUT: }
@@ -101,19 +101,19 @@ interface DifferentParams(T:! ()) {}
// CHECK:STDOUT: %DifferentParams.decl.loc35: %DifferentParams.type.998819.1 = interface_decl @DifferentParams.loc35 [concrete = constants.%DifferentParams.generic.54c122.1] {
// CHECK:STDOUT: %T.patt.loc35_28.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc35_28.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc35_31.1: type = splice_block %.loc35_31.2 [concrete = type] {
// CHECK:STDOUT: %.loc35_30.1: type = splice_block %.loc35_30.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc35_31.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc35_30.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc35_28.2: type = symbolic_binding T, 0 [symbolic = %T.loc35_28.1 (constants.%T.67d)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %DifferentParams.decl.loc43: %DifferentParams.type.998819.2 = interface_decl @DifferentParams.loc43 [concrete = constants.%DifferentParams.generic.54c122.2] {
// CHECK:STDOUT: %T.patt.loc43_28.1: %pattern_type.cb1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc43_28.2 (constants.%T.patt.8f8)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc43_32.1: type = splice_block %.loc43_32.3 [concrete = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.loc43_31.1: type = splice_block %.loc43_31.3 [concrete = constants.%empty_tuple.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc43_32.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
// CHECK:STDOUT: %.loc43_32.3: type = converted %.loc43_32.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT: %.loc43_31.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
// CHECK:STDOUT: %.loc43_31.3: type = converted %.loc43_31.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc43_28.2: %empty_tuple.type = symbolic_binding T, 0 [symbolic = %T.loc43_28.1 (constants.%T.d5f)]
// CHECK:STDOUT: }
@@ -127,14 +127,14 @@ interface DifferentParams(T:! ()) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %NotGeneric.type: type = facet_type <@NotGeneric.loc23, @NotGeneric.loc23(%T.loc23_23.1)> [symbolic = %NotGeneric.type (constants.%NotGeneric.type.e75)]
// CHECK:STDOUT: %Self.loc23_32.2: @NotGeneric.loc23.%NotGeneric.type (%NotGeneric.type.e75) = symbolic_binding Self, 1 [symbolic = %Self.loc23_32.2 (constants.%Self.b8f)]
// CHECK:STDOUT: %Self.loc23_31.2: @NotGeneric.loc23.%NotGeneric.type (%NotGeneric.type.e75) = symbolic_binding Self, 1 [symbolic = %Self.loc23_31.2 (constants.%Self.b8f)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc23_32.1: @NotGeneric.loc23.%NotGeneric.type (%NotGeneric.type.e75) = symbolic_binding Self, 1 [symbolic = %Self.loc23_32.2 (constants.%Self.b8f)]
// CHECK:STDOUT: %Self.loc23_31.1: @NotGeneric.loc23.%NotGeneric.type (%NotGeneric.type.e75) = symbolic_binding Self, 1 [symbolic = %Self.loc23_31.2 (constants.%Self.b8f)]
// CHECK:STDOUT: %NotGeneric.WithSelf.decl = interface_with_self_decl @NotGeneric.loc23 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc23_32.1
// CHECK:STDOUT: .Self = %Self.loc23_31.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -176,14 +176,14 @@ interface DifferentParams(T:! ()) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %DifferentParams.type: type = facet_type <@DifferentParams.loc43, @DifferentParams.loc43(%T.loc43_28.1)> [symbolic = %DifferentParams.type (constants.%DifferentParams.type.7d4)]
// CHECK:STDOUT: %Self.loc43_35.2: @DifferentParams.loc43.%DifferentParams.type (%DifferentParams.type.7d4) = symbolic_binding Self, 1 [symbolic = %Self.loc43_35.2 (constants.%Self.a37)]
// CHECK:STDOUT: %Self.loc43_34.2: @DifferentParams.loc43.%DifferentParams.type (%DifferentParams.type.7d4) = symbolic_binding Self, 1 [symbolic = %Self.loc43_34.2 (constants.%Self.a37)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc43_35.1: @DifferentParams.loc43.%DifferentParams.type (%DifferentParams.type.7d4) = symbolic_binding Self, 1 [symbolic = %Self.loc43_35.2 (constants.%Self.a37)]
// CHECK:STDOUT: %Self.loc43_34.1: @DifferentParams.loc43.%DifferentParams.type (%DifferentParams.type.7d4) = symbolic_binding Self, 1 [symbolic = %Self.loc43_34.2 (constants.%Self.a37)]
// CHECK:STDOUT: %DifferentParams.WithSelf.decl = interface_with_self_decl @DifferentParams.loc43 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc43_35.1
// CHECK:STDOUT: .Self = %Self.loc43_34.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
+16 -16
View File
@@ -18,7 +18,7 @@ library "[[@TEST_NAME]]";
interface Interface {
fn F();
let T:! type;
let T: type;
}
fn F() {
@@ -40,11 +40,11 @@ fn F() {
interface Different {}
// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:24: error: cannot convert type `U` that implements `Different` into type implementing `Interface` [ConversionFailureFacetToFacet]
// CHECK:STDERR: fn G(U:! Different) -> U.(Interface.T);
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:31: error: cannot convert type `U` that implements `Different` into type implementing `Interface` [ConversionFailureFacetToFacet]
// CHECK:STDERR: fn G(generic U: Different) -> U.(Interface.T);
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
fn G(U:! Different) -> U.(Interface.T);
fn G(generic U: Different) -> U.(Interface.T);
// CHECK:STDOUT: --- fail_member_lookup.carbon
// CHECK:STDOUT:
@@ -97,18 +97,18 @@ fn G(U:! Different) -> U.(Interface.T);
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
// CHECK:STDOUT: %Different.decl: type = interface_decl @Different [concrete = constants.%Different.type] {} {}
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
// CHECK:STDOUT: %U.patt.loc32_7.1: %pattern_type.776 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc32_7.2 (constants.%U.patt)]
// CHECK:STDOUT: %U.patt.loc32_15.1: %pattern_type.776 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc32_15.2 (constants.%U.patt)]
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern <error>, <error> [concrete = <error>]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %U.ref: %Different.type = name_ref U, %U.loc32_7.2 [symbolic = %U.loc32_7.1 (constants.%U)]
// CHECK:STDOUT: %U.ref: %Different.type = name_ref U, %U.loc32_15.2 [symbolic = %U.loc32_15.1 (constants.%U)]
// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
// CHECK:STDOUT: %T.ref: %Interface.assoc_type = name_ref T, @T.%assoc1 [concrete = constants.%assoc1]
// CHECK:STDOUT: %U.as_type.loc32_25.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc32_25.1 (constants.%U.as_type)]
// CHECK:STDOUT: %U.as_type.loc32_32.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc32_32.1 (constants.%U.as_type)]
// CHECK:STDOUT: %.loc32: type = splice_block %Different.ref [concrete = constants.%Different.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %Different.ref: type = name_ref Different, file.%Different.decl [concrete = constants.%Different.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %U.loc32_7.2: %Different.type = symbolic_binding U, 0 [symbolic = %U.loc32_7.1 (constants.%U)]
// CHECK:STDOUT: %U.loc32_15.2: %Different.type = symbolic_binding U, 0 [symbolic = %U.loc32_15.1 (constants.%U)]
// CHECK:STDOUT: %return: <error> = return_slot <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -173,10 +173,10 @@ fn G(U:! Different) -> U.(Interface.T);
// CHECK:STDOUT: !observes:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @G(%U.loc32_7.2: %Different.type) {
// CHECK:STDOUT: %U.patt.loc32_7.2: %pattern_type.776 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc32_7.2 (constants.%U.patt)]
// CHECK:STDOUT: %U.loc32_7.1: %Different.type = symbolic_binding U, 0 [symbolic = %U.loc32_7.1 (constants.%U)]
// CHECK:STDOUT: %U.as_type.loc32_25.1: type = facet_access_type %U.loc32_7.1 [symbolic = %U.as_type.loc32_25.1 (constants.%U.as_type)]
// CHECK:STDOUT: generic fn @G(%U.loc32_15.2: %Different.type) {
// CHECK:STDOUT: %U.patt.loc32_15.2: %pattern_type.776 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc32_15.2 (constants.%U.patt)]
// CHECK:STDOUT: %U.loc32_15.1: %Different.type = symbolic_binding U, 0 [symbolic = %U.loc32_15.1 (constants.%U)]
// CHECK:STDOUT: %U.as_type.loc32_32.1: type = facet_access_type %U.loc32_15.1 [symbolic = %U.as_type.loc32_32.1 (constants.%U.as_type)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> <error>;
// CHECK:STDOUT: }
@@ -195,8 +195,8 @@ fn G(U:! Different) -> U.(Interface.T);
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @G(constants.%U) {
// CHECK:STDOUT: %U.patt.loc32_7.2 => constants.%U.patt
// CHECK:STDOUT: %U.loc32_7.1 => constants.%U
// CHECK:STDOUT: %U.as_type.loc32_25.1 => constants.%U.as_type
// CHECK:STDOUT: %U.patt.loc32_15.2 => constants.%U.patt
// CHECK:STDOUT: %U.loc32_15.1 => constants.%U
// CHECK:STDOUT: %U.as_type.loc32_32.1 => constants.%U.as_type
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -14,15 +14,15 @@
interface I {
// CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
// CHECK:STDERR: default let T:! type = (i32, i32);
// CHECK:STDERR: default let T: type = (i32, i32);
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR:
default let T:! type = (i32, i32);
default let T: type = (i32, i32);
// CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
// CHECK:STDERR: default let N:! i32 = 42;
// CHECK:STDERR: default let N: i32 = 42;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR:
default let N:! i32 = 42;
default let N: i32 = 42;
}
// CHECK:STDOUT: --- fail_todo_assoc_const_default.carbon
@@ -88,21 +88,21 @@ interface I {
// CHECK:STDOUT: !with Self:
// CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.WithSelf.%T [concrete = constants.%assoc0.2ce]
// CHECK:STDOUT: %i32.loc20_27: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %i32.loc20_32: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %.loc20_35: %tuple.type.24b = tuple_literal (%i32.loc20_27, %i32.loc20_32) [concrete = constants.%tuple]
// CHECK:STDOUT: %.loc20_36: type = converted %.loc20_35, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55]
// CHECK:STDOUT: %i32.loc20_26: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %i32.loc20_31: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %.loc20_34: %tuple.type.24b = tuple_literal (%i32.loc20_26, %i32.loc20_31) [concrete = constants.%tuple]
// CHECK:STDOUT: %.loc20_35: type = converted %.loc20_34, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55]
// CHECK:STDOUT: }
// CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] {
// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.WithSelf.%N [concrete = constants.%assoc1]
// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e]
// CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39]
// CHECK:STDOUT: %bound_method.loc25_27.1: <bound method> = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %bound_method.loc25_26.1: <bound method> = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc25_27.2: <bound method> = bound_method %int_42, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc25_27.2(%int_42) [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %.loc25_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %.loc25_27.2: %i32 = converted %int_42, %.loc25_27.1 [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %bound_method.loc25_26.2: <bound method> = bound_method %int_42, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc25_26.2(%int_42) [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %.loc25_26.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %.loc25_26.2: %i32 = converted %int_42, %.loc25_26.1 [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
@@ -42,17 +42,17 @@ library "dependent_return_type.carbon";
interface Interface {
// TODO: This should be
// default fn F(self, U:! type, u: U*) -> U*;
// default fn F(self, generic U: type, u: U*) -> U*;
// rather than a class member, but we don't currently accept that due to the
// TODOs above.
class C {
fn F(self, U:! type, u: U*) -> U*;
fn F(self, generic U: type, u: U*) -> U*;
}
}
// TODO: This should be
// fn Interface.F(self, U:! type, u: U*) -> U* { return u; }
fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; }
// fn Interface.F(self, generic U: type, u: U*) -> U* { return u; }
fn Interface.C.F(unused self, generic U: type, u: U*) -> U* { return u; }
// CHECK:STDOUT: --- fail_todo_define_default_fn_out_of_line.carbon
@@ -238,33 +238,33 @@ fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; }
// CHECK:STDOUT: %self.param_patt.loc20: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = value_param_pattern [symbolic = %self.param_patt.loc14 (constants.%self.param_patt.f45)]
// CHECK:STDOUT: %self.patt.loc20: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt.loc20 [symbolic = %self.patt.loc14 (constants.%self.patt.134)]
// CHECK:STDOUT: %U.patt.loc20: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14 (constants.%U.patt.014)]
// CHECK:STDOUT: %u.param_patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)]
// CHECK:STDOUT: %u.patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc20 [symbolic = %u.patt.loc14 (constants.%u.patt)]
// CHECK:STDOUT: %return.param_patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)]
// CHECK:STDOUT: %return.patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc20, %ptr.loc20_52 [symbolic = %return.patt.loc14 (constants.%return.patt.669)]
// CHECK:STDOUT: %u.param_patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)]
// CHECK:STDOUT: %u.patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc20 [symbolic = %u.patt.loc14 (constants.%u.patt)]
// CHECK:STDOUT: %return.param_patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)]
// CHECK:STDOUT: %return.patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc20, %ptr.loc20_59 [symbolic = %return.patt.loc14 (constants.%return.patt.669)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %U.ref.loc20_51: type = name_ref U, %U.loc20 [symbolic = %U.loc14_17.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc20_52: type = ptr_type %U.ref.loc20_51 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
// CHECK:STDOUT: %.loc20_52: Core.Form = init_form %ptr.loc20_52 [symbolic = %.loc14_37.1 (constants.%.6d8)]
// CHECK:STDOUT: %U.ref.loc20_58: type = name_ref U, %U.loc20 [symbolic = %U.loc14_25.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc20_59: type = ptr_type %U.ref.loc20_58 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)]
// CHECK:STDOUT: %.loc20_59: Core.Form = init_form %ptr.loc20_59 [symbolic = %.loc14_44.1 (constants.%.6d8)]
// CHECK:STDOUT: %self.param.loc20: @C.F.%C (%C) = value_param call_param0
// CHECK:STDOUT: %.loc20_25.1: type = splice_block %Self.ref.loc20 [symbolic = %C (constants.%C)] {
// CHECK:STDOUT: %.loc20_25.2: type = specific_constant constants.%C, @C(constants.%Self.3ce) [symbolic = %C (constants.%C)]
// CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, %.loc20_25.2 [symbolic = %C (constants.%C)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self.loc20: @C.F.%C (%C) = wrapper_binding self, %self.param.loc20
// CHECK:STDOUT: %.loc20_35.1: type = splice_block %.loc20_35.2 [concrete = type] {
// CHECK:STDOUT: %.loc20_42.1: type = splice_block %.loc20_42.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen.loc20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc20_35.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc20_42.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %U.loc20: type = symbolic_binding U, 1 [symbolic = %U.loc14_17.1 (constants.%U.091)]
// CHECK:STDOUT: %u.param.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e) = value_param call_param1
// CHECK:STDOUT: %.loc20_45: type = splice_block %ptr.loc20_45 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)] {
// CHECK:STDOUT: %U.ref.loc20_44: type = name_ref U, %U.loc20 [symbolic = %U.loc14_17.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc20_45: type = ptr_type %U.ref.loc20_44 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
// CHECK:STDOUT: %U.loc20: type = symbolic_binding U, 1 [symbolic = %U.loc14_25.1 (constants.%U.091)]
// CHECK:STDOUT: %u.param.loc20: @C.F.%ptr.loc14_37.1 (%ptr.18e) = value_param call_param1
// CHECK:STDOUT: %.loc20_52: type = splice_block %ptr.loc20_52 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)] {
// CHECK:STDOUT: %U.ref.loc20_51: type = name_ref U, %U.loc20 [symbolic = %U.loc14_25.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc20_52: type = ptr_type %U.ref.loc20_51 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %u.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e) = wrapper_binding u, %u.param.loc20
// CHECK:STDOUT: %return.param.loc20: ref @C.F.%ptr.loc14_30.1 (%ptr.18e) = out_param call_param2
// CHECK:STDOUT: %return.loc20: ref @C.F.%ptr.loc14_30.1 (%ptr.18e) = return_slot %return.param.loc20
// CHECK:STDOUT: %u.loc20: @C.F.%ptr.loc14_37.1 (%ptr.18e) = wrapper_binding u, %u.param.loc20
// CHECK:STDOUT: %return.param.loc20: ref @C.F.%ptr.loc14_37.1 (%ptr.18e) = out_param call_param2
// CHECK:STDOUT: %return.loc20: ref @C.F.%ptr.loc14_37.1 (%ptr.18e) = return_slot %return.param.loc20
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -296,33 +296,33 @@ fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; }
// CHECK:STDOUT: %self.param_patt.loc20: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = value_param_pattern [symbolic = %self.param_patt.loc14 (constants.%self.param_patt.f45)]
// CHECK:STDOUT: %self.patt.loc20: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt.loc20 [symbolic = %self.patt.loc14 (constants.%self.patt.134)]
// CHECK:STDOUT: %U.patt.loc20: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14 (constants.%U.patt.014)]
// CHECK:STDOUT: %u.param_patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)]
// CHECK:STDOUT: %u.patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc20 [symbolic = %u.patt.loc14 (constants.%u.patt)]
// CHECK:STDOUT: %return.param_patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)]
// CHECK:STDOUT: %return.patt.loc20: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc20, %ptr.loc20_52 [symbolic = %return.patt.loc14 (constants.%return.patt.669)]
// CHECK:STDOUT: %u.param_patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)]
// CHECK:STDOUT: %u.patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc20 [symbolic = %u.patt.loc14 (constants.%u.patt)]
// CHECK:STDOUT: %return.param_patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)]
// CHECK:STDOUT: %return.patt.loc20: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc20, %ptr.loc20_59 [symbolic = %return.patt.loc14 (constants.%return.patt.669)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %U.ref.loc14_36: type = name_ref U, %U.loc14_17.2 [symbolic = %U.loc14_17.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc14_37: type = ptr_type %U.ref.loc14_36 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
// CHECK:STDOUT: %.loc14_37.2: Core.Form = init_form %ptr.loc14_37 [symbolic = %.loc14_37.1 (constants.%.6d8)]
// CHECK:STDOUT: %U.ref.loc14_43: type = name_ref U, %U.loc14_25.2 [symbolic = %U.loc14_25.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc14_44: type = ptr_type %U.ref.loc14_43 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)]
// CHECK:STDOUT: %.loc14_44.2: Core.Form = init_form %ptr.loc14_44 [symbolic = %.loc14_44.1 (constants.%.6d8)]
// CHECK:STDOUT: %self.param.loc14: @C.F.%C (%C) = value_param call_param0
// CHECK:STDOUT: %.loc14_10.1: type = splice_block %Self.ref.loc14 [symbolic = %C (constants.%C)] {
// CHECK:STDOUT: %.loc14_10.2: type = specific_constant constants.%C, @C(constants.%Self.3ce) [symbolic = %C (constants.%C)]
// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14_10.2 [symbolic = %C (constants.%C)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %self.loc14: @C.F.%C (%C) = wrapper_binding self, %self.param.loc14
// CHECK:STDOUT: %.loc14_20.1: type = splice_block %.loc14_20.2 [concrete = type] {
// CHECK:STDOUT: %.loc14_27.1: type = splice_block %.loc14_27.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen.loc14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc14_20.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc14_27.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %U.loc14_17.2: type = symbolic_binding U, 1 [symbolic = %U.loc14_17.1 (constants.%U.091)]
// CHECK:STDOUT: %u.param.loc14: @C.F.%ptr.loc14_30.1 (%ptr.18e) = value_param call_param1
// CHECK:STDOUT: %.loc14_30: type = splice_block %ptr.loc14_30.2 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)] {
// CHECK:STDOUT: %U.ref.loc14_29: type = name_ref U, %U.loc14_17.2 [symbolic = %U.loc14_17.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc14_30.2: type = ptr_type %U.ref.loc14_29 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
// CHECK:STDOUT: %U.loc14_25.2: type = symbolic_binding U, 1 [symbolic = %U.loc14_25.1 (constants.%U.091)]
// CHECK:STDOUT: %u.param.loc14: @C.F.%ptr.loc14_37.1 (%ptr.18e) = value_param call_param1
// CHECK:STDOUT: %.loc14_37: type = splice_block %ptr.loc14_37.2 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)] {
// CHECK:STDOUT: %U.ref.loc14_36: type = name_ref U, %U.loc14_25.2 [symbolic = %U.loc14_25.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc14_37.2: type = ptr_type %U.ref.loc14_36 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %u.loc14: @C.F.%ptr.loc14_30.1 (%ptr.18e) = wrapper_binding u, %u.param.loc14
// CHECK:STDOUT: %return.param.loc14: ref @C.F.%ptr.loc14_30.1 (%ptr.18e) = out_param call_param2
// CHECK:STDOUT: %return.loc14: ref @C.F.%ptr.loc14_30.1 (%ptr.18e) = return_slot %return.param.loc14
// CHECK:STDOUT: %u.loc14: @C.F.%ptr.loc14_37.1 (%ptr.18e) = wrapper_binding u, %u.param.loc14
// CHECK:STDOUT: %return.param.loc14: ref @C.F.%ptr.loc14_37.1 (%ptr.18e) = out_param call_param2
// CHECK:STDOUT: %return.loc14: ref @C.F.%ptr.loc14_37.1 (%ptr.18e) = return_slot %return.param.loc14
// CHECK:STDOUT: }
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
// CHECK:STDOUT: complete_type_witness = %complete_type
@@ -333,45 +333,45 @@ fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; }
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @C.F(@Interface.%Self: %Interface.type, %U.loc14_17.2: type) {
// CHECK:STDOUT: generic fn @C.F(@Interface.%Self: %Interface.type, %U.loc14_25.2: type) {
// CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.3ce)]
// CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)]
// CHECK:STDOUT: %pattern_type.loc14_10: type = pattern_type %C [symbolic = %pattern_type.loc14_10 (constants.%pattern_type.f25)]
// CHECK:STDOUT: %self.param_patt.loc14: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = value_param_pattern [symbolic = %self.param_patt.loc14 (constants.%self.param_patt.f45)]
// CHECK:STDOUT: %self.patt.loc14: @C.F.%pattern_type.loc14_10 (%pattern_type.f25) = at_binding_pattern self, %self.param_patt.loc14 [symbolic = %self.patt.loc14 (constants.%self.patt.134)]
// CHECK:STDOUT: %U.patt.loc14: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc14 (constants.%U.patt.014)]
// CHECK:STDOUT: %U.loc14_17.1: type = symbolic_binding U, 1 [symbolic = %U.loc14_17.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc14_30.1: type = ptr_type %U.loc14_17.1 [symbolic = %ptr.loc14_30.1 (constants.%ptr.18e)]
// CHECK:STDOUT: %pattern_type.loc14_27: type = pattern_type %ptr.loc14_30.1 [symbolic = %pattern_type.loc14_27 (constants.%pattern_type.423)]
// CHECK:STDOUT: %u.param_patt.loc14: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)]
// CHECK:STDOUT: %u.patt.loc14: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc14 [symbolic = %u.patt.loc14 (constants.%u.patt)]
// CHECK:STDOUT: %.loc14_37.1: Core.Form = init_form %ptr.loc14_30.1 [symbolic = %.loc14_37.1 (constants.%.6d8)]
// CHECK:STDOUT: %return.param_patt.loc14: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)]
// CHECK:STDOUT: %return.patt.loc14: @C.F.%pattern_type.loc14_27 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc14, %ptr.loc14_30.1 [symbolic = %return.patt.loc14 (constants.%return.patt.669)]
// CHECK:STDOUT: %U.loc14_25.1: type = symbolic_binding U, 1 [symbolic = %U.loc14_25.1 (constants.%U.091)]
// CHECK:STDOUT: %ptr.loc14_37.1: type = ptr_type %U.loc14_25.1 [symbolic = %ptr.loc14_37.1 (constants.%ptr.18e)]
// CHECK:STDOUT: %pattern_type.loc14_34: type = pattern_type %ptr.loc14_37.1 [symbolic = %pattern_type.loc14_34 (constants.%pattern_type.423)]
// CHECK:STDOUT: %u.param_patt.loc14: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = value_param_pattern [symbolic = %u.param_patt.loc14 (constants.%u.param_patt)]
// CHECK:STDOUT: %u.patt.loc14: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = at_binding_pattern u, %u.param_patt.loc14 [symbolic = %u.patt.loc14 (constants.%u.patt)]
// CHECK:STDOUT: %.loc14_44.1: Core.Form = init_form %ptr.loc14_37.1 [symbolic = %.loc14_44.1 (constants.%.6d8)]
// CHECK:STDOUT: %return.param_patt.loc14: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = out_param_pattern [symbolic = %return.param_patt.loc14 (constants.%return.param_patt.534)]
// CHECK:STDOUT: %return.patt.loc14: @C.F.%pattern_type.loc14_34 (%pattern_type.423) = return_slot_pattern %return.param_patt.loc14, %ptr.loc14_37.1 [symbolic = %return.patt.loc14 (constants.%return.patt.669)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc20_25: <witness> = require_complete_type %C [symbolic = %require_complete.loc20_25 (constants.%require_complete.f37)]
// CHECK:STDOUT: %require_complete.loc20_42: <witness> = require_complete_type %ptr.loc14_30.1 [symbolic = %require_complete.loc20_42 (constants.%require_complete.56d)]
// CHECK:STDOUT: %.loc20_63.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc14_17.1) [symbolic = %.loc20_63.3 (constants.%.ddf)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc14_30.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.088)]
// CHECK:STDOUT: %Copy.facet.loc20_63.3: %Copy.type = facet_value %ptr.loc14_30.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc20_63.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc20_63.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.da6)]
// CHECK:STDOUT: %.loc20_63.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc20_63.3 [symbolic = %.loc20_63.4 (constants.%.a56)]
// CHECK:STDOUT: %impl.elem0.loc20_63.2: @C.F.%.loc20_63.4 (%.a56) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_63.2 (constants.%impl.elem0.fbe)]
// CHECK:STDOUT: %specific_impl_fn.loc20_63.2: <specific function> = specific_impl_function %impl.elem0.loc20_63.2, @Copy.WithSelf.Op(%Copy.facet.loc20_63.3) [symbolic = %specific_impl_fn.loc20_63.2 (constants.%specific_impl_fn.16d)]
// CHECK:STDOUT: %require_complete.loc20_49: <witness> = require_complete_type %ptr.loc14_37.1 [symbolic = %require_complete.loc20_49 (constants.%require_complete.56d)]
// CHECK:STDOUT: %.loc20_70.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc14_25.1) [symbolic = %.loc20_70.3 (constants.%.ddf)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc14_37.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.088)]
// CHECK:STDOUT: %Copy.facet.loc20_70.3: %Copy.type = facet_value %ptr.loc14_37.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc20_70.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.da6)]
// CHECK:STDOUT: %.loc20_70.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc20_70.3 [symbolic = %.loc20_70.4 (constants.%.a56)]
// CHECK:STDOUT: %impl.elem0.loc20_70.2: @C.F.%.loc20_70.4 (%.a56) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_70.2 (constants.%impl.elem0.fbe)]
// CHECK:STDOUT: %specific_impl_fn.loc20_70.2: <specific function> = specific_impl_function %impl.elem0.loc20_70.2, @Copy.WithSelf.Op(%Copy.facet.loc20_70.3) [symbolic = %specific_impl_fn.loc20_70.2 (constants.%specific_impl_fn.16d)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%self.param.loc20: @C.F.%C (%C), %u.param.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e)) -> out %return.param.loc20: @C.F.%ptr.loc14_30.1 (%ptr.18e) {
// CHECK:STDOUT: fn(%self.param.loc20: @C.F.%C (%C), %u.param.loc20: @C.F.%ptr.loc14_37.1 (%ptr.18e)) -> out %return.param.loc20: @C.F.%ptr.loc14_37.1 (%ptr.18e) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %u.ref: @C.F.%ptr.loc14_30.1 (%ptr.18e) = name_ref u, %u.loc20
// CHECK:STDOUT: %impl.elem0.loc20_63.1: @C.F.%.loc20_63.4 (%.a56) = impl_witness_access constants.%Copy.lookup_impl_witness.088, element0 [symbolic = %impl.elem0.loc20_63.2 (constants.%impl.elem0.fbe)]
// CHECK:STDOUT: %bound_method.loc20_63.1: <bound method> = bound_method %u.ref, %impl.elem0.loc20_63.1
// CHECK:STDOUT: %Copy.facet.loc20_63.1: %Copy.type = facet_value constants.%ptr.18e, (constants.%Copy.lookup_impl_witness.088) [symbolic = %Copy.facet.loc20_63.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %.loc20_63.1: %Copy.type = converted constants.%ptr.18e, %Copy.facet.loc20_63.1 [symbolic = %Copy.facet.loc20_63.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %Copy.facet.loc20_63.2: %Copy.type = facet_value constants.%ptr.18e, (constants.%Copy.lookup_impl_witness.088) [symbolic = %Copy.facet.loc20_63.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %.loc20_63.2: %Copy.type = converted constants.%ptr.18e, %Copy.facet.loc20_63.2 [symbolic = %Copy.facet.loc20_63.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %specific_impl_fn.loc20_63.1: <specific function> = specific_impl_function %impl.elem0.loc20_63.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc20_63.2 (constants.%specific_impl_fn.16d)]
// CHECK:STDOUT: %bound_method.loc20_63.2: <bound method> = bound_method %u.ref, %specific_impl_fn.loc20_63.1
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @C.F.%ptr.loc14_30.1 (%ptr.18e) = call %bound_method.loc20_63.2(%u.ref)
// CHECK:STDOUT: %u.ref: @C.F.%ptr.loc14_37.1 (%ptr.18e) = name_ref u, %u.loc20
// CHECK:STDOUT: %impl.elem0.loc20_70.1: @C.F.%.loc20_70.4 (%.a56) = impl_witness_access constants.%Copy.lookup_impl_witness.088, element0 [symbolic = %impl.elem0.loc20_70.2 (constants.%impl.elem0.fbe)]
// CHECK:STDOUT: %bound_method.loc20_70.1: <bound method> = bound_method %u.ref, %impl.elem0.loc20_70.1
// CHECK:STDOUT: %Copy.facet.loc20_70.1: %Copy.type = facet_value constants.%ptr.18e, (constants.%Copy.lookup_impl_witness.088) [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %.loc20_70.1: %Copy.type = converted constants.%ptr.18e, %Copy.facet.loc20_70.1 [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %Copy.facet.loc20_70.2: %Copy.type = facet_value constants.%ptr.18e, (constants.%Copy.lookup_impl_witness.088) [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %.loc20_70.2: %Copy.type = converted constants.%ptr.18e, %Copy.facet.loc20_70.2 [symbolic = %Copy.facet.loc20_70.3 (constants.%Copy.facet)]
// CHECK:STDOUT: %specific_impl_fn.loc20_70.1: <specific function> = specific_impl_function %impl.elem0.loc20_70.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc20_70.2 (constants.%specific_impl_fn.16d)]
// CHECK:STDOUT: %bound_method.loc20_70.2: <bound method> = bound_method %u.ref, %specific_impl_fn.loc20_70.1
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @C.F.%ptr.loc14_37.1 (%ptr.18e) = call %bound_method.loc20_70.2(%u.ref)
// CHECK:STDOUT: return %Copy.WithSelf.Op.call
// CHECK:STDOUT:
// CHECK:STDOUT: !observes:
@@ -394,12 +394,12 @@ fn Interface.C.F(unused self, U:! type, u: U*) -> U* { return u; }
// CHECK:STDOUT: %self.param_patt.loc14 => constants.%self.param_patt.f45
// CHECK:STDOUT: %self.patt.loc14 => constants.%self.patt.134
// CHECK:STDOUT: %U.patt.loc14 => constants.%U.patt.014
// CHECK:STDOUT: %U.loc14_17.1 => constants.%U.091
// CHECK:STDOUT: %ptr.loc14_30.1 => constants.%ptr.18e
// CHECK:STDOUT: %pattern_type.loc14_27 => constants.%pattern_type.423
// CHECK:STDOUT: %U.loc14_25.1 => constants.%U.091
// CHECK:STDOUT: %ptr.loc14_37.1 => constants.%ptr.18e
// CHECK:STDOUT: %pattern_type.loc14_34 => constants.%pattern_type.423
// CHECK:STDOUT: %u.param_patt.loc14 => constants.%u.param_patt
// CHECK:STDOUT: %u.patt.loc14 => constants.%u.patt
// CHECK:STDOUT: %.loc14_37.1 => constants.%.6d8
// CHECK:STDOUT: %.loc14_44.1 => constants.%.6d8
// CHECK:STDOUT: %return.param_patt.loc14 => constants.%return.param_patt.534
// CHECK:STDOUT: %return.patt.loc14 => constants.%return.patt.669
// CHECK:STDOUT: }
@@ -11,13 +11,13 @@
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_type_as_facet.carbon
interface I {
let T:! type;
// CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+7]]:18: error: cannot implicitly convert non-type value of type `Self.(TODO: element 0 in incomplete Self as I)` to `type` [ConversionFailureNonTypeToFacet]
// CHECK:STDERR: fn F[X:! T](x: X);
// CHECK:STDERR: ^
// CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+4]]:18: note: type `Self.(TODO: element 0 in incomplete Self as I)` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
// CHECK:STDERR: fn F[X:! T](x: X);
// CHECK:STDERR: ^
let T: type;
// CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+7]]:17: error: cannot implicitly convert non-type value of type `Self.(TODO: element 0 in incomplete Self as I)` to `type` [ConversionFailureNonTypeToFacet]
// CHECK:STDERR: fn F[X: T](x: X);
// CHECK:STDERR: ^
// CHECK:STDERR: fail_type_as_facet.carbon:[[@LINE+4]]:17: note: type `Self.(TODO: element 0 in incomplete Self as I)` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
// CHECK:STDERR: fn F[X: T](x: X);
// CHECK:STDERR: ^
// CHECK:STDERR:
fn F[X:! T](x: X);
fn F[X: T](x: X);
}
+72 -72
View File
@@ -17,12 +17,12 @@ library "[[@TEST_NAME]]";
interface I { fn F(); }
interface J {}
final impl forall [T:! J] T as I { fn F() {} }
final impl forall [T: J] T as I { fn F() {} }
// This is creating an indirection where the `final impl` requires an indirect
// instantiation by the caller.
fn UseI(T:! I) { T.F(); }
fn UseJ(T:! J) { UseI(T); }
fn UseI(generic T: I) { T.F(); }
fn UseJ(generic T: J) { UseI(T); }
class C {}
impl C as J {}
@@ -113,32 +113,32 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT: %T.patt.loc7_21.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_21.2 (constants.%T.patt.ac1)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc7_21.2 [symbolic = %T.loc7_21.1 (constants.%T.e40)]
// CHECK:STDOUT: %T.as_type.loc7_27.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %.loc7_27: type = converted %T.ref, %T.as_type.loc7_27.2 [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %T.as_type.loc7_26.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_26.1 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %.loc7_26: type = converted %T.ref, %T.as_type.loc7_26.2 [symbolic = %T.as_type.loc7_26.1 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: %.loc7_24: type = splice_block %J.ref [concrete = constants.%J.type] {
// CHECK:STDOUT: %.loc7_23: type = splice_block %J.ref [concrete = constants.%J.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc7_21.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc7_21.1 (constants.%T.e40)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %UseI.decl: %UseI.type = fn_decl @UseI [concrete = constants.%UseI] {
// CHECK:STDOUT: %T.patt.loc11_10.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt.1df)]
// CHECK:STDOUT: %T.patt.loc11_18.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_18.2 (constants.%T.patt.1df)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc11_13: type = splice_block %I.ref [concrete = constants.%I.type] {
// CHECK:STDOUT: %.loc11_20: type = splice_block %I.ref [concrete = constants.%I.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc11_10.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T.dda)]
// CHECK:STDOUT: %T.loc11_18.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc11_18.1 (constants.%T.dda)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %UseJ.decl: %UseJ.type = fn_decl @UseJ [concrete = constants.%UseJ] {
// CHECK:STDOUT: %T.patt.loc12_10.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_10.2 (constants.%T.patt.ac1)]
// CHECK:STDOUT: %T.patt.loc12_18.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_18.2 (constants.%T.patt.ac1)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc12_13: type = splice_block %J.ref [concrete = constants.%J.type] {
// CHECK:STDOUT: %.loc12_20: type = splice_block %J.ref [concrete = constants.%J.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc12_10.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_10.1 (constants.%T.e40)]
// CHECK:STDOUT: %T.loc12_18.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_18.1 (constants.%T.e40)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: impl_decl @C.as.J.impl [concrete] {} {
@@ -182,22 +182,22 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT: generic final impl @T.as_type.as.I.impl(%T.loc7_21.2: %J.type) {
// CHECK:STDOUT: %T.patt.loc7_21.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_21.2 (constants.%T.patt.ac1)]
// CHECK:STDOUT: %T.loc7_21.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc7_21.1 (constants.%T.e40)]
// CHECK:STDOUT: %T.as_type.loc7_27.1: type = facet_access_type %T.loc7_21.1 [symbolic = %T.as_type.loc7_27.1 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %I.impl_witness.loc7_34.2: <witness> = impl_witness %I.impl_witness_table, @T.as_type.as.I.impl(%T.loc7_21.1) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness.333)]
// CHECK:STDOUT: %T.as_type.loc7_26.1: type = facet_access_type %T.loc7_21.1 [symbolic = %T.as_type.loc7_26.1 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %I.impl_witness.loc7_33.2: <witness> = impl_witness %I.impl_witness_table, @T.as_type.as.I.impl(%T.loc7_21.1) [symbolic = %I.impl_witness.loc7_33.2 (constants.%I.impl_witness.333)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.as.I.impl.F.type: type = fn_type @T.as_type.as.I.impl.F, @T.as_type.as.I.impl(%T.loc7_21.1) [symbolic = %T.as_type.as.I.impl.F.type (constants.%T.as_type.as.I.impl.F.type.f53)]
// CHECK:STDOUT: %T.as_type.as.I.impl.F: @T.as_type.as.I.impl.%T.as_type.as.I.impl.F.type (%T.as_type.as.I.impl.F.type.f53) = struct_value () [symbolic = %T.as_type.as.I.impl.F (constants.%T.as_type.as.I.impl.F.305)]
// CHECK:STDOUT:
// CHECK:STDOUT: final impl: %.loc7_27 as %I.ref {
// CHECK:STDOUT: final impl: %.loc7_26 as %I.ref {
// CHECK:STDOUT: %T.as_type.as.I.impl.F.decl: @T.as_type.as.I.impl.%T.as_type.as.I.impl.F.type (%T.as_type.as.I.impl.F.type.f53) = fn_decl @T.as_type.as.I.impl.F [symbolic = @T.as_type.as.I.impl.%T.as_type.as.I.impl.F (constants.%T.as_type.as.I.impl.F.305)] {} {}
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%T.as_type.as.I.impl.F.decl), @T.as_type.as.I.impl [concrete]
// CHECK:STDOUT: %I.impl_witness.loc7_34.1: <witness> = impl_witness %I.impl_witness_table, @T.as_type.as.I.impl(constants.%T.e40) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness.333)]
// CHECK:STDOUT: %I.impl_witness.loc7_33.1: <witness> = impl_witness %I.impl_witness_table, @T.as_type.as.I.impl(constants.%T.e40) [symbolic = %I.impl_witness.loc7_33.2 (constants.%I.impl_witness.333)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %T.as_type.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness.loc7_34.1
// CHECK:STDOUT: witness = %I.impl_witness.loc7_33.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -233,53 +233,53 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @UseI(%T.loc11_10.2: %I.type) {
// CHECK:STDOUT: %T.patt.loc11_10.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt.1df)]
// CHECK:STDOUT: %T.loc11_10.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T.dda)]
// CHECK:STDOUT: generic fn @UseI(%T.loc11_18.2: %I.type) {
// CHECK:STDOUT: %T.patt.loc11_18.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_18.2 (constants.%T.patt.1df)]
// CHECK:STDOUT: %T.loc11_18.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc11_18.1 (constants.%T.dda)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc11_19.2: type = facet_access_type %T.loc11_10.1 [symbolic = %T.as_type.loc11_19.2 (constants.%T.as_type.b38)]
// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%T.loc11_10.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.418)]
// CHECK:STDOUT: %.loc11_19.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc11_10.1 [symbolic = %.loc11_19.2 (constants.%.81d)]
// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc11_10.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
// CHECK:STDOUT: %impl.elem0.loc11_19.2: @UseI.%.loc11_19.2 (%.81d) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_19.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc11_19.2: <specific function> = specific_impl_function %impl.elem0.loc11_19.2, @I.WithSelf.F(%T.loc11_10.1) [symbolic = %specific_impl_fn.loc11_19.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %T.as_type.loc11_26.2: type = facet_access_type %T.loc11_18.1 [symbolic = %T.as_type.loc11_26.2 (constants.%T.as_type.b38)]
// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%T.loc11_18.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.418)]
// CHECK:STDOUT: %.loc11_26.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc11_18.1 [symbolic = %.loc11_26.2 (constants.%.81d)]
// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc11_18.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
// CHECK:STDOUT: %impl.elem0.loc11_26.2: @UseI.%.loc11_26.2 (%.81d) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc11_26.2: <specific function> = specific_impl_function %impl.elem0.loc11_26.2, @I.WithSelf.F(%T.loc11_18.1) [symbolic = %specific_impl_fn.loc11_26.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc11_10.2 [symbolic = %T.loc11_10.1 (constants.%T.dda)]
// CHECK:STDOUT: %T.as_type.loc11_19.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc11_19.2 (constants.%T.as_type.b38)]
// CHECK:STDOUT: %.loc11_19.1: type = converted %T.ref, %T.as_type.loc11_19.1 [symbolic = %T.as_type.loc11_19.2 (constants.%T.as_type.b38)]
// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc11_18.2 [symbolic = %T.loc11_18.1 (constants.%T.dda)]
// CHECK:STDOUT: %T.as_type.loc11_26.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc11_26.2 (constants.%T.as_type.b38)]
// CHECK:STDOUT: %.loc11_26.1: type = converted %T.ref, %T.as_type.loc11_26.1 [symbolic = %T.as_type.loc11_26.2 (constants.%T.as_type.b38)]
// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.WithSelf.%assoc0 [concrete = constants.%assoc0]
// CHECK:STDOUT: %impl.elem0.loc11_19.1: @UseI.%.loc11_19.2 (%.81d) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_19.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc11_19.1: <specific function> = specific_impl_function %impl.elem0.loc11_19.1, @I.WithSelf.F(constants.%T.dda) [symbolic = %specific_impl_fn.loc11_19.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %I.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc11_19.1()
// CHECK:STDOUT: %impl.elem0.loc11_26.1: @UseI.%.loc11_26.2 (%.81d) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_26.2 (constants.%impl.elem0)]
// CHECK:STDOUT: %specific_impl_fn.loc11_26.1: <specific function> = specific_impl_function %impl.elem0.loc11_26.1, @I.WithSelf.F(constants.%T.dda) [symbolic = %specific_impl_fn.loc11_26.2 (constants.%specific_impl_fn)]
// CHECK:STDOUT: %I.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc11_26.1()
// CHECK:STDOUT: return
// CHECK:STDOUT:
// CHECK:STDOUT: !observes:
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @UseJ(%T.loc12_10.2: %J.type) {
// CHECK:STDOUT: %T.patt.loc12_10.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_10.2 (constants.%T.patt.ac1)]
// CHECK:STDOUT: %T.loc12_10.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_10.1 (constants.%T.e40)]
// CHECK:STDOUT: generic fn @UseJ(%T.loc12_18.2: %J.type) {
// CHECK:STDOUT: %T.patt.loc12_18.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_18.2 (constants.%T.patt.ac1)]
// CHECK:STDOUT: %T.loc12_18.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc12_18.1 (constants.%T.e40)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc12_24.2: type = facet_access_type %T.loc12_10.1 [symbolic = %T.as_type.loc12_24.2 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %.loc12_24.2: require_specific_def_type = require_specific_def @T.as_type.as.I.impl(%T.loc12_10.1) [symbolic = %.loc12_24.2 (constants.%.062)]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @T.as_type.as.I.impl.%I.impl_witness_table, @T.as_type.as.I.impl(%T.loc12_10.1) [symbolic = %I.impl_witness (constants.%I.impl_witness.333)]
// CHECK:STDOUT: %I.facet.loc12_24.2: %I.type = facet_value %T.as_type.loc12_24.2, (%I.impl_witness) [symbolic = %I.facet.loc12_24.2 (constants.%I.facet.39f)]
// CHECK:STDOUT: %UseI.specific_fn.loc12_18.2: <specific function> = specific_function constants.%UseI, @UseI(%I.facet.loc12_24.2) [symbolic = %UseI.specific_fn.loc12_18.2 (constants.%UseI.specific_fn.081)]
// CHECK:STDOUT: %T.as_type.loc12_31.2: type = facet_access_type %T.loc12_18.1 [symbolic = %T.as_type.loc12_31.2 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %.loc12_31.2: require_specific_def_type = require_specific_def @T.as_type.as.I.impl(%T.loc12_18.1) [symbolic = %.loc12_31.2 (constants.%.062)]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @T.as_type.as.I.impl.%I.impl_witness_table, @T.as_type.as.I.impl(%T.loc12_18.1) [symbolic = %I.impl_witness (constants.%I.impl_witness.333)]
// CHECK:STDOUT: %I.facet.loc12_31.2: %I.type = facet_value %T.as_type.loc12_31.2, (%I.impl_witness) [symbolic = %I.facet.loc12_31.2 (constants.%I.facet.39f)]
// CHECK:STDOUT: %UseI.specific_fn.loc12_25.2: <specific function> = specific_function constants.%UseI, @UseI(%I.facet.loc12_31.2) [symbolic = %UseI.specific_fn.loc12_25.2 (constants.%UseI.specific_fn.081)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %UseI.ref: %UseI.type = name_ref UseI, file.%UseI.decl [concrete = constants.%UseI]
// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc12_10.2 [symbolic = %T.loc12_10.1 (constants.%T.e40)]
// CHECK:STDOUT: %T.as_type.loc12_24.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_24.2 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %I.facet.loc12_24.1: %I.type = facet_value %T.as_type.loc12_24.1, (constants.%I.impl_witness.333) [symbolic = %I.facet.loc12_24.2 (constants.%I.facet.39f)]
// CHECK:STDOUT: %.loc12_24.1: %I.type = converted %T.ref, %I.facet.loc12_24.1 [symbolic = %I.facet.loc12_24.2 (constants.%I.facet.39f)]
// CHECK:STDOUT: %UseI.specific_fn.loc12_18.1: <specific function> = specific_function %UseI.ref, @UseI(constants.%I.facet.39f) [symbolic = %UseI.specific_fn.loc12_18.2 (constants.%UseI.specific_fn.081)]
// CHECK:STDOUT: %UseI.call: init %empty_tuple.type = call %UseI.specific_fn.loc12_18.1()
// CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T.e40)]
// CHECK:STDOUT: %T.as_type.loc12_31.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_31.2 (constants.%T.as_type.d90)]
// CHECK:STDOUT: %I.facet.loc12_31.1: %I.type = facet_value %T.as_type.loc12_31.1, (constants.%I.impl_witness.333) [symbolic = %I.facet.loc12_31.2 (constants.%I.facet.39f)]
// CHECK:STDOUT: %.loc12_31.1: %I.type = converted %T.ref, %I.facet.loc12_31.1 [symbolic = %I.facet.loc12_31.2 (constants.%I.facet.39f)]
// CHECK:STDOUT: %UseI.specific_fn.loc12_25.1: <specific function> = specific_function %UseI.ref, @UseI(constants.%I.facet.39f) [symbolic = %UseI.specific_fn.loc12_25.2 (constants.%UseI.specific_fn.081)]
// CHECK:STDOUT: %UseI.call: init %empty_tuple.type = call %UseI.specific_fn.loc12_25.1()
// CHECK:STDOUT: return
// CHECK:STDOUT:
// CHECK:STDOUT: !observes:
@@ -315,8 +315,8 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT: specific @T.as_type.as.I.impl(constants.%T.e40) {
// CHECK:STDOUT: %T.patt.loc7_21.2 => constants.%T.patt.ac1
// CHECK:STDOUT: %T.loc7_21.1 => constants.%T.e40
// CHECK:STDOUT: %T.as_type.loc7_27.1 => constants.%T.as_type.d90
// CHECK:STDOUT: %I.impl_witness.loc7_34.2 => constants.%I.impl_witness.333
// CHECK:STDOUT: %T.as_type.loc7_26.1 => constants.%T.as_type.d90
// CHECK:STDOUT: %I.impl_witness.loc7_33.2 => constants.%I.impl_witness.333
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.as.I.impl.F.type => constants.%T.as_type.as.I.impl.F.type.f53
@@ -337,8 +337,8 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.39f) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @UseI(constants.%T.dda) {
// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt.1df
// CHECK:STDOUT: %T.loc11_10.1 => constants.%T.dda
// CHECK:STDOUT: %T.patt.loc11_18.2 => constants.%T.patt.1df
// CHECK:STDOUT: %T.loc11_18.1 => constants.%T.dda
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf(constants.%T.dda) {
@@ -351,21 +351,21 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T.dda) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @UseJ(constants.%T.e40) {
// CHECK:STDOUT: %T.patt.loc12_10.2 => constants.%T.patt.ac1
// CHECK:STDOUT: %T.loc12_10.1 => constants.%T.e40
// CHECK:STDOUT: %T.patt.loc12_18.2 => constants.%T.patt.ac1
// CHECK:STDOUT: %T.loc12_18.1 => constants.%T.e40
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @UseI(constants.%I.facet.39f) {
// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt.1df
// CHECK:STDOUT: %T.loc11_10.1 => constants.%I.facet.39f
// CHECK:STDOUT: %T.patt.loc11_18.2 => constants.%T.patt.1df
// CHECK:STDOUT: %T.loc11_18.1 => constants.%I.facet.39f
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc11_19.2 => constants.%T.as_type.d90
// CHECK:STDOUT: %T.as_type.loc11_26.2 => constants.%T.as_type.d90
// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.12f
// CHECK:STDOUT: %.loc11_19.2 => constants.%.c2e
// CHECK:STDOUT: %.loc11_26.2 => constants.%.c2e
// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness.333
// CHECK:STDOUT: %impl.elem0.loc11_19.2 => constants.%T.as_type.as.I.impl.F.305
// CHECK:STDOUT: %specific_impl_fn.loc11_19.2 => constants.%T.as_type.as.I.impl.F.specific_fn.925
// CHECK:STDOUT: %impl.elem0.loc11_26.2 => constants.%T.as_type.as.I.impl.F.305
// CHECK:STDOUT: %specific_impl_fn.loc11_26.2 => constants.%T.as_type.as.I.impl.F.specific_fn.925
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) {
@@ -373,22 +373,22 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @UseJ(constants.%J.facet) {
// CHECK:STDOUT: %T.patt.loc12_10.2 => constants.%T.patt.ac1
// CHECK:STDOUT: %T.loc12_10.1 => constants.%J.facet
// CHECK:STDOUT: %T.patt.loc12_18.2 => constants.%T.patt.ac1
// CHECK:STDOUT: %T.loc12_18.1 => constants.%J.facet
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc12_24.2 => constants.%C
// CHECK:STDOUT: %.loc12_24.2 => constants.%.72e
// CHECK:STDOUT: %T.as_type.loc12_31.2 => constants.%C
// CHECK:STDOUT: %.loc12_31.2 => constants.%.72e
// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness.9d5
// CHECK:STDOUT: %I.facet.loc12_24.2 => constants.%I.facet.ed7
// CHECK:STDOUT: %UseI.specific_fn.loc12_18.2 => constants.%UseI.specific_fn.238
// CHECK:STDOUT: %I.facet.loc12_31.2 => constants.%I.facet.ed7
// CHECK:STDOUT: %UseI.specific_fn.loc12_25.2 => constants.%UseI.specific_fn.238
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @T.as_type.as.I.impl(constants.%J.facet) {
// CHECK:STDOUT: %T.patt.loc7_21.2 => constants.%T.patt.ac1
// CHECK:STDOUT: %T.loc7_21.1 => constants.%J.facet
// CHECK:STDOUT: %T.as_type.loc7_27.1 => constants.%C
// CHECK:STDOUT: %I.impl_witness.loc7_34.2 => constants.%I.impl_witness.9d5
// CHECK:STDOUT: %T.as_type.loc7_26.1 => constants.%C
// CHECK:STDOUT: %I.impl_witness.loc7_33.2 => constants.%I.impl_witness.9d5
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.as.I.impl.F.type => constants.%T.as_type.as.I.impl.F.type.907
@@ -396,16 +396,16 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @UseI(constants.%I.facet.ed7) {
// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt.1df
// CHECK:STDOUT: %T.loc11_10.1 => constants.%I.facet.ed7
// CHECK:STDOUT: %T.patt.loc11_18.2 => constants.%T.patt.1df
// CHECK:STDOUT: %T.loc11_18.1 => constants.%I.facet.ed7
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc11_19.2 => constants.%C
// CHECK:STDOUT: %T.as_type.loc11_26.2 => constants.%C
// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.31e
// CHECK:STDOUT: %.loc11_19.2 => constants.%.7bd
// CHECK:STDOUT: %.loc11_26.2 => constants.%.7bd
// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness.9d5
// CHECK:STDOUT: %impl.elem0.loc11_19.2 => constants.%T.as_type.as.I.impl.F.b2b
// CHECK:STDOUT: %specific_impl_fn.loc11_19.2 => constants.%T.as_type.as.I.impl.F.specific_fn.2e2
// CHECK:STDOUT: %impl.elem0.loc11_26.2 => constants.%T.as_type.as.I.impl.F.b2b
// CHECK:STDOUT: %specific_impl_fn.loc11_26.2 => constants.%T.as_type.as.I.impl.F.specific_fn.2e2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet.ed7) {}
+92 -92
View File
@@ -16,11 +16,11 @@
library "[[@TEST_NAME]]";
interface Simple(T:! type) {}
interface Simple(T: type) {}
class X {}
interface WithAssocFn(T:! type) {
interface WithAssocFn(T: type) {
// TODO: Take `Self`, return `T`, once that works.
fn F() -> X;
}
@@ -34,10 +34,10 @@ class C {
}
}
interface WithImplicitArgs[T:! type](N:! T);
interface WithImplicitArgs[T: type](N: T);
fn Receive(unused T:! Simple(C)) {}
fn Pass(T:! Simple(C)) {
fn Receive(unused generic T: Simple(C)) {}
fn Pass(generic T: Simple(C)) {
Receive(T);
}
@@ -45,19 +45,19 @@ fn Pass(T:! Simple(C)) {
library "[[@TEST_NAME]]";
interface Generic(T:! type) {}
interface Generic(T: type) {}
class A {}
class B {}
fn F(T:! Generic(A));
fn G(T:! Generic(B)) {
fn F(generic T: Generic(A));
fn G(generic T: Generic(B)) {
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+7]]:3: error: cannot convert type `T` that implements `Generic(B)` into type implementing `Generic(A)` [ConversionFailureFacetToFacet]
// CHECK:STDERR: F(T);
// CHECK:STDERR: ^~~~
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-5]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam]
// CHECK:STDERR: fn F(T:! Generic(A));
// CHECK:STDERR: ^~~~~~~~~~~~~~
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-5]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam]
// CHECK:STDERR: fn F(generic T: Generic(A));
// CHECK:STDERR: ^~~~~~~~~~~~~
// CHECK:STDERR:
F(T);
}
@@ -65,16 +65,16 @@ fn G(T:! Generic(B)) {
// --- fail_args_count_mismatch.carbon
library "[[@TEST_NAME]]";
interface Generic(T:! type) {}
interface Generic(T: type) {}
// CHECK:STDERR: fail_args_count_mismatch.carbon:[[@LINE+7]]:17: error: 2 arguments passed to generic interface expecting 1 argument [CallArgCountMismatch]
// CHECK:STDERR: fn F(unused T:! Generic((), ())) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_args_count_mismatch.carbon:[[@LINE+7]]:24: error: 2 arguments passed to generic interface expecting 1 argument [CallArgCountMismatch]
// CHECK:STDERR: fn F(unused generic T: Generic((), ())) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_args_count_mismatch.carbon:[[@LINE-5]]:1: note: calling generic interface declared here [InCallToEntity]
// CHECK:STDERR: interface Generic(T:! type) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: interface Generic(T: type) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
fn F(unused T:! Generic((), ())) {}
fn F(unused generic T: Generic((), ())) {}
// CHECK:STDOUT: --- generic.carbon
// CHECK:STDOUT:
@@ -152,9 +152,9 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %Simple.decl: %Simple.type.887 = interface_decl @Simple [concrete = constants.%Simple.generic] {
// CHECK:STDOUT: %T.patt.loc4_19.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] {
// CHECK:STDOUT: %.loc4_21.1: type = splice_block %.loc4_21.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc4_21.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc4_19.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_19.1 (constants.%T.67d)]
// CHECK:STDOUT: }
@@ -162,30 +162,30 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %WithAssocFn.decl: %WithAssocFn.type.0a6 = interface_decl @WithAssocFn [concrete = constants.%WithAssocFn.generic] {
// CHECK:STDOUT: %T.patt.loc8_24.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_24.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc8_27.1: type = splice_block %.loc8_27.2 [concrete = type] {
// CHECK:STDOUT: %.loc8_26.1: type = splice_block %.loc8_26.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc8_27.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc8_26.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_24.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_24.1 (constants.%T.67d)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
// CHECK:STDOUT: %WithImplicitArgs.decl: %WithImplicitArgs.type = interface_decl @WithImplicitArgs [concrete = constants.%WithImplicitArgs.generic] {
// CHECK:STDOUT: %T.patt.loc22_29.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_29.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: %N.patt.loc22_39.1: @WithImplicitArgs.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_39.2 (constants.%N.patt)]
// CHECK:STDOUT: %N.patt.loc22_38.1: @WithImplicitArgs.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_38.2 (constants.%N.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc22_32.1: type = splice_block %.loc22_32.2 [concrete = type] {
// CHECK:STDOUT: %.loc22_31.1: type = splice_block %.loc22_31.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen.loc22_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc22_32.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc22_31.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc22_29.2: type = symbolic_binding T, 0 [symbolic = %T.loc22_29.1 (constants.%T.67d)]
// CHECK:STDOUT: %.loc22_42: type = splice_block %T.ref [symbolic = %T.loc22_29.1 (constants.%T.67d)] {
// CHECK:STDOUT: %.Self.frozen.loc22_39: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc22_40: type = splice_block %T.ref [symbolic = %T.loc22_29.1 (constants.%T.67d)] {
// CHECK:STDOUT: %.Self.frozen.loc22_38: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc22_29.2 [symbolic = %T.loc22_29.1 (constants.%T.67d)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %N.loc22_39.2: @WithImplicitArgs.%T.loc22_29.1 (%T.67d) = symbolic_binding N, 1 [symbolic = %N.loc22_39.1 (constants.%N)]
// CHECK:STDOUT: %N.loc22_38.2: @WithImplicitArgs.%T.loc22_29.1 (%T.67d) = symbolic_binding N, 1 [symbolic = %N.loc22_38.1 (constants.%N)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Receive.decl: %Receive.type = fn_decl @Receive [concrete = constants.%Receive] {
// CHECK:STDOUT: %T.patt.loc24_20.1: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_20.2 (constants.%T.patt.407)]
// CHECK:STDOUT: %T.patt.loc24_28.1: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_28.2 (constants.%T.patt.407)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc24: type = splice_block %Simple.type [concrete = constants.%Simple.type.d50] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
@@ -193,10 +193,10 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [concrete = constants.%Simple.type.d50]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc24_20.3: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_20.2 (constants.%T.16788c.2)]
// CHECK:STDOUT: %T.loc24_28.3: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_28.2 (constants.%T.16788c.2)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Pass.decl: %Pass.type = fn_decl @Pass [concrete = constants.%Pass] {
// CHECK:STDOUT: %T.patt.loc25_10.1: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_10.2 (constants.%T.patt.407)]
// CHECK:STDOUT: %T.patt.loc25_18.1: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_18.2 (constants.%T.patt.407)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc25: type = splice_block %Simple.type [concrete = constants.%Simple.type.d50] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
@@ -204,7 +204,7 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [concrete = constants.%Simple.type.d50]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc25_10.2: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc25_10.1 (constants.%T.16788c.1)]
// CHECK:STDOUT: %T.loc25_18.2: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc25_18.1 (constants.%T.16788c.1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -214,14 +214,14 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(%T.loc4_19.1)> [symbolic = %Simple.type (constants.%Simple.type.f9b)]
// CHECK:STDOUT: %Self.loc4_28.2: @Simple.%Simple.type (%Simple.type.f9b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.55b)]
// CHECK:STDOUT: %Self.loc4_27.2: @Simple.%Simple.type (%Simple.type.f9b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_27.2 (constants.%Self.55b)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc4_28.1: @Simple.%Simple.type (%Simple.type.f9b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.55b)]
// CHECK:STDOUT: %Self.loc4_27.1: @Simple.%Simple.type (%Simple.type.f9b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_27.2 (constants.%Self.55b)]
// CHECK:STDOUT: %Simple.WithSelf.decl = interface_with_self_decl @Simple [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc4_28.1
// CHECK:STDOUT: .Self = %Self.loc4_27.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -236,10 +236,10 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %WithAssocFn.type: type = facet_type <@WithAssocFn, @WithAssocFn(%T.loc8_24.1)> [symbolic = %WithAssocFn.type (constants.%WithAssocFn.type.ea2)]
// CHECK:STDOUT: %Self.loc8_33.2: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2) = symbolic_binding Self, 1 [symbolic = %Self.loc8_33.2 (constants.%Self.e5d)]
// CHECK:STDOUT: %Self.loc8_32.2: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2) = symbolic_binding Self, 1 [symbolic = %Self.loc8_32.2 (constants.%Self.e5d)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc8_33.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2) = symbolic_binding Self, 1 [symbolic = %Self.loc8_33.2 (constants.%Self.e5d)]
// CHECK:STDOUT: %Self.loc8_32.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2) = symbolic_binding Self, 1 [symbolic = %Self.loc8_32.2 (constants.%Self.e5d)]
// CHECK:STDOUT: %WithAssocFn.WithSelf.decl = interface_with_self_decl @WithAssocFn [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
@@ -255,7 +255,7 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %assoc0.loc10_14.1: @WithAssocFn.WithSelf.%WithAssocFn.assoc_type (%WithAssocFn.assoc_type.b11) = assoc_entity element0, %WithAssocFn.WithSelf.F.decl [symbolic = %assoc0.loc10_14.2 (constants.%assoc0.f49)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc8_33.1
// CHECK:STDOUT: .Self = %Self.loc8_32.1
// CHECK:STDOUT: .X = <poisoned>
// CHECK:STDOUT: .X = <poisoned>
// CHECK:STDOUT: .F = @WithAssocFn.WithSelf.%assoc0.loc10_14.1
@@ -267,12 +267,12 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic interface @WithImplicitArgs(%T.loc22_29.2: type, %N.loc22_39.2: @WithImplicitArgs.%T.loc22_29.1 (%T.67d)) {
// CHECK:STDOUT: generic interface @WithImplicitArgs(%T.loc22_29.2: type, %N.loc22_38.2: @WithImplicitArgs.%T.loc22_29.1 (%T.67d)) {
// CHECK:STDOUT: %T.patt.loc22_29.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_29.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: %T.loc22_29.1: type = symbolic_binding T, 0 [symbolic = %T.loc22_29.1 (constants.%T.67d)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc22_29.1 [symbolic = %pattern_type (constants.%pattern_type.51d)]
// CHECK:STDOUT: %N.patt.loc22_39.2: @WithImplicitArgs.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_39.2 (constants.%N.patt)]
// CHECK:STDOUT: %N.loc22_39.1: @WithImplicitArgs.%T.loc22_29.1 (%T.67d) = symbolic_binding N, 1 [symbolic = %N.loc22_39.1 (constants.%N)]
// CHECK:STDOUT: %N.patt.loc22_38.2: @WithImplicitArgs.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_38.2 (constants.%N.patt)]
// CHECK:STDOUT: %N.loc22_38.1: @WithImplicitArgs.%T.loc22_29.1 (%T.67d) = symbolic_binding N, 1 [symbolic = %N.loc22_38.1 (constants.%N)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface;
// CHECK:STDOUT: }
@@ -338,7 +338,7 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: .X = <poisoned>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @WithAssocFn.WithSelf.F(@WithAssocFn.%T.loc8_24.2: type, @WithAssocFn.%Self.loc8_33.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2)) {
// CHECK:STDOUT: generic fn @WithAssocFn.WithSelf.F(@WithAssocFn.%T.loc8_24.2: type, @WithAssocFn.%Self.loc8_32.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.ea2)) {
// CHECK:STDOUT: fn() -> out %return.param: %X;
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -352,10 +352,10 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: !observes:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Receive(%T.loc24_20.3: %Simple.type.d50) {
// CHECK:STDOUT: %T.patt.loc24_20.2: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_20.2 (constants.%T.patt.407)]
// CHECK:STDOUT: %T.loc24_20.1: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_20.1 (constants.%T.16788c.1)]
// CHECK:STDOUT: %T.loc24_20.2: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_20.2 (constants.%T.16788c.2)]
// CHECK:STDOUT: generic fn @Receive(%T.loc24_28.3: %Simple.type.d50) {
// CHECK:STDOUT: %T.patt.loc24_28.2: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_28.2 (constants.%T.patt.407)]
// CHECK:STDOUT: %T.loc24_28.1: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_28.1 (constants.%T.16788c.1)]
// CHECK:STDOUT: %T.loc24_28.2: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc24_28.2 (constants.%T.16788c.2)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
@@ -367,17 +367,17 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @Pass(%T.loc25_10.2: %Simple.type.d50) {
// CHECK:STDOUT: %T.patt.loc25_10.2: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_10.2 (constants.%T.patt.407)]
// CHECK:STDOUT: %T.loc25_10.1: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc25_10.1 (constants.%T.16788c.1)]
// CHECK:STDOUT: generic fn @Pass(%T.loc25_18.2: %Simple.type.d50) {
// CHECK:STDOUT: %T.patt.loc25_18.2: %pattern_type.472 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_18.2 (constants.%T.patt.407)]
// CHECK:STDOUT: %T.loc25_18.1: %Simple.type.d50 = symbolic_binding T, 0 [symbolic = %T.loc25_18.1 (constants.%T.16788c.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Receive.specific_fn.loc26_3.2: <specific function> = specific_function constants.%Receive, @Receive(%T.loc25_10.1) [symbolic = %Receive.specific_fn.loc26_3.2 (constants.%Receive.specific_fn)]
// CHECK:STDOUT: %Receive.specific_fn.loc26_3.2: <specific function> = specific_function constants.%Receive, @Receive(%T.loc25_18.1) [symbolic = %Receive.specific_fn.loc26_3.2 (constants.%Receive.specific_fn)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Receive.ref: %Receive.type = name_ref Receive, file.%Receive.decl [concrete = constants.%Receive]
// CHECK:STDOUT: %T.ref: %Simple.type.d50 = name_ref T, %T.loc25_10.2 [symbolic = %T.loc25_10.1 (constants.%T.16788c.1)]
// CHECK:STDOUT: %T.ref: %Simple.type.d50 = name_ref T, %T.loc25_18.2 [symbolic = %T.loc25_18.1 (constants.%T.16788c.1)]
// CHECK:STDOUT: %Receive.specific_fn.loc26_3.1: <specific function> = specific_function %Receive.ref, @Receive(constants.%T.16788c.1) [symbolic = %Receive.specific_fn.loc26_3.2 (constants.%Receive.specific_fn)]
// CHECK:STDOUT: %Receive.call: init %empty_tuple.type = call %Receive.specific_fn.loc26_3.1()
// CHECK:STDOUT: return
@@ -408,7 +408,7 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Simple.type => constants.%Simple.type.d50
// CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.e0f
// CHECK:STDOUT: %Self.loc4_27.2 => constants.%Self.e0f
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Simple.WithSelf(constants.%C, constants.%Self.55b) {
@@ -425,7 +425,7 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %WithAssocFn.type => constants.%WithAssocFn.type.5fd
// CHECK:STDOUT: %Self.loc8_33.2 => constants.%Self.925
// CHECK:STDOUT: %Self.loc8_32.2 => constants.%Self.925
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @WithAssocFn.WithSelf(constants.%C, constants.%Self.e5d) {
@@ -456,25 +456,25 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %T.patt.loc22_29.2 => constants.%T.patt.d47
// CHECK:STDOUT: %T.loc22_29.1 => constants.%T.67d
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
// CHECK:STDOUT: %N.patt.loc22_39.2 => constants.%N.patt
// CHECK:STDOUT: %N.loc22_39.1 => constants.%N
// CHECK:STDOUT: %N.patt.loc22_38.2 => constants.%N.patt
// CHECK:STDOUT: %N.loc22_38.1 => constants.%N
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Receive(constants.%T.16788c.2) {
// CHECK:STDOUT: %T.patt.loc24_20.2 => constants.%T.patt.407
// CHECK:STDOUT: %T.loc24_20.1 => constants.%T.16788c.2
// CHECK:STDOUT: %T.loc24_20.2 => constants.%T.16788c.2
// CHECK:STDOUT: %T.patt.loc24_28.2 => constants.%T.patt.407
// CHECK:STDOUT: %T.loc24_28.1 => constants.%T.16788c.2
// CHECK:STDOUT: %T.loc24_28.2 => constants.%T.16788c.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Pass(constants.%T.16788c.1) {
// CHECK:STDOUT: %T.patt.loc25_10.2 => constants.%T.patt.407
// CHECK:STDOUT: %T.loc25_10.1 => constants.%T.16788c.1
// CHECK:STDOUT: %T.patt.loc25_18.2 => constants.%T.patt.407
// CHECK:STDOUT: %T.loc25_18.1 => constants.%T.16788c.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Receive(constants.%T.16788c.1) {
// CHECK:STDOUT: %T.patt.loc24_20.2 => constants.%T.patt.407
// CHECK:STDOUT: %T.loc24_20.1 => constants.%T.16788c.1
// CHECK:STDOUT: %T.loc24_20.2 => constants.%T.16788c.1
// CHECK:STDOUT: %T.patt.loc24_28.2 => constants.%T.patt.407
// CHECK:STDOUT: %T.loc24_28.1 => constants.%T.16788c.1
// CHECK:STDOUT: %T.loc24_28.2 => constants.%T.16788c.1
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
@@ -522,16 +522,16 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] {
// CHECK:STDOUT: %T.patt.loc4_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_20.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc4_23.1: type = splice_block %.loc4_23.2 [concrete = type] {
// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc4_23.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc4_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_20.1 (constants.%T.67d)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
// CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {}
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %T.patt.loc9_7.1: %pattern_type.338 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.49c)]
// CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.338 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.49c)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc9: type = splice_block %Generic.type [concrete = constants.%Generic.type.c3a] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
@@ -539,10 +539,10 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%A)> [concrete = constants.%Generic.type.c3a]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc9_7.2: %Generic.type.c3a = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.ca1)]
// CHECK:STDOUT: %T.loc9_15.2: %Generic.type.c3a = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T.ca1)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
// CHECK:STDOUT: %T.patt.loc10_7.1: %pattern_type.dae = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_7.2 (constants.%T.patt.b1f)]
// CHECK:STDOUT: %T.patt.loc10_15.1: %pattern_type.dae = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt.b1f)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc10: type = splice_block %Generic.type [concrete = constants.%Generic.type.57d] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
@@ -550,7 +550,7 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%B)> [concrete = constants.%Generic.type.57d]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc10_7.2: %Generic.type.57d = symbolic_binding T, 0 [symbolic = %T.loc10_7.1 (constants.%T.f18)]
// CHECK:STDOUT: %T.loc10_15.2: %Generic.type.57d = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T.f18)]
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -560,14 +560,14 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%T.loc4_20.1)> [symbolic = %Generic.type (constants.%Generic.type.ee1)]
// CHECK:STDOUT: %Self.loc4_29.2: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.8ea)]
// CHECK:STDOUT: %Self.loc4_28.2: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.8ea)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc4_29.1: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.8ea)]
// CHECK:STDOUT: %Self.loc4_28.1: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.8ea)]
// CHECK:STDOUT: %Generic.WithSelf.decl = interface_with_self_decl @Generic [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc4_29.1
// CHECK:STDOUT: .Self = %Self.loc4_28.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -592,24 +592,24 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: .Self = constants.%B
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @F(%T.loc9_7.2: %Generic.type.c3a) {
// CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.338 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.49c)]
// CHECK:STDOUT: %T.loc9_7.1: %Generic.type.c3a = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.ca1)]
// CHECK:STDOUT: generic fn @F(%T.loc9_15.2: %Generic.type.c3a) {
// CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.338 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.49c)]
// CHECK:STDOUT: %T.loc9_15.1: %Generic.type.c3a = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T.ca1)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @G(%T.loc10_7.2: %Generic.type.57d) {
// CHECK:STDOUT: %T.patt.loc10_7.2: %pattern_type.dae = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_7.2 (constants.%T.patt.b1f)]
// CHECK:STDOUT: %T.loc10_7.1: %Generic.type.57d = symbolic_binding T, 0 [symbolic = %T.loc10_7.1 (constants.%T.f18)]
// CHECK:STDOUT: generic fn @G(%T.loc10_15.2: %Generic.type.57d) {
// CHECK:STDOUT: %T.patt.loc10_15.2: %pattern_type.dae = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt.b1f)]
// CHECK:STDOUT: %T.loc10_15.1: %Generic.type.57d = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T.f18)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as_type.loc18_6.2: type = facet_access_type %T.loc10_7.1 [symbolic = %T.as_type.loc18_6.2 (constants.%T.as_type)]
// CHECK:STDOUT: %T.as_type.loc18_6.2: type = facet_access_type %T.loc10_15.1 [symbolic = %T.as_type.loc18_6.2 (constants.%T.as_type)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
// CHECK:STDOUT: %T.ref: %Generic.type.57d = name_ref T, %T.loc10_7.2 [symbolic = %T.loc10_7.1 (constants.%T.f18)]
// CHECK:STDOUT: %T.ref: %Generic.type.57d = name_ref T, %T.loc10_15.2 [symbolic = %T.loc10_15.1 (constants.%T.f18)]
// CHECK:STDOUT: %T.as_type.loc18_6.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_6.2 (constants.%T.as_type)]
// CHECK:STDOUT: return
// CHECK:STDOUT:
@@ -630,8 +630,8 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @F(constants.%T.ca1) {
// CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.49c
// CHECK:STDOUT: %T.loc9_7.1 => constants.%T.ca1
// CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt.49c
// CHECK:STDOUT: %T.loc9_15.1 => constants.%T.ca1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic(constants.%B) {
@@ -640,12 +640,12 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Generic.type => constants.%Generic.type.57d
// CHECK:STDOUT: %Self.loc4_29.2 => constants.%Self.cb2
// CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.cb2
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @G(constants.%T.f18) {
// CHECK:STDOUT: %T.patt.loc10_7.2 => constants.%T.patt.b1f
// CHECK:STDOUT: %T.loc10_7.1 => constants.%T.f18
// CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt.b1f
// CHECK:STDOUT: %T.loc10_15.1 => constants.%T.f18
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Generic.WithSelf(constants.%B, constants.%Self.8ea) {
@@ -678,9 +678,9 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] {
// CHECK:STDOUT: %T.patt.loc3_20.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_20.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc3_23.1: type = splice_block %.loc3_23.2 [concrete = type] {
// CHECK:STDOUT: %.loc3_22.1: type = splice_block %.loc3_22.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc3_23.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc3_22.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc3_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_20.1 (constants.%T)]
// CHECK:STDOUT: }
@@ -690,8 +690,8 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic]
// CHECK:STDOUT: %.loc12_26: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
// CHECK:STDOUT: %.loc12_30: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
// CHECK:STDOUT: %.loc12_33: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
// CHECK:STDOUT: %.loc12_37: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T: <error> = symbolic_binding T, 0 [concrete = <error>]
// CHECK:STDOUT: }
@@ -703,14 +703,14 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%T.loc3_20.1)> [symbolic = %Generic.type (constants.%Generic.type.ee1)]
// CHECK:STDOUT: %Self.loc3_29.2: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc3_29.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc3_28.2: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc3_28.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc3_29.1: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc3_29.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc3_28.1: @Generic.%Generic.type (%Generic.type.ee1) = symbolic_binding Self, 1 [symbolic = %Self.loc3_28.2 (constants.%Self)]
// CHECK:STDOUT: %Generic.WithSelf.decl = interface_with_self_decl @Generic [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc3_29.1
// CHECK:STDOUT: .Self = %Self.loc3_28.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -13,11 +13,11 @@
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon
interface I {
fn F(T:! type);
let U:! type;
fn F(generic T: type);
let U: type;
// This `T` should have index 1, just like the `T` above.
// The intervening `U:! type` should not cause this to have index 2.
fn G(T:! type);
// The intervening `U: type` should not cause this to have index 2.
fn G(generic T: type);
}
// CHECK:STDOUT: --- generic_binding_after_assoc_const.carbon
@@ -53,26 +53,26 @@ interface I {
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
// CHECK:STDOUT: %I.WithSelf.F.decl: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F)] {
// CHECK:STDOUT: %T.patt.loc16_9.1: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_9.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc16_17.1: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_17.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc16_12.1: type = splice_block %.loc16_12.2 [concrete = type] {
// CHECK:STDOUT: %.loc16_19.1: type = splice_block %.loc16_19.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc16_12.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc16_19.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc16_9.2: type = symbolic_binding T, 1 [symbolic = %T.loc16_9.1 (constants.%T)]
// CHECK:STDOUT: %T.loc16_17.2: type = symbolic_binding T, 1 [symbolic = %T.loc16_17.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0]
// CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.WithSelf.%U [concrete = constants.%assoc1]
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.WithSelf.G.decl: @I.WithSelf.%I.WithSelf.G.type (%I.WithSelf.G.type) = fn_decl @I.WithSelf.G [symbolic = @I.WithSelf.%I.WithSelf.G (constants.%I.WithSelf.G)] {
// CHECK:STDOUT: %T.patt.loc20_9.1: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc20_9.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.patt.loc20_17.1: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc20_17.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc20_12.1: type = splice_block %.loc20_12.2 [concrete = type] {
// CHECK:STDOUT: %.loc20_19.1: type = splice_block %.loc20_19.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc20_12.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc20_19.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc20_9.2: type = symbolic_binding T, 1 [symbolic = %T.loc20_9.1 (constants.%T)]
// CHECK:STDOUT: %T.loc20_17.2: type = symbolic_binding T, 1 [symbolic = %T.loc20_17.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, %I.WithSelf.G.decl [concrete = constants.%assoc2]
// CHECK:STDOUT:
@@ -88,16 +88,16 @@ interface I {
// CHECK:STDOUT: !observes:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self: %I.type, %T.loc16_9.2: type) {
// CHECK:STDOUT: %T.patt.loc16_9.2: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_9.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc16_9.1: type = symbolic_binding T, 1 [symbolic = %T.loc16_9.1 (constants.%T)]
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self: %I.type, %T.loc16_17.2: type) {
// CHECK:STDOUT: %T.patt.loc16_17.2: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc16_17.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc16_17.1: type = symbolic_binding T, 1 [symbolic = %T.loc16_17.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @I.WithSelf.G(@I.%Self: %I.type, %T.loc20_9.2: type) {
// CHECK:STDOUT: %T.patt.loc20_9.2: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc20_9.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc20_9.1: type = symbolic_binding T, 1 [symbolic = %T.loc20_9.1 (constants.%T)]
// CHECK:STDOUT: generic fn @I.WithSelf.G(@I.%Self: %I.type, %T.loc20_17.2: type) {
// CHECK:STDOUT: %T.patt.loc20_17.2: %pattern_type = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc20_17.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc20_17.1: type = symbolic_binding T, 1 [symbolic = %T.loc20_17.1 (constants.%T)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
@@ -105,12 +105,12 @@ interface I {
// CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self, constants.%T) {
// CHECK:STDOUT: %T.patt.loc16_9.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc16_9.1 => constants.%T
// CHECK:STDOUT: %T.patt.loc16_17.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc16_17.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf.G(constants.%Self, constants.%T) {
// CHECK:STDOUT: %T.patt.loc20_9.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc20_9.1 => constants.%T
// CHECK:STDOUT: %T.patt.loc20_17.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc20_17.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -10,11 +10,11 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/generic_default_fn.carbon
interface I(_:! type) {
interface I(_: type) {
// TODO: Use `default` here.
fn F(ref self) -> Self*;
}
fn I(_:! type).F(ref self) -> Self* {
fn I(_: type).F(ref self) -> Self* {
return &self;
}
+9 -9
View File
@@ -16,7 +16,7 @@
library "[[@TEST_NAME]]";
interface AddWith(T:! type) {
interface AddWith(T: type) {
fn F();
}
@@ -56,9 +56,9 @@ impl C as AddWith(C) {
// CHECK:STDOUT: %AddWith.decl: %AddWith.type.097 = interface_decl @AddWith [concrete = constants.%AddWith.generic] {
// CHECK:STDOUT: %T.patt.loc4_20.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_20.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc4_23.1: type = splice_block %.loc4_23.2 [concrete = type] {
// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc4_23.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc4_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_20.1 (constants.%T)]
// CHECK:STDOUT: }
@@ -70,10 +70,10 @@ impl C as AddWith(C) {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc4_20.1)> [symbolic = %AddWith.type (constants.%AddWith.type.e7b)]
// CHECK:STDOUT: %Self.loc4_29.2: @AddWith.%AddWith.type (%AddWith.type.e7b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc4_28.2: @AddWith.%AddWith.type (%AddWith.type.e7b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc4_29.1: @AddWith.%AddWith.type (%AddWith.type.e7b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc4_28.1: @AddWith.%AddWith.type (%AddWith.type.e7b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self)]
// CHECK:STDOUT: %AddWith.WithSelf.decl = interface_with_self_decl @AddWith [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
@@ -81,7 +81,7 @@ impl C as AddWith(C) {
// CHECK:STDOUT: %assoc0.loc5_9.1: @AddWith.WithSelf.%AddWith.assoc_type (%AddWith.assoc_type) = assoc_entity element0, %AddWith.WithSelf.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc4_29.1
// CHECK:STDOUT: .Self = %Self.loc4_28.1
// CHECK:STDOUT: .F = @AddWith.WithSelf.%assoc0.loc5_9.1
// CHECK:STDOUT: witness = (@AddWith.WithSelf.%AddWith.WithSelf.F.decl)
// CHECK:STDOUT:
@@ -91,7 +91,7 @@ impl C as AddWith(C) {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @AddWith.WithSelf.F(@AddWith.%T.loc4_20.2: type, @AddWith.%Self.loc4_29.1: @AddWith.%AddWith.type (%AddWith.type.e7b)) {
// CHECK:STDOUT: generic fn @AddWith.WithSelf.F(@AddWith.%T.loc4_20.2: type, @AddWith.%Self.loc4_28.1: @AddWith.%AddWith.type (%AddWith.type.e7b)) {
// CHECK:STDOUT: fn();
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -139,8 +139,8 @@ impl C as AddWith(C) {
// CHECK:STDOUT: %Main.F: @AddWith.WithSelf.%AddWith.WithSelf.F.type (%AddWith.WithSelf.F.type.ada) = import_ref Main//a, F, loaded [symbolic = @AddWith.WithSelf.%AddWith.WithSelf.F (constants.%AddWith.WithSelf.F.2ed)]
// CHECK:STDOUT: %Main.import_ref.b87 = import_ref Main//a, loc5_9, unloaded
// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//a, loc4_20, loaded [symbolic = @AddWith.%T (constants.%T)]
// CHECK:STDOUT: %Main.import_ref.08ad54.2: @AddWith.%AddWith.type (%AddWith.type.e7b) = import_ref Main//a, loc4_29, loaded [symbolic = @AddWith.%Self (constants.%Self.403)]
// CHECK:STDOUT: %Main.import_ref.a0a = import_ref Main//a, loc4_29, unloaded
// CHECK:STDOUT: %Main.import_ref.08ad54.2: @AddWith.%AddWith.type (%AddWith.type.e7b) = import_ref Main//a, loc4_28, loaded [symbolic = @AddWith.%Self (constants.%Self.403)]
// CHECK:STDOUT: %Main.import_ref.a0a = import_ref Main//a, loc4_28, unloaded
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//a, loc4_20, loaded [symbolic = @AddWith.%T (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT:
File diff suppressed because it is too large Load Diff
+31 -31
View File
@@ -18,11 +18,11 @@ library "[[@TEST_NAME]]";
interface NotGenericNoParams {}
interface NotGenericButParams() {}
interface GenericAndParams(T:! type) {}
interface GenericAndParams(T: type) {}
class C(T:! type) {
class C(T: type) {
interface GenericNoParams {}
interface GenericAndParams(U:! type) {}
interface GenericAndParams(U: type) {}
}
class X {}
@@ -37,20 +37,20 @@ impl X as C(X).GenericAndParams(X) {}
library "[[@TEST_NAME]]";
// CHECK:STDERR: fail_non_generic_implicit_params.carbon:[[@LINE+4]]:13: error: parameters of generic types must be constant [GenericParamMustBeConstant]
// CHECK:STDERR: interface A[T: type]() {}
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: interface A[runtime T: type]() {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
interface A[T: type]() {}
interface A[runtime T: type]() {}
// --- fail_non_generic_params.carbon
library "[[@TEST_NAME]]";
// CHECK:STDERR: fail_non_generic_params.carbon:[[@LINE+4]]:13: error: parameters of generic types must be constant [GenericParamMustBeConstant]
// CHECK:STDERR: interface A(T: type) {}
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: interface A(runtime T: type) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
interface A(T: type) {}
interface A(runtime T: type) {}
// --- fail_implicit_params_only_empty.carbon
@@ -67,10 +67,10 @@ interface Bar[] {}
library "[[@TEST_NAME]]";
// CHECK:STDERR: fail_implicit_params_only.carbon:[[@LINE+4]]:14: error: expected explicit parameters after implicit parameters [GenericMissingExplicitParameters]
// CHECK:STDERR: interface Bar[T:! type] {}
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: interface Bar[T: type] {}
// CHECK:STDERR: ^~~~~~~~~
// CHECK:STDERR:
interface Bar[T:! type] {}
interface Bar[T: type] {}
// CHECK:STDOUT: --- params.carbon
// CHECK:STDOUT:
@@ -138,18 +138,18 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: %GenericAndParams.decl: %GenericAndParams.type.23f = interface_decl @GenericAndParams.loc6 [concrete = constants.%GenericAndParams.generic.504] {
// CHECK:STDOUT: %T.patt.loc6_29.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_29.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc6_32.1: type = splice_block %.loc6_32.2 [concrete = type] {
// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc6_32.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc6_31.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc6_29.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_29.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
// CHECK:STDOUT: %T.patt.loc8_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_10.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] {
// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc8_12.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_10.1 (constants.%T)]
// CHECK:STDOUT: }
@@ -221,14 +221,14 @@ interface Bar[T:! type] {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %GenericAndParams.type: type = facet_type <@GenericAndParams.loc6, @GenericAndParams.loc6(%T.loc6_29.1)> [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.b17)]
// CHECK:STDOUT: %Self.loc6_38.2: @GenericAndParams.loc6.%GenericAndParams.type (%GenericAndParams.type.b17) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.cda)]
// CHECK:STDOUT: %Self.loc6_37.2: @GenericAndParams.loc6.%GenericAndParams.type (%GenericAndParams.type.b17) = symbolic_binding Self, 1 [symbolic = %Self.loc6_37.2 (constants.%Self.cda)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc6_38.1: @GenericAndParams.loc6.%GenericAndParams.type (%GenericAndParams.type.b17) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.cda)]
// CHECK:STDOUT: %Self.loc6_37.1: @GenericAndParams.loc6.%GenericAndParams.type (%GenericAndParams.type.b17) = symbolic_binding Self, 1 [symbolic = %Self.loc6_37.2 (constants.%Self.cda)]
// CHECK:STDOUT: %GenericAndParams.WithSelf.decl = interface_with_self_decl @GenericAndParams.loc6 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc6_38.1
// CHECK:STDOUT: .Self = %Self.loc6_37.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -264,14 +264,14 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %GenericAndParams.type: type = facet_type <@GenericAndParams.loc10, @GenericAndParams.loc10(%T, %U.loc10_31.1)> [symbolic = %GenericAndParams.type (constants.%GenericAndParams.type.ba4)]
// CHECK:STDOUT: %Self.loc10_40.2: @GenericAndParams.loc10.%GenericAndParams.type (%GenericAndParams.type.ba4) = symbolic_binding Self, 2 [symbolic = %Self.loc10_40.2 (constants.%Self.72e)]
// CHECK:STDOUT: %Self.loc10_39.2: @GenericAndParams.loc10.%GenericAndParams.type (%GenericAndParams.type.ba4) = symbolic_binding Self, 2 [symbolic = %Self.loc10_39.2 (constants.%Self.72e)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc10_40.1: @GenericAndParams.loc10.%GenericAndParams.type (%GenericAndParams.type.ba4) = symbolic_binding Self, 2 [symbolic = %Self.loc10_40.2 (constants.%Self.72e)]
// CHECK:STDOUT: %Self.loc10_39.1: @GenericAndParams.loc10.%GenericAndParams.type (%GenericAndParams.type.ba4) = symbolic_binding Self, 2 [symbolic = %Self.loc10_39.2 (constants.%Self.72e)]
// CHECK:STDOUT: %GenericAndParams.WithSelf.decl = interface_with_self_decl @GenericAndParams.loc10 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc10_40.1
// CHECK:STDOUT: .Self = %Self.loc10_39.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -339,9 +339,9 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: %GenericAndParams.decl: @C.%GenericAndParams.type (%GenericAndParams.type.c43) = interface_decl @GenericAndParams.loc10 [symbolic = @C.%GenericAndParams.generic (constants.%GenericAndParams.generic.079)] {
// CHECK:STDOUT: %U.patt.loc10_31.1: %pattern_type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc10_31.2 (constants.%U.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc10_34.1: type = splice_block %.loc10_34.2 [concrete = type] {
// CHECK:STDOUT: %.loc10_33.1: type = splice_block %.loc10_33.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc10_34.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc10_33.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %U.loc10_31.2: type = symbolic_binding U, 1 [symbolic = %U.loc10_31.1 (constants.%U)]
// CHECK:STDOUT: }
@@ -408,7 +408,7 @@ interface Bar[T:! type] {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.8ab
// CHECK:STDOUT: %Self.loc6_38.2 => constants.%Self.34f
// CHECK:STDOUT: %Self.loc6_37.2 => constants.%Self.34f
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @GenericAndParams.WithSelf.loc6(constants.%X, constants.%Self.cda) {
@@ -451,7 +451,7 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T => constants.%X
// CHECK:STDOUT: %GenericAndParams.type => constants.%GenericAndParams.type.b2b
// CHECK:STDOUT: %Self.loc10_40.2 => constants.%Self.883
// CHECK:STDOUT: %Self.loc10_39.2 => constants.%Self.883
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @GenericAndParams.WithSelf.loc10(constants.%X, constants.%X, constants.%Self.72e) {
@@ -576,9 +576,9 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: %Bar.decl: %Bar.type.3f0 = interface_decl @Bar [concrete = constants.%Bar.generic] {
// CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_16.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.2 [concrete = type] {
// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc8_19.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_16.1 (constants.%T)]
// CHECK:STDOUT: }
@@ -590,14 +590,14 @@ interface Bar[T:! type] {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Bar.type: type = facet_type <@Bar, @Bar(%T.loc8_16.1)> [symbolic = %Bar.type (constants.%Bar.type.e6f)]
// CHECK:STDOUT: %Self.loc8_25.2: @Bar.%Bar.type (%Bar.type.e6f) = symbolic_binding Self, 1 [symbolic = %Self.loc8_25.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc8_24.2: @Bar.%Bar.type (%Bar.type.e6f) = symbolic_binding Self, 1 [symbolic = %Self.loc8_24.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc8_25.1: @Bar.%Bar.type (%Bar.type.e6f) = symbolic_binding Self, 1 [symbolic = %Self.loc8_25.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc8_24.1: @Bar.%Bar.type (%Bar.type.e6f) = symbolic_binding Self, 1 [symbolic = %Self.loc8_24.2 (constants.%Self)]
// CHECK:STDOUT: %Bar.WithSelf.decl = interface_with_self_decl @Bar [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc8_25.1
// CHECK:STDOUT: .Self = %Self.loc8_24.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
+2 -2
View File
@@ -20,7 +20,7 @@ interface Empty {
}
interface Basic {
let T:! type;
let T: type;
fn F();
}
@@ -28,7 +28,7 @@ interface Basic {
// interface ForwardDeclared;
interface ForwardDeclared {
let T:! type;
let T: type;
fn F();
}
+32 -32
View File
@@ -18,7 +18,7 @@ library "[[@TEST_NAME]]";
class C;
interface I {
let T:! C;
let T: C;
}
// --- fail_incomplete_type_impl.carbon
@@ -27,7 +27,7 @@ library "[[@TEST_NAME]]";
class C;
interface I {
let T:! C;
let T: C;
}
// CHECK:STDERR: fail_incomplete_type_impl.carbon:[[@LINE+7]]:26: error: invalid use of incomplete type `C` [IncompleteTypeInConversion]
@@ -45,10 +45,10 @@ library "[[@TEST_NAME]]";
class C;
interface I {
let T:! C;
let T: C;
}
fn F[U:! I](a: U) {
fn F[U: I](a: U) {
// TODO: Should this be diagnosed as having an incomplete type?
a.T;
}
@@ -86,13 +86,13 @@ interface A {
// --- fail_extend_require_enclosing_generic.carbon
library "[[@TEST_NAME]]";
interface A(T:! type) {
interface A(T: type) {
// CHECK:STDERR: fail_extend_require_enclosing_generic.carbon:[[@LINE+7]]:24: error: `extend require` of incomplete facet type `A({})` [RequireImplsIncompleteFacetType]
// CHECK:STDERR: extend require impls A({});
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_extend_require_enclosing_generic.carbon:[[@LINE-4]]:1: note: interface is currently being defined [InterfaceIncompleteWithinDefinition]
// CHECK:STDERR: interface A(T:! type) {
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: interface A(T: type) {
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
extend require impls A({});
}
@@ -261,21 +261,21 @@ interface A(T:! type) {
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
// CHECK:STDOUT: %U.patt.loc9_7.1: %pattern_type.6cb = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_7.2 (constants.%U.patt)]
// CHECK:STDOUT: %a.param_patt.loc9_14.1: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %a.param_patt.loc9_14.2 (constants.%a.param_patt)]
// CHECK:STDOUT: %a.patt.loc9_14.1: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern a, %a.param_patt.loc9_14.1 [symbolic = %a.patt.loc9_14.2 (constants.%a.patt)]
// CHECK:STDOUT: %a.param_patt.loc9_13.1: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %a.param_patt.loc9_13.2 (constants.%a.param_patt)]
// CHECK:STDOUT: %a.patt.loc9_13.1: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern a, %a.param_patt.loc9_13.1 [symbolic = %a.patt.loc9_13.2 (constants.%a.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc9_10: type = splice_block %I.ref [concrete = constants.%I.type] {
// CHECK:STDOUT: %.loc9_9: type = splice_block %I.ref [concrete = constants.%I.type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %U.loc9_7.2: %I.type = symbolic_binding U, 0 [symbolic = %U.loc9_7.1 (constants.%U)]
// CHECK:STDOUT: %a.param: @F.%U.as_type.loc9_16.1 (%U.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc9_16.1: type = splice_block %.loc9_16.2 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)] {
// CHECK:STDOUT: %a.param: @F.%U.as_type.loc9_15.1 (%U.as_type) = value_param call_param0
// CHECK:STDOUT: %.loc9_15.1: type = splice_block %.loc9_15.2 [symbolic = %U.as_type.loc9_15.1 (constants.%U.as_type)] {
// CHECK:STDOUT: %U.ref: %I.type = name_ref U, %U.loc9_7.2 [symbolic = %U.loc9_7.1 (constants.%U)]
// CHECK:STDOUT: %U.as_type.loc9_16.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)]
// CHECK:STDOUT: %.loc9_16.2: type = converted %U.ref, %U.as_type.loc9_16.2 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)]
// CHECK:STDOUT: %U.as_type.loc9_15.2: type = facet_access_type %U.ref [symbolic = %U.as_type.loc9_15.1 (constants.%U.as_type)]
// CHECK:STDOUT: %.loc9_15.2: type = converted %U.ref, %U.as_type.loc9_15.2 [symbolic = %U.as_type.loc9_15.1 (constants.%U.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: @F.%U.as_type.loc9_16.1 (%U.as_type) = wrapper_binding a, %a.param
// CHECK:STDOUT: %a: @F.%U.as_type.loc9_15.1 (%U.as_type) = wrapper_binding a, %a.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -305,19 +305,19 @@ interface A(T:! type) {
// CHECK:STDOUT: generic fn @F(%U.loc9_7.2: %I.type) {
// CHECK:STDOUT: %U.patt.loc9_7.2: %pattern_type.6cb = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_7.2 (constants.%U.patt)]
// CHECK:STDOUT: %U.loc9_7.1: %I.type = symbolic_binding U, 0 [symbolic = %U.loc9_7.1 (constants.%U)]
// CHECK:STDOUT: %U.as_type.loc9_16.1: type = facet_access_type %U.loc9_7.1 [symbolic = %U.as_type.loc9_16.1 (constants.%U.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc9_16.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)]
// CHECK:STDOUT: %a.param_patt.loc9_14.2: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %a.param_patt.loc9_14.2 (constants.%a.param_patt)]
// CHECK:STDOUT: %a.patt.loc9_14.2: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern a, %a.param_patt.loc9_14.2 [symbolic = %a.patt.loc9_14.2 (constants.%a.patt)]
// CHECK:STDOUT: %U.as_type.loc9_15.1: type = facet_access_type %U.loc9_7.1 [symbolic = %U.as_type.loc9_15.1 (constants.%U.as_type)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc9_15.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)]
// CHECK:STDOUT: %a.param_patt.loc9_13.2: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %a.param_patt.loc9_13.2 (constants.%a.param_patt)]
// CHECK:STDOUT: %a.patt.loc9_13.2: @F.%pattern_type (%pattern_type.b3a) = at_binding_pattern a, %a.param_patt.loc9_13.2 [symbolic = %a.patt.loc9_13.2 (constants.%a.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type.loc9_16.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type.loc9_15.1 [symbolic = %require_complete (constants.%require_complete)]
// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %U.loc9_7.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
// CHECK:STDOUT: %impl.elem0.loc11_4.2: %C = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%a.param: @F.%U.as_type.loc9_16.1 (%U.as_type)) {
// CHECK:STDOUT: fn(%a.param: @F.%U.as_type.loc9_15.1 (%U.as_type)) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.ref: @F.%U.as_type.loc9_16.1 (%U.as_type) = name_ref a, %a
// CHECK:STDOUT: %a.ref: @F.%U.as_type.loc9_15.1 (%U.as_type) = name_ref a, %a
// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
// CHECK:STDOUT: %impl.elem0.loc11_4.1: %C = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_4.2 (constants.%impl.elem0)]
// CHECK:STDOUT: return
@@ -333,10 +333,10 @@ interface A(T:! type) {
// CHECK:STDOUT: specific @F(constants.%U) {
// CHECK:STDOUT: %U.patt.loc9_7.2 => constants.%U.patt
// CHECK:STDOUT: %U.loc9_7.1 => constants.%U
// CHECK:STDOUT: %U.as_type.loc9_16.1 => constants.%U.as_type
// CHECK:STDOUT: %U.as_type.loc9_15.1 => constants.%U.as_type
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a
// CHECK:STDOUT: %a.param_patt.loc9_14.2 => constants.%a.param_patt
// CHECK:STDOUT: %a.patt.loc9_14.2 => constants.%a.patt
// CHECK:STDOUT: %a.param_patt.loc9_13.2 => constants.%a.param_patt
// CHECK:STDOUT: %a.patt.loc9_13.2 => constants.%a.patt
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf(constants.%U) {
@@ -455,9 +455,9 @@ interface A(T:! type) {
// CHECK:STDOUT: %A.decl: %A.type.55a = interface_decl @A [concrete = constants.%A.generic] {
// CHECK:STDOUT: %T.patt.loc3_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc3_14.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] {
// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc3_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc3_14.1 (constants.%T)]
// CHECK:STDOUT: }
@@ -469,17 +469,17 @@ interface A(T:! type) {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc3_14.1)> [symbolic = %A.type (constants.%A.type.acd)]
// CHECK:STDOUT: %Self.loc3_23.2: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc3_22.2: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc3_23.1: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc3_22.1: @A.%A.type (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self)]
// CHECK:STDOUT: %A.WithSelf.decl = interface_with_self_decl @A [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
// CHECK:STDOUT: %A.WithSelf.Self.as_type.impls.A.type.require.decl = require_decl @A.WithSelf.Self.as_type.impls.A.type.require [concrete] {
// CHECK:STDOUT: require %Self.as_type.loc11_18.1 impls %A.type.loc11_28
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.as_type.loc11_18.1: type = facet_access_type @A.%Self.loc3_23.1 [symbolic = %Self.as_type.loc11_18.2 (constants.%Self.as_type)]
// CHECK:STDOUT: %Self.as_type.loc11_18.1: type = facet_access_type @A.%Self.loc3_22.1 [symbolic = %Self.as_type.loc11_18.2 (constants.%Self.as_type)]
// CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic]
// CHECK:STDOUT: %.loc11_27: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc11_28: type = converted %.loc11_27, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
@@ -487,7 +487,7 @@ interface A(T:! type) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc3_23.1
// CHECK:STDOUT: .Self = %Self.loc3_22.1
// CHECK:STDOUT: .A = <poisoned>
// CHECK:STDOUT: .A = <poisoned>
// CHECK:STDOUT: witness = ()
@@ -498,7 +498,7 @@ interface A(T:! type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic require @A.WithSelf.Self.as_type.impls.A.type.require(@A.%T.loc3_14.2: type, @A.%Self.loc3_23.1: @A.%A.type (%A.type.acd)) {
// CHECK:STDOUT: generic require @A.WithSelf.Self.as_type.impls.A.type.require(@A.%T.loc3_14.2: type, @A.%Self.loc3_22.1: @A.%A.type (%A.type.acd)) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %A.type.loc11_18: type = facet_type <@A, @A(%T)> [symbolic = %A.type.loc11_18 (constants.%A.type.acd)]
// CHECK:STDOUT: %Self: @A.WithSelf.Self.as_type.impls.A.type.require.%A.type.loc11_18 (%A.type.acd) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)]
+128 -128
View File
@@ -16,15 +16,15 @@
library "[[@TEST_NAME]]";
interface Interface(T:! type) {
let X:! T*;
interface Interface(T: type) {
let X: T*;
}
fn AccessGeneric[T:! type](I:! Interface(T)) -> T* {
fn AccessGeneric[T: type](generic I: Interface(T)) -> T* {
return I.X;
}
fn AccessConcrete(I:! Interface(i32)) -> i32* {
fn AccessConcrete(generic I: Interface(i32)) -> i32* {
return I.X;
}
@@ -32,11 +32,11 @@ fn AccessConcrete(I:! Interface(i32)) -> i32* {
library "[[@TEST_NAME]]";
interface Interface(T:! type) {
let X:! T*;
interface Interface(T: type) {
let X: T*;
}
fn AccessMissingGeneric[T:! type](I:! Interface(T)) -> T {
fn AccessMissingGeneric[T: type](generic I: Interface(T)) -> T {
// CHECK:STDERR: fail_no_member.carbon:[[@LINE+4]]:10: error: member name `nonesuch` not found in `Interface(T)` [MemberNameNotFoundInSpecificScope]
// CHECK:STDERR: return I.nonesuch;
// CHECK:STDERR: ^~~~~~~~~~
@@ -44,7 +44,7 @@ fn AccessMissingGeneric[T:! type](I:! Interface(T)) -> T {
return I.nonesuch;
}
fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
fn AccessMissingConcrete(generic I: Interface(i32)) -> i32 {
// CHECK:STDERR: fail_no_member.carbon:[[@LINE+4]]:10: error: member name `nonesuch` not found in `Interface(i32)` [MemberNameNotFoundInSpecificScope]
// CHECK:STDERR: return I.nonesuch;
// CHECK:STDERR: ^~~~~~~~~~
@@ -150,51 +150,51 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: %Interface.decl: %Interface.type.1b1 = interface_decl @Interface [concrete = constants.%Interface.generic] {
// CHECK:STDOUT: %T.patt.loc4_22.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc4_25.1: type = splice_block %.loc4_25.2 [concrete = type] {
// CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc4_25.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc4_24.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc4_22.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T.67d)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %AccessGeneric.decl: %AccessGeneric.type = fn_decl @AccessGeneric [concrete = constants.%AccessGeneric] {
// CHECK:STDOUT: %T.patt.loc8_19.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_19.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: %I.patt.loc8_29.1: @AccessGeneric.%pattern_type.loc8_29 (%pattern_type.2c6f) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_29.2 (constants.%I.patt.0cc)]
// CHECK:STDOUT: %return.param_patt.loc8_50.1: @AccessGeneric.%pattern_type.loc8_50 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc8_50.2 (constants.%return.param_patt.27f)]
// CHECK:STDOUT: %return.patt.loc8_46.1: @AccessGeneric.%pattern_type.loc8_50 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc8_50.1, %ptr.loc8_50.2 [symbolic = %return.patt.loc8_46.2 (constants.%return.patt.d67)]
// CHECK:STDOUT: %I.patt.loc8_36.1: @AccessGeneric.%pattern_type.loc8_36 (%pattern_type.2c6f) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_36.2 (constants.%I.patt.0cc)]
// CHECK:STDOUT: %return.param_patt.loc8_56.1: @AccessGeneric.%pattern_type.loc8_56 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc8_56.2 (constants.%return.param_patt.27f)]
// CHECK:STDOUT: %return.patt.loc8_52.1: @AccessGeneric.%pattern_type.loc8_56 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc8_56.1, %ptr.loc8_56.2 [symbolic = %return.patt.loc8_52.2 (constants.%return.patt.d67)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_19.2 [symbolic = %T.loc8_19.1 (constants.%T.67d)]
// CHECK:STDOUT: %ptr.loc8_50.2: type = ptr_type %T.ref.loc8_49 [symbolic = %ptr.loc8_50.1 (constants.%ptr.e8f)]
// CHECK:STDOUT: %.loc8_50.2: Core.Form = init_form %ptr.loc8_50.2 [symbolic = %.loc8_50.1 (constants.%.cb6)]
// CHECK:STDOUT: %.loc8_22.1: type = splice_block %.loc8_22.2 [concrete = type] {
// CHECK:STDOUT: %T.ref.loc8_55: type = name_ref T, %T.loc8_19.2 [symbolic = %T.loc8_19.1 (constants.%T.67d)]
// CHECK:STDOUT: %ptr.loc8_56.2: type = ptr_type %T.ref.loc8_55 [symbolic = %ptr.loc8_56.1 (constants.%ptr.e8f)]
// CHECK:STDOUT: %.loc8_56.2: Core.Form = init_form %ptr.loc8_56.2 [symbolic = %.loc8_56.1 (constants.%.cb6)]
// CHECK:STDOUT: %.loc8_21.1: type = splice_block %.loc8_21.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen.loc8_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc8_22.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc8_21.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_19.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_19.1 (constants.%T.67d)]
// CHECK:STDOUT: %.loc8_43: type = splice_block %Interface.type.loc8_43.2 [symbolic = %Interface.type.loc8_43.1 (constants.%Interface.type.fe8)] {
// CHECK:STDOUT: %.Self.frozen.loc8_29: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc8_49: type = splice_block %Interface.type.loc8_49.2 [symbolic = %Interface.type.loc8_49.1 (constants.%Interface.type.fe8)] {
// CHECK:STDOUT: %.Self.frozen.loc8_36: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %Interface.ref: %Interface.type.1b1 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic]
// CHECK:STDOUT: %T.ref.loc8_42: type = name_ref T, %T.loc8_19.2 [symbolic = %T.loc8_19.1 (constants.%T.67d)]
// CHECK:STDOUT: %Interface.type.loc8_43.2: type = facet_type <@Interface, @Interface(constants.%T.67d)> [symbolic = %Interface.type.loc8_43.1 (constants.%Interface.type.fe8)]
// CHECK:STDOUT: %T.ref.loc8_48: type = name_ref T, %T.loc8_19.2 [symbolic = %T.loc8_19.1 (constants.%T.67d)]
// CHECK:STDOUT: %Interface.type.loc8_49.2: type = facet_type <@Interface, @Interface(constants.%T.67d)> [symbolic = %Interface.type.loc8_49.1 (constants.%Interface.type.fe8)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.loc8_29.2: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_29.1 (constants.%I.63c)]
// CHECK:STDOUT: %return.param: ref @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = out_param call_param0
// CHECK:STDOUT: %return: ref @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = return_slot %return.param
// CHECK:STDOUT: %I.loc8_36.2: @AccessGeneric.%Interface.type.loc8_49.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_36.1 (constants.%I.63c)]
// CHECK:STDOUT: %return.param: ref @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) = out_param call_param0
// CHECK:STDOUT: %return: ref @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %AccessConcrete.decl: %AccessConcrete.type = fn_decl @AccessConcrete [concrete = constants.%AccessConcrete] {
// CHECK:STDOUT: %I.patt.loc12_20.1: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc12_20.2 (constants.%I.patt.b65)]
// CHECK:STDOUT: %I.patt.loc12_28.1: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc12_28.2 (constants.%I.patt.b65)]
// CHECK:STDOUT: %return.param_patt: %pattern_type.f00 = out_param_pattern [concrete = constants.%return.param_patt.7dd]
// CHECK:STDOUT: %return.patt: %pattern_type.f00 = return_slot_pattern %return.param_patt, %ptr [concrete = constants.%return.patt.dbe]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %i32.loc12_42: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %ptr: type = ptr_type %i32.loc12_42 [concrete = constants.%ptr.d08]
// CHECK:STDOUT: %.loc12_45: Core.Form = init_form %ptr [concrete = constants.%.952]
// CHECK:STDOUT: %.loc12_36: type = splice_block %Interface.type [concrete = constants.%Interface.type.c5f] {
// CHECK:STDOUT: %i32.loc12_49: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %ptr: type = ptr_type %i32.loc12_49 [concrete = constants.%ptr.d08]
// CHECK:STDOUT: %.loc12_52: Core.Form = init_form %ptr [concrete = constants.%.952]
// CHECK:STDOUT: %.loc12_43: type = splice_block %Interface.type [concrete = constants.%Interface.type.c5f] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %Interface.ref: %Interface.type.1b1 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic]
// CHECK:STDOUT: %i32.loc12_33: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %i32.loc12_40: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [concrete = constants.%Interface.type.c5f]
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.loc12_20.2: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc12_20.1 (constants.%I.e05)]
// CHECK:STDOUT: %I.loc12_28.2: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc12_28.1 (constants.%I.e05)]
// CHECK:STDOUT: %return.param: ref %ptr.d08 = out_param call_param0
// CHECK:STDOUT: %return: ref %ptr.d08 = return_slot %return.param
// CHECK:STDOUT: }
@@ -206,10 +206,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(%T.loc4_22.1)> [symbolic = %Interface.type (constants.%Interface.type.fe8)]
// CHECK:STDOUT: %Self.loc4_31.2: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.45e)]
// CHECK:STDOUT: %Self.loc4_30.2: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_30.2 (constants.%Self.45e)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc4_31.1: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.45e)]
// CHECK:STDOUT: %Self.loc4_30.1: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_30.2 (constants.%Self.45e)]
// CHECK:STDOUT: %Interface.WithSelf.decl = interface_with_self_decl @Interface [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
@@ -218,7 +218,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc4_31.1
// CHECK:STDOUT: .Self = %Self.loc4_30.1
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .X = @X.%assoc0
@@ -230,30 +230,30 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @AccessGeneric(%T.loc8_19.2: type, %I.loc8_29.2: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.fe8)) {
// CHECK:STDOUT: generic fn @AccessGeneric(%T.loc8_19.2: type, %I.loc8_36.2: @AccessGeneric.%Interface.type.loc8_49.1 (%Interface.type.fe8)) {
// CHECK:STDOUT: %T.patt.loc8_19.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_19.2 (constants.%T.patt.d47)]
// CHECK:STDOUT: %T.loc8_19.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_19.1 (constants.%T.67d)]
// CHECK:STDOUT: %Interface.type.loc8_43.1: type = facet_type <@Interface, @Interface(%T.loc8_19.1)> [symbolic = %Interface.type.loc8_43.1 (constants.%Interface.type.fe8)]
// CHECK:STDOUT: %pattern_type.loc8_29: type = pattern_type %Interface.type.loc8_43.1 [symbolic = %pattern_type.loc8_29 (constants.%pattern_type.2c6f)]
// CHECK:STDOUT: %I.patt.loc8_29.2: @AccessGeneric.%pattern_type.loc8_29 (%pattern_type.2c6f) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_29.2 (constants.%I.patt.0cc)]
// CHECK:STDOUT: %I.loc8_29.1: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_29.1 (constants.%I.63c)]
// CHECK:STDOUT: %ptr.loc8_50.1: type = ptr_type %T.loc8_19.1 [symbolic = %ptr.loc8_50.1 (constants.%ptr.e8f)]
// CHECK:STDOUT: %.loc8_50.1: Core.Form = init_form %ptr.loc8_50.1 [symbolic = %.loc8_50.1 (constants.%.cb6)]
// CHECK:STDOUT: %pattern_type.loc8_50: type = pattern_type %ptr.loc8_50.1 [symbolic = %pattern_type.loc8_50 (constants.%pattern_type.4f4)]
// CHECK:STDOUT: %return.param_patt.loc8_50.2: @AccessGeneric.%pattern_type.loc8_50 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc8_50.2 (constants.%return.param_patt.27f)]
// CHECK:STDOUT: %return.patt.loc8_46.2: @AccessGeneric.%pattern_type.loc8_50 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc8_50.2, %ptr.loc8_50.1 [symbolic = %return.patt.loc8_46.2 (constants.%return.patt.d67)]
// CHECK:STDOUT: %Interface.type.loc8_49.1: type = facet_type <@Interface, @Interface(%T.loc8_19.1)> [symbolic = %Interface.type.loc8_49.1 (constants.%Interface.type.fe8)]
// CHECK:STDOUT: %pattern_type.loc8_36: type = pattern_type %Interface.type.loc8_49.1 [symbolic = %pattern_type.loc8_36 (constants.%pattern_type.2c6f)]
// CHECK:STDOUT: %I.patt.loc8_36.2: @AccessGeneric.%pattern_type.loc8_36 (%pattern_type.2c6f) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_36.2 (constants.%I.patt.0cc)]
// CHECK:STDOUT: %I.loc8_36.1: @AccessGeneric.%Interface.type.loc8_49.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_36.1 (constants.%I.63c)]
// CHECK:STDOUT: %ptr.loc8_56.1: type = ptr_type %T.loc8_19.1 [symbolic = %ptr.loc8_56.1 (constants.%ptr.e8f)]
// CHECK:STDOUT: %.loc8_56.1: Core.Form = init_form %ptr.loc8_56.1 [symbolic = %.loc8_56.1 (constants.%.cb6)]
// CHECK:STDOUT: %pattern_type.loc8_56: type = pattern_type %ptr.loc8_56.1 [symbolic = %pattern_type.loc8_56 (constants.%pattern_type.4f4)]
// CHECK:STDOUT: %return.param_patt.loc8_56.2: @AccessGeneric.%pattern_type.loc8_56 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc8_56.2 (constants.%return.param_patt.27f)]
// CHECK:STDOUT: %return.patt.loc8_52.2: @AccessGeneric.%pattern_type.loc8_56 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc8_56.2, %ptr.loc8_56.1 [symbolic = %return.patt.loc8_52.2 (constants.%return.patt.d67)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc8: <witness> = require_complete_type %ptr.loc8_50.1 [symbolic = %require_complete.loc8 (constants.%require_complete.ef1)]
// CHECK:STDOUT: %require_complete.loc9: <witness> = require_complete_type %Interface.type.loc8_43.1 [symbolic = %require_complete.loc9 (constants.%require_complete.08a)]
// CHECK:STDOUT: %I.as_type.loc9_11.2: type = facet_access_type %I.loc8_29.1 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.3c3)]
// CHECK:STDOUT: %require_complete.loc8: <witness> = require_complete_type %ptr.loc8_56.1 [symbolic = %require_complete.loc8 (constants.%require_complete.ef1)]
// CHECK:STDOUT: %require_complete.loc9: <witness> = require_complete_type %Interface.type.loc8_49.1 [symbolic = %require_complete.loc9 (constants.%require_complete.08a)]
// CHECK:STDOUT: %I.as_type.loc9_11.2: type = facet_access_type %I.loc8_36.1 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.3c3)]
// CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface, @Interface(%T.loc8_19.1) [symbolic = %Interface.assoc_type (constants.%Interface.assoc_type.61f)]
// CHECK:STDOUT: %assoc0: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.61f) = assoc_entity element0, @Interface.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0.199)]
// CHECK:STDOUT: %Interface.lookup_impl_witness: <witness> = lookup_impl_witness %I.loc8_29.1, @Interface, @Interface(%T.loc8_19.1) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.ffe)]
// CHECK:STDOUT: %impl.elem0.loc9_11.3: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.602)]
// CHECK:STDOUT: %Interface.lookup_impl_witness: <witness> = lookup_impl_witness %I.loc8_36.1, @Interface, @Interface(%T.loc8_19.1) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.ffe)]
// CHECK:STDOUT: %impl.elem0.loc9_11.3: @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.602)]
// CHECK:STDOUT: %.loc9_11.5: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc8_19.1) [symbolic = %.loc9_11.5 (constants.%.0e9)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc8_50.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)]
// CHECK:STDOUT: %Copy.facet.loc9_11.3: %Copy.type = facet_value %ptr.loc8_50.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc9_11.3 (constants.%Copy.facet.302)]
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc8_56.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)]
// CHECK:STDOUT: %Copy.facet.loc9_11.3: %Copy.type = facet_value %ptr.loc8_56.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc9_11.3 (constants.%Copy.facet.302)]
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc9_11.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)]
// CHECK:STDOUT: %.loc9_11.6: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc9_11.3 [symbolic = %.loc9_11.6 (constants.%.be5)]
// CHECK:STDOUT: %impl.elem0.loc9_11.4: @AccessGeneric.%.loc9_11.6 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.484)]
@@ -261,14 +261,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: <specific function> = specific_impl_function %impl.elem0.loc9_11.4, @Copy.WithSelf.Op(%Copy.facet.loc9_11.3) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.a76)]
// CHECK:STDOUT: %bound_method.loc9_11.4: <bound method> = bound_method %impl.elem0.loc9_11.3, %specific_impl_fn.loc9_11.2 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.060)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> out %return.param: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) {
// CHECK:STDOUT: fn() -> out %return.param: @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %I.ref: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.fe8) = name_ref I, %I.loc8_29.2 [symbolic = %I.loc8_29.1 (constants.%I.63c)]
// CHECK:STDOUT: %I.ref: @AccessGeneric.%Interface.type.loc8_49.1 (%Interface.type.fe8) = name_ref I, %I.loc8_36.2 [symbolic = %I.loc8_36.1 (constants.%I.63c)]
// CHECK:STDOUT: %I.as_type.loc9_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.3c3)]
// CHECK:STDOUT: %.loc9_11.1: type = converted %I.ref, %I.as_type.loc9_11.1 [symbolic = %I.as_type.loc9_11.2 (constants.%I.as_type.3c3)]
// CHECK:STDOUT: %.loc9_11.2: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.61f) = specific_constant @X.%assoc0, @Interface.WithSelf(constants.%T.67d, constants.%I.63c) [symbolic = %assoc0 (constants.%assoc0.199)]
// CHECK:STDOUT: %X.ref: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.61f) = name_ref X, %.loc9_11.2 [symbolic = %assoc0 (constants.%assoc0.199)]
// CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = impl_witness_access constants.%Interface.lookup_impl_witness.ffe, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.602)]
// CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) = impl_witness_access constants.%Interface.lookup_impl_witness.ffe, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.602)]
// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%.loc9_11.6 (%.be5) = impl_witness_access constants.%Copy.lookup_impl_witness.1da, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.484)]
// CHECK:STDOUT: %bound_method.loc9_11.1: <bound method> = bound_method %impl.elem0.loc9_11.1, %impl.elem0.loc9_11.2 [symbolic = %bound_method.loc9_11.3 (constants.%bound_method.602)]
// CHECK:STDOUT: %Copy.facet.loc9_11.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc9_11.3 (constants.%Copy.facet.302)]
@@ -277,27 +277,27 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: %.loc9_11.4: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc9_11.2 [symbolic = %Copy.facet.loc9_11.3 (constants.%Copy.facet.302)]
// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: <specific function> = specific_impl_function %impl.elem0.loc9_11.2, @Copy.WithSelf.Op(constants.%Copy.facet.302) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.a76)]
// CHECK:STDOUT: %bound_method.loc9_11.2: <bound method> = bound_method %impl.elem0.loc9_11.1, %specific_impl_fn.loc9_11.1 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.060)]
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = call %bound_method.loc9_11.2(%impl.elem0.loc9_11.1)
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessGeneric.%ptr.loc8_56.1 (%ptr.e8f) = call %bound_method.loc9_11.2(%impl.elem0.loc9_11.1)
// CHECK:STDOUT: return %Copy.WithSelf.Op.call
// CHECK:STDOUT:
// CHECK:STDOUT: !observes:
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @AccessConcrete(%I.loc12_20.2: %Interface.type.c5f) {
// CHECK:STDOUT: %I.patt.loc12_20.2: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc12_20.2 (constants.%I.patt.b65)]
// CHECK:STDOUT: %I.loc12_20.1: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc12_20.1 (constants.%I.e05)]
// CHECK:STDOUT: generic fn @AccessConcrete(%I.loc12_28.2: %Interface.type.c5f) {
// CHECK:STDOUT: %I.patt.loc12_28.2: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc12_28.2 (constants.%I.patt.b65)]
// CHECK:STDOUT: %I.loc12_28.1: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc12_28.1 (constants.%I.e05)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %I.as_type.loc13_11.2: type = facet_access_type %I.loc12_20.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.307)]
// CHECK:STDOUT: %Interface.lookup_impl_witness: <witness> = lookup_impl_witness %I.loc12_20.1, @Interface, @Interface(constants.%i32) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.64c)]
// CHECK:STDOUT: %I.as_type.loc13_11.2: type = facet_access_type %I.loc12_28.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.307)]
// CHECK:STDOUT: %Interface.lookup_impl_witness: <witness> = lookup_impl_witness %I.loc12_28.1, @Interface, @Interface(constants.%i32) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.64c)]
// CHECK:STDOUT: %impl.elem0.loc13_11.3: %ptr.d08 = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_11.3 (constants.%impl.elem0.3b7)]
// CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: <bound method> = bound_method %impl.elem0.loc13_11.3, constants.%ptr.as.Copy.impl.Op.d1c [symbolic = %ptr.as.Copy.impl.Op.bound (constants.%ptr.as.Copy.impl.Op.bound)]
// CHECK:STDOUT: %bound_method.loc13_11.3: <bound method> = bound_method %impl.elem0.loc13_11.3, constants.%ptr.as.Copy.impl.Op.specific_fn [symbolic = %bound_method.loc13_11.3 (constants.%bound_method.195)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> out %return.param: %ptr.d08 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %I.ref: %Interface.type.c5f = name_ref I, %I.loc12_20.2 [symbolic = %I.loc12_20.1 (constants.%I.e05)]
// CHECK:STDOUT: %I.ref: %Interface.type.c5f = name_ref I, %I.loc12_28.2 [symbolic = %I.loc12_28.1 (constants.%I.e05)]
// CHECK:STDOUT: %I.as_type.loc13_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.307)]
// CHECK:STDOUT: %.loc13_11.1: type = converted %I.ref, %I.as_type.loc13_11.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.307)]
// CHECK:STDOUT: %.loc13_11.2: %Interface.assoc_type.d6a = specific_constant @X.%assoc0, @Interface.WithSelf(constants.%i32, constants.%I.e05) [concrete = constants.%assoc0.80c]
@@ -320,7 +320,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Interface.type => constants.%Interface.type.fe8
// CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.45e
// CHECK:STDOUT: %Self.loc4_30.2 => constants.%Self.45e
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Interface.WithSelf(constants.%T.67d, constants.%Self.45e) {
@@ -334,15 +334,15 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: specific @AccessGeneric(constants.%T.67d, constants.%I.63c) {
// CHECK:STDOUT: %T.patt.loc8_19.2 => constants.%T.patt.d47
// CHECK:STDOUT: %T.loc8_19.1 => constants.%T.67d
// CHECK:STDOUT: %Interface.type.loc8_43.1 => constants.%Interface.type.fe8
// CHECK:STDOUT: %pattern_type.loc8_29 => constants.%pattern_type.2c6f
// CHECK:STDOUT: %I.patt.loc8_29.2 => constants.%I.patt.0cc
// CHECK:STDOUT: %I.loc8_29.1 => constants.%I.63c
// CHECK:STDOUT: %ptr.loc8_50.1 => constants.%ptr.e8f
// CHECK:STDOUT: %.loc8_50.1 => constants.%.cb6
// CHECK:STDOUT: %pattern_type.loc8_50 => constants.%pattern_type.4f4
// CHECK:STDOUT: %return.param_patt.loc8_50.2 => constants.%return.param_patt.27f
// CHECK:STDOUT: %return.patt.loc8_46.2 => constants.%return.patt.d67
// CHECK:STDOUT: %Interface.type.loc8_49.1 => constants.%Interface.type.fe8
// CHECK:STDOUT: %pattern_type.loc8_36 => constants.%pattern_type.2c6f
// CHECK:STDOUT: %I.patt.loc8_36.2 => constants.%I.patt.0cc
// CHECK:STDOUT: %I.loc8_36.1 => constants.%I.63c
// CHECK:STDOUT: %ptr.loc8_56.1 => constants.%ptr.e8f
// CHECK:STDOUT: %.loc8_56.1 => constants.%.cb6
// CHECK:STDOUT: %pattern_type.loc8_56 => constants.%pattern_type.4f4
// CHECK:STDOUT: %return.param_patt.loc8_56.2 => constants.%return.param_patt.27f
// CHECK:STDOUT: %return.patt.loc8_52.2 => constants.%return.patt.d67
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Interface.WithSelf(constants.%T.67d, constants.%I.63c) {
@@ -359,12 +359,12 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Interface.type => constants.%Interface.type.c5f
// CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.43d
// CHECK:STDOUT: %Self.loc4_30.2 => constants.%Self.43d
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @AccessConcrete(constants.%I.e05) {
// CHECK:STDOUT: %I.patt.loc12_20.2 => constants.%I.patt.b65
// CHECK:STDOUT: %I.loc12_20.1 => constants.%I.e05
// CHECK:STDOUT: %I.patt.loc12_28.2 => constants.%I.patt.b65
// CHECK:STDOUT: %I.loc12_28.1 => constants.%I.e05
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Interface.WithSelf(constants.%i32, constants.%Self.45e) {
@@ -451,49 +451,49 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: %Interface.decl: %Interface.type.1b1 = interface_decl @Interface [concrete = constants.%Interface.generic] {
// CHECK:STDOUT: %T.patt.loc4_22.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_22.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc4_25.1: type = splice_block %.loc4_25.2 [concrete = type] {
// CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc4_25.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc4_24.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc4_22.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_22.1 (constants.%T)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %AccessMissingGeneric.decl: %AccessMissingGeneric.type = fn_decl @AccessMissingGeneric [concrete = constants.%AccessMissingGeneric] {
// CHECK:STDOUT: %T.patt.loc8_26.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_26.2 (constants.%T.patt)]
// CHECK:STDOUT: %I.patt.loc8_36.1: @AccessMissingGeneric.%pattern_type.loc8_36 (%pattern_type.2c6) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_36.2 (constants.%I.patt.0cc)]
// CHECK:STDOUT: %return.param_patt.loc8_56.1: @AccessMissingGeneric.%pattern_type.loc8_56 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc8_56.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc8_53.1: @AccessMissingGeneric.%pattern_type.loc8_56 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc8_56.1, %T.ref.loc8_56 [symbolic = %return.patt.loc8_53.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: %I.patt.loc8_43.1: @AccessMissingGeneric.%pattern_type.loc8_43 (%pattern_type.2c6) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_43.2 (constants.%I.patt.0cc)]
// CHECK:STDOUT: %return.param_patt.loc8_62.1: @AccessMissingGeneric.%pattern_type.loc8_62 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc8_62.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc8_59.1: @AccessMissingGeneric.%pattern_type.loc8_62 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc8_62.1, %T.ref.loc8_62 [symbolic = %return.patt.loc8_59.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref.loc8_56: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)]
// CHECK:STDOUT: %.loc8_56.2: Core.Form = init_form %T.ref.loc8_56 [symbolic = %.loc8_56.1 (constants.%.184)]
// CHECK:STDOUT: %.loc8_29.1: type = splice_block %.loc8_29.2 [concrete = type] {
// CHECK:STDOUT: %T.ref.loc8_62: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)]
// CHECK:STDOUT: %.loc8_62.2: Core.Form = init_form %T.ref.loc8_62 [symbolic = %.loc8_62.1 (constants.%.184)]
// CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen.loc8_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc8_29.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc8_28.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_26.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_26.1 (constants.%T)]
// CHECK:STDOUT: %.loc8_50: type = splice_block %Interface.type.loc8_50.2 [symbolic = %Interface.type.loc8_50.1 (constants.%Interface.type.fe8)] {
// CHECK:STDOUT: %.Self.frozen.loc8_36: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc8_56: type = splice_block %Interface.type.loc8_56.2 [symbolic = %Interface.type.loc8_56.1 (constants.%Interface.type.fe8)] {
// CHECK:STDOUT: %.Self.frozen.loc8_43: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %Interface.ref: %Interface.type.1b1 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic]
// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)]
// CHECK:STDOUT: %Interface.type.loc8_50.2: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_50.1 (constants.%Interface.type.fe8)]
// CHECK:STDOUT: %T.ref.loc8_55: type = name_ref T, %T.loc8_26.2 [symbolic = %T.loc8_26.1 (constants.%T)]
// CHECK:STDOUT: %Interface.type.loc8_56.2: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_56.1 (constants.%Interface.type.fe8)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.loc8_36.2: @AccessMissingGeneric.%Interface.type.loc8_50.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_36.1 (constants.%I.63c)]
// CHECK:STDOUT: %I.loc8_43.2: @AccessMissingGeneric.%Interface.type.loc8_56.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_43.1 (constants.%I.63c)]
// CHECK:STDOUT: %return.param: ref @AccessMissingGeneric.%T.loc8_26.1 (%T) = out_param call_param0
// CHECK:STDOUT: %return: ref @AccessMissingGeneric.%T.loc8_26.1 (%T) = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %AccessMissingConcrete.decl: %AccessMissingConcrete.type = fn_decl @AccessMissingConcrete [concrete = constants.%AccessMissingConcrete] {
// CHECK:STDOUT: %I.patt.loc16_27.1: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc16_27.2 (constants.%I.patt.b65)]
// CHECK:STDOUT: %I.patt.loc16_35.1: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc16_35.2 (constants.%I.patt.b65)]
// CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a]
// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc16_49 [concrete = constants.%return.patt.e1b]
// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc16_56 [concrete = constants.%return.patt.e1b]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %i32.loc16_49: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %.loc16_49: Core.Form = init_form %i32.loc16_49 [concrete = constants.%.795]
// CHECK:STDOUT: %.loc16_43: type = splice_block %Interface.type [concrete = constants.%Interface.type.c5f] {
// CHECK:STDOUT: %i32.loc16_56: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %.loc16_56: Core.Form = init_form %i32.loc16_56 [concrete = constants.%.795]
// CHECK:STDOUT: %.loc16_50: type = splice_block %Interface.type [concrete = constants.%Interface.type.c5f] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %Interface.ref: %Interface.type.1b1 = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.generic]
// CHECK:STDOUT: %i32.loc16_40: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %i32.loc16_47: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [concrete = constants.%Interface.type.c5f]
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.loc16_27.2: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc16_27.1 (constants.%I.e05)]
// CHECK:STDOUT: %I.loc16_35.2: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc16_35.1 (constants.%I.e05)]
// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
// CHECK:STDOUT: }
@@ -505,10 +505,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(%T.loc4_22.1)> [symbolic = %Interface.type (constants.%Interface.type.fe8)]
// CHECK:STDOUT: %Self.loc4_31.2: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.45e)]
// CHECK:STDOUT: %Self.loc4_30.2: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_30.2 (constants.%Self.45e)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc4_31.1: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.45e)]
// CHECK:STDOUT: %Self.loc4_30.1: @Interface.%Interface.type (%Interface.type.fe8) = symbolic_binding Self, 1 [symbolic = %Self.loc4_30.2 (constants.%Self.45e)]
// CHECK:STDOUT: %Interface.WithSelf.decl = interface_with_self_decl @Interface [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
@@ -517,7 +517,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc4_31.1
// CHECK:STDOUT: .Self = %Self.loc4_30.1
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .X = @X.%assoc0
@@ -530,26 +530,26 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @AccessMissingGeneric(%T.loc8_26.2: type, %I.loc8_36.2: @AccessMissingGeneric.%Interface.type.loc8_50.1 (%Interface.type.fe8)) {
// CHECK:STDOUT: generic fn @AccessMissingGeneric(%T.loc8_26.2: type, %I.loc8_43.2: @AccessMissingGeneric.%Interface.type.loc8_56.1 (%Interface.type.fe8)) {
// CHECK:STDOUT: %T.patt.loc8_26.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_26.2 (constants.%T.patt)]
// CHECK:STDOUT: %T.loc8_26.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_26.1 (constants.%T)]
// CHECK:STDOUT: %Interface.type.loc8_50.1: type = facet_type <@Interface, @Interface(%T.loc8_26.1)> [symbolic = %Interface.type.loc8_50.1 (constants.%Interface.type.fe8)]
// CHECK:STDOUT: %pattern_type.loc8_36: type = pattern_type %Interface.type.loc8_50.1 [symbolic = %pattern_type.loc8_36 (constants.%pattern_type.2c6)]
// CHECK:STDOUT: %I.patt.loc8_36.2: @AccessMissingGeneric.%pattern_type.loc8_36 (%pattern_type.2c6) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_36.2 (constants.%I.patt.0cc)]
// CHECK:STDOUT: %I.loc8_36.1: @AccessMissingGeneric.%Interface.type.loc8_50.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_36.1 (constants.%I.63c)]
// CHECK:STDOUT: %.loc8_56.1: Core.Form = init_form %T.loc8_26.1 [symbolic = %.loc8_56.1 (constants.%.184)]
// CHECK:STDOUT: %pattern_type.loc8_56: type = pattern_type %T.loc8_26.1 [symbolic = %pattern_type.loc8_56 (constants.%pattern_type.51d)]
// CHECK:STDOUT: %return.param_patt.loc8_56.2: @AccessMissingGeneric.%pattern_type.loc8_56 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc8_56.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc8_53.2: @AccessMissingGeneric.%pattern_type.loc8_56 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc8_56.2, %T.loc8_26.1 [symbolic = %return.patt.loc8_53.2 (constants.%return.patt.b39)]
// CHECK:STDOUT: %Interface.type.loc8_56.1: type = facet_type <@Interface, @Interface(%T.loc8_26.1)> [symbolic = %Interface.type.loc8_56.1 (constants.%Interface.type.fe8)]
// CHECK:STDOUT: %pattern_type.loc8_43: type = pattern_type %Interface.type.loc8_56.1 [symbolic = %pattern_type.loc8_43 (constants.%pattern_type.2c6)]
// CHECK:STDOUT: %I.patt.loc8_43.2: @AccessMissingGeneric.%pattern_type.loc8_43 (%pattern_type.2c6) = symbolic_binding_pattern I, 1 [symbolic = %I.patt.loc8_43.2 (constants.%I.patt.0cc)]
// CHECK:STDOUT: %I.loc8_43.1: @AccessMissingGeneric.%Interface.type.loc8_56.1 (%Interface.type.fe8) = symbolic_binding I, 1 [symbolic = %I.loc8_43.1 (constants.%I.63c)]
// CHECK:STDOUT: %.loc8_62.1: Core.Form = init_form %T.loc8_26.1 [symbolic = %.loc8_62.1 (constants.%.184)]
// CHECK:STDOUT: %pattern_type.loc8_62: type = pattern_type %T.loc8_26.1 [symbolic = %pattern_type.loc8_62 (constants.%pattern_type.51d)]
// CHECK:STDOUT: %return.param_patt.loc8_62.2: @AccessMissingGeneric.%pattern_type.loc8_62 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc8_62.2 (constants.%return.param_patt.41d)]
// CHECK:STDOUT: %return.patt.loc8_59.2: @AccessMissingGeneric.%pattern_type.loc8_62 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc8_62.2, %T.loc8_26.1 [symbolic = %return.patt.loc8_59.2 (constants.%return.patt.b39)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %require_complete.loc8: <witness> = require_complete_type %T.loc8_26.1 [symbolic = %require_complete.loc8 (constants.%require_complete.944)]
// CHECK:STDOUT: %require_complete.loc13: <witness> = require_complete_type %Interface.type.loc8_50.1 [symbolic = %require_complete.loc13 (constants.%require_complete.08a)]
// CHECK:STDOUT: %I.as_type.loc13_11.2: type = facet_access_type %I.loc8_36.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.3c3)]
// CHECK:STDOUT: %require_complete.loc13: <witness> = require_complete_type %Interface.type.loc8_56.1 [symbolic = %require_complete.loc13 (constants.%require_complete.08a)]
// CHECK:STDOUT: %I.as_type.loc13_11.2: type = facet_access_type %I.loc8_43.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.3c3)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> out %return.param: @AccessMissingGeneric.%T.loc8_26.1 (%T) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %I.ref: @AccessMissingGeneric.%Interface.type.loc8_50.1 (%Interface.type.fe8) = name_ref I, %I.loc8_36.2 [symbolic = %I.loc8_36.1 (constants.%I.63c)]
// CHECK:STDOUT: %I.ref: @AccessMissingGeneric.%Interface.type.loc8_56.1 (%Interface.type.fe8) = name_ref I, %I.loc8_43.2 [symbolic = %I.loc8_43.1 (constants.%I.63c)]
// CHECK:STDOUT: %I.as_type.loc13_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.3c3)]
// CHECK:STDOUT: %.loc13: type = converted %I.ref, %I.as_type.loc13_11.1 [symbolic = %I.as_type.loc13_11.2 (constants.%I.as_type.3c3)]
// CHECK:STDOUT: %nonesuch.ref: <error> = name_ref nonesuch, <error> [concrete = <error>]
@@ -559,16 +559,16 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @AccessMissingConcrete(%I.loc16_27.2: %Interface.type.c5f) {
// CHECK:STDOUT: %I.patt.loc16_27.2: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc16_27.2 (constants.%I.patt.b65)]
// CHECK:STDOUT: %I.loc16_27.1: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc16_27.1 (constants.%I.e05)]
// CHECK:STDOUT: generic fn @AccessMissingConcrete(%I.loc16_35.2: %Interface.type.c5f) {
// CHECK:STDOUT: %I.patt.loc16_35.2: %pattern_type.3cf = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc16_35.2 (constants.%I.patt.b65)]
// CHECK:STDOUT: %I.loc16_35.1: %Interface.type.c5f = symbolic_binding I, 0 [symbolic = %I.loc16_35.1 (constants.%I.e05)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %I.as_type.loc21_11.2: type = facet_access_type %I.loc16_27.1 [symbolic = %I.as_type.loc21_11.2 (constants.%I.as_type.307)]
// CHECK:STDOUT: %I.as_type.loc21_11.2: type = facet_access_type %I.loc16_35.1 [symbolic = %I.as_type.loc21_11.2 (constants.%I.as_type.307)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> out %return.param: %i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %I.ref: %Interface.type.c5f = name_ref I, %I.loc16_27.2 [symbolic = %I.loc16_27.1 (constants.%I.e05)]
// CHECK:STDOUT: %I.ref: %Interface.type.c5f = name_ref I, %I.loc16_35.2 [symbolic = %I.loc16_35.1 (constants.%I.e05)]
// CHECK:STDOUT: %I.as_type.loc21_11.1: type = facet_access_type %I.ref [symbolic = %I.as_type.loc21_11.2 (constants.%I.as_type.307)]
// CHECK:STDOUT: %.loc21: type = converted %I.ref, %I.as_type.loc21_11.1 [symbolic = %I.as_type.loc21_11.2 (constants.%I.as_type.307)]
// CHECK:STDOUT: %nonesuch.ref: <error> = name_ref nonesuch, <error> [concrete = <error>]
@@ -584,7 +584,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Interface.type => constants.%Interface.type.fe8
// CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.45e
// CHECK:STDOUT: %Self.loc4_30.2 => constants.%Self.45e
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Interface.WithSelf(constants.%T, constants.%Self.45e) {
@@ -598,14 +598,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT: specific @AccessMissingGeneric(constants.%T, constants.%I.63c) {
// CHECK:STDOUT: %T.patt.loc8_26.2 => constants.%T.patt
// CHECK:STDOUT: %T.loc8_26.1 => constants.%T
// CHECK:STDOUT: %Interface.type.loc8_50.1 => constants.%Interface.type.fe8
// CHECK:STDOUT: %pattern_type.loc8_36 => constants.%pattern_type.2c6
// CHECK:STDOUT: %I.patt.loc8_36.2 => constants.%I.patt.0cc
// CHECK:STDOUT: %I.loc8_36.1 => constants.%I.63c
// CHECK:STDOUT: %.loc8_56.1 => constants.%.184
// CHECK:STDOUT: %pattern_type.loc8_56 => constants.%pattern_type.51d
// CHECK:STDOUT: %return.param_patt.loc8_56.2 => constants.%return.param_patt.41d
// CHECK:STDOUT: %return.patt.loc8_53.2 => constants.%return.patt.b39
// CHECK:STDOUT: %Interface.type.loc8_56.1 => constants.%Interface.type.fe8
// CHECK:STDOUT: %pattern_type.loc8_43 => constants.%pattern_type.2c6
// CHECK:STDOUT: %I.patt.loc8_43.2 => constants.%I.patt.0cc
// CHECK:STDOUT: %I.loc8_43.1 => constants.%I.63c
// CHECK:STDOUT: %.loc8_62.1 => constants.%.184
// CHECK:STDOUT: %pattern_type.loc8_62 => constants.%pattern_type.51d
// CHECK:STDOUT: %return.param_patt.loc8_62.2 => constants.%return.param_patt.41d
// CHECK:STDOUT: %return.patt.loc8_59.2 => constants.%return.patt.b39
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Interface.WithSelf(constants.%T, constants.%I.63c) {
@@ -622,12 +622,12 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Interface.type => constants.%Interface.type.c5f
// CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.43d
// CHECK:STDOUT: %Self.loc4_30.2 => constants.%Self.43d
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @AccessMissingConcrete(constants.%I.e05) {
// CHECK:STDOUT: %I.patt.loc16_27.2 => constants.%I.patt.b65
// CHECK:STDOUT: %I.loc16_27.1 => constants.%I.e05
// CHECK:STDOUT: %I.patt.loc16_35.2 => constants.%I.patt.b65
// CHECK:STDOUT: %I.loc16_35.1 => constants.%I.e05
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @Interface.WithSelf(constants.%i32, constants.%Self.45e) {
+40 -40
View File
@@ -19,9 +19,9 @@ interface I;
// `N.F` uses `N.I` and not `package.I`.
namespace N;
interface N.I {}
fn N.F(unused x:! I) {}
fn N.F(unused generic x: I) {}
fn TestCall(x:! N.I) {
fn TestCall(generic x: N.I) {
// `N.F` accepts an `N.I` not a `package.I`.
N.F(x);
}
@@ -34,7 +34,7 @@ interface I;
namespace N;
// Use `package.I` and poison `N.I`.
fn N.F(x:! I);
fn N.F(generic x: I);
// --- fail_declare_after_poison.carbon
@@ -44,10 +44,10 @@ interface I;
namespace N;
// Use `package.I` and poison `N.I`.
// CHECK:STDERR: fail_declare_after_poison.carbon:[[@LINE+3]]:12: error: name `I` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn N.F(x:! I);
// CHECK:STDERR: ^
fn N.F(x:! I);
// CHECK:STDERR: fail_declare_after_poison.carbon:[[@LINE+3]]:19: error: name `I` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn N.F(generic x: I);
// CHECK:STDERR: ^
fn N.F(generic x: I);
// Failure: N.I declared after it was poisoned.
// CHECK:STDERR: fail_declare_after_poison.carbon:[[@LINE+4]]:13: note: declared here [NameUseBeforeDeclNote]
@@ -64,13 +64,13 @@ interface I;
namespace N;
// Use `package.I` and poison `N.I`.
fn N.F1(x:! I);
fn N.F1(generic x: I);
// CHECK:STDERR: fail_use_poison.carbon:[[@LINE+4]]:13: error: member name `I` not found in `N` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: fn N.F2(x:! N.I);
// CHECK:STDERR: ^~~
// CHECK:STDERR: fail_use_poison.carbon:[[@LINE+4]]:20: error: member name `I` not found in `N` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: fn N.F2(generic x: N.I);
// CHECK:STDERR: ^~~
// CHECK:STDERR:
fn N.F2(x:! N.I);
fn N.F2(generic x: N.I);
// --- fail_use_declaration_after_poison.carbon
@@ -80,10 +80,10 @@ interface I;
namespace N;
// Use `package.I` and poison `N.I`.
// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+3]]:13: error: name `I` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn N.F1(x:! I);
// CHECK:STDERR: ^
fn N.F1(x:! I);
// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+3]]:20: error: name `I` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn N.F1(generic x: I);
// CHECK:STDERR: ^
fn N.F1(generic x: I);
// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+4]]:13: note: declared here [NameUseBeforeDeclNote]
// CHECK:STDERR: interface N.I;
@@ -91,11 +91,11 @@ fn N.F1(x:! I);
// CHECK:STDERR:
interface N.I;
// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+4]]:13: error: member name `I` not found in `N` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: fn N.F2(x:! N.I);
// CHECK:STDERR: ^~~
// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+4]]:20: error: member name `I` not found in `N` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: fn N.F2(generic x: N.I);
// CHECK:STDERR: ^~~
// CHECK:STDERR:
fn N.F2(x:! N.I);
fn N.F2(generic x: N.I);
// --- fail_alias.carbon
@@ -126,27 +126,27 @@ interface I2 {
// * `I2.I1`
// * `I2.I3.I1`
// * `I2.I3.I4.I1`
// CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+3]]:16: error: name `I1` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn F(x:! I1);
// CHECK:STDERR: ^~
fn F(x:! I1);
// CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+3]]:23: error: name `I1` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn F(generic x: I1);
// CHECK:STDERR: ^~
fn F(generic x: I1);
// CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+7]]:17: note: declared here [NameUseBeforeDeclNote]
// CHECK:STDERR: interface I1;
// CHECK:STDERR: ^~
// CHECK:STDERR:
// CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE-6]]:16: error: name `I1` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn F(x:! I1);
// CHECK:STDERR: ^~
// CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE-6]]:23: error: name `I1` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn F(generic x: I1);
// CHECK:STDERR: ^~
interface I1;
}
// CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+7]]:15: note: declared here [NameUseBeforeDeclNote]
// CHECK:STDERR: interface I1;
// CHECK:STDERR: ^~
// CHECK:STDERR:
// CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE-15]]:16: error: name `I1` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn F(x:! I1);
// CHECK:STDERR: ^~
// CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE-15]]:23: error: name `I1` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn F(generic x: I1);
// CHECK:STDERR: ^~
interface I1;
}
// CHECK:STDERR: fail_poison_multiple_scopes.carbon:[[@LINE+4]]:13: note: declared here [NameUseBeforeDeclNote]
@@ -177,23 +177,23 @@ library "[[@TEST_NAME]]";
namespace N;
// `package.I` and `N.I` poisoned when not found.
// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+7]]:12: error: name `I` not found [NameNotFound]
// CHECK:STDERR: fn N.F(x:! I);
// CHECK:STDERR: ^
// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+7]]:19: error: name `I` not found [NameNotFound]
// CHECK:STDERR: fn N.F(generic x: I);
// CHECK:STDERR: ^
// CHECK:STDERR:
// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+3]]:12: error: name `I` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn N.F(x:! I);
// CHECK:STDERR: ^
fn N.F(x:! I);
// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+3]]:19: error: name `I` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn N.F(generic x: I);
// CHECK:STDERR: ^
fn N.F(generic x: I);
// TODO: We should ideally only produce one diagnostic here.
// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+7]]:11: note: declared here [NameUseBeforeDeclNote]
// CHECK:STDERR: interface I;
// CHECK:STDERR: ^
// CHECK:STDERR:
// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE-7]]:12: error: name `I` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn N.F(x:! I);
// CHECK:STDERR: ^
// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE-7]]:19: error: name `I` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fn N.F(generic x: I);
// CHECK:STDERR: ^
interface I;
// CHECK:STDERR: fail_poison_when_lookup_fails.carbon:[[@LINE+4]]:13: note: declared here [NameUseBeforeDeclNote]
// CHECK:STDERR: interface N.I;
File diff suppressed because it is too large Load Diff
+43 -43
View File
@@ -23,9 +23,9 @@ interface Z {
}
//@dump-sem-ir-end
fn F(T:! Z, t:! T) {
fn F(generic T: Z, generic t: T) {
// TODO: We find the name `YY`, but then fail to do impl lookup for `Y` in
// `T:! Z` since the identified facet type doesn't include `Y`. The
// `T: Z` since the identified facet type doesn't include `Y`. The
// identified facet type needs to include extends inside interfaces?
// CHECK:STDERR: fail_todo_extend.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Y` in type `T` that does not implement that interface [MissingImplInMemberAccess]
@@ -49,7 +49,7 @@ fn F(T:! Z, t:! T) {
// --- fail_todo_extend_with_self.carbon
library "[[@TEST_NAME]]";
interface Y(T:! type) {
interface Y(T: type) {
fn YY();
}
@@ -59,9 +59,9 @@ interface Z {
}
//@dump-sem-ir-end
fn F(T:! Z) {
fn F(generic T: Z) {
// TODO: We find the name `YY`, but then fail to do impl lookup for `Y` in
// `T:! Z` since the identified facet type doesn't include `Y`. The
// `T: Z` since the identified facet type doesn't include `Y`. The
// identified facet type needs to include extends inside interfaces?
//
// CHECK:STDERR: fail_todo_extend_with_self.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Y(T)` in type `T` that does not implement that interface [MissingImplInMemberAccess]
@@ -89,7 +89,7 @@ interface Z {
}
//@dump-sem-ir-end
fn F(T:! Z) {
fn F(generic T: Z) {
// CHECK:STDERR: fail_todo_implicit_self_impls.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet]
// CHECK:STDERR: T.(Y.YY)();
// CHECK:STDERR: ^~~~~~~~
@@ -110,7 +110,7 @@ interface Z {
}
//@dump-sem-ir-end
fn F(T:! Z) {
fn F(generic T: Z) {
// CHECK:STDERR: fail_todo_explicit_self_impls.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet]
// CHECK:STDERR: T.(Y.YY)();
// CHECK:STDERR: ^~~~~~~~
@@ -129,7 +129,7 @@ interface Z {
require impls Y;
}
fn F(T:! Z) {
fn F(generic T: Z) {
// This should fail name lookup since Z does not extend Y.
//
// CHECK:STDERR: fail_implicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope]
@@ -150,7 +150,7 @@ interface Z {
require Self impls Y;
}
fn F(T:! Z) {
fn F(generic T: Z) {
// This should fail name lookup since Z does not extend Y.
//
// CHECK:STDERR: fail_explicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope]
@@ -165,7 +165,7 @@ library "[[@TEST_NAME]]";
interface Y {}
class C(T:! type);
class C(T: type);
//@dump-sem-ir-begin
interface Z {
@@ -180,13 +180,13 @@ interface Y {
fn YY();
}
class C(T:! type);
class C(T: type);
interface Z {
require C(Self) impls Y;
}
fn F(T:! Z) {
fn F(generic T: Z) {
// This fails because `T impls Z` implies that `C(T) impls Y`, not that
// `T impls Y`.
// CHECK:STDERR: fail_non_self_doesnt_provide_witness_for_self.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet]
@@ -203,13 +203,13 @@ interface Y {
fn YY();
}
class C(T:! type);
class C(T: type);
interface Z {
require C(Self) impls Y;
}
fn F(T:! Z) {
fn F(generic T: Z) {
// CHECK:STDERR: fail_todo_non_self_provide_witness_for_non_self.carbon:[[@LINE+4]]:3: error: cannot convert type `C(T)` into type implementing `Y` [ConversionFailureTypeToFacet]
// CHECK:STDERR: C(T).(Y.YY)();
// CHECK:STDERR: ^~~~~~~~~~~
@@ -220,7 +220,7 @@ fn F(T:! Z) {
// --- require_impls_where.carbon
library "[[@TEST_NAME]]";
interface Y { let Y1:! type; }
interface Y { let Y1: type; }
//@dump-sem-ir-begin
interface Z {
@@ -232,7 +232,7 @@ interface Z {
library "[[@TEST_NAME]]";
//@dump-sem-ir-begin
interface Z(T:! type) {
interface Z(T: type) {
require T impls Z(Self);
}
//@dump-sem-ir-end
@@ -241,10 +241,10 @@ interface Z(T:! type) {
library "[[@TEST_NAME]]";
interface Y {
let Y1:! type;
let Y1: type;
}
interface Z(T:! type) {
interface Z(T: type) {
// Either the type `T` or the facet type `Y` must mention `Self` in a way that
// it would appear in the type structure used for impl lookup (so inside a
// `where` does not count). But they don't.
@@ -259,9 +259,9 @@ interface Z(T:! type) {
// --- fail_require_impls_without_self_in_one_interface.carbon
library "[[@TEST_NAME]]";
interface Y(T:! type) {}
interface Y(T: type) {}
interface Z(T:! type) {
interface Z(T: type) {
// Self is in one interface but not the other.
//
// CHECK:STDERR: fail_require_impls_without_self_in_one_interface.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y({})` without a `Self` argument [RequireImplsMissingSelf]
@@ -274,9 +274,9 @@ interface Z(T:! type) {
// --- fail_require_impls_without_self_in_multiple_interfaces.carbon
library "[[@TEST_NAME]]";
interface Y(T:! type) {}
interface Y(T: type) {}
interface Z(T:! type) {
interface Z(T: type) {
// Self does not appear in either interface, we should get an error for each.
//
// CHECK:STDERR: fail_require_impls_without_self_in_multiple_interfaces.carbon:[[@LINE+8]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y(())` without a `Self` argument [RequireImplsMissingSelf]
@@ -293,7 +293,7 @@ interface Z(T:! type) {
// --- fail_self_impls_self.carbon
library "[[@TEST_NAME]]";
interface Z(T:! type) {
interface Z(T: type) {
// CHECK:STDERR: fail_self_impls_self.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType]
// CHECK:STDERR: require impls Self;
// CHECK:STDERR: ^~~~
@@ -304,9 +304,9 @@ interface Z(T:! type) {
// --- fail_impls_type.carbon
library "[[@TEST_NAME]]";
class C(T:! type) {}
class C(T: type) {}
interface Z(T:! type) {
interface Z(T: type) {
// CHECK:STDERR: fail_impls_type.carbon:[[@LINE+4]]:19: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType]
// CHECK:STDERR: require T impls C(Self);
// CHECK:STDERR: ^~~~~~~
@@ -319,7 +319,7 @@ library "[[@TEST_NAME]]";
interface Y {}
interface Z(T:! type) {
interface Z(T: type) {
// CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+7]]:11: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
// CHECK:STDERR: require 1 impls Y;
// CHECK:STDERR: ^
@@ -335,7 +335,7 @@ library "[[@TEST_NAME]]";
interface Y {}
interface Z(T:! type) {
interface Z(T: type) {
// CHECK:STDERR: fail_impls_non_type.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType]
// CHECK:STDERR: require impls 1;
// CHECK:STDERR: ^
@@ -347,7 +347,7 @@ interface Z(T:! type) {
library "[[@TEST_NAME]]";
interface Y {
let Y1:! type;
let Y1: type;
}
//@dump-sem-ir-begin
@@ -365,7 +365,7 @@ interface Y {
}
//@dump-sem-ir-begin
interface Z(T:! type) {
interface Z(T: type) {
// This is okay because an interface Z can be identified before it's complete,
// unlike a named constraint.
require impls Z(T);
@@ -783,9 +783,9 @@ interface Z(T:! type) {
// CHECK:STDOUT: %Z.decl: %Z.type.c39 = interface_decl @Z [concrete = constants.%Z.generic] {
// CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] {
// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)]
// CHECK:STDOUT: }
@@ -797,10 +797,10 @@ interface Z(T:! type) {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc4_14.1)> [symbolic = %Z.type (constants.%Z.type.924)]
// CHECK:STDOUT: %Self.loc4_23.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc4_22.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc4_23.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc4_22.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self)]
// CHECK:STDOUT: %Z.WithSelf.decl = interface_with_self_decl @Z [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
@@ -809,7 +809,7 @@ interface Z(T:! type) {
// CHECK:STDOUT: } {
// CHECK:STDOUT: %T.ref: type = name_ref T, @Z.%T.loc4_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
// CHECK:STDOUT: %.loc5_21: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.924) = specific_constant @Z.%Self.loc4_23.1, @Z(constants.%T) [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %.loc5_21: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.924) = specific_constant @Z.%Self.loc4_22.1, @Z(constants.%T) [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.ref: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.924) = name_ref Self, %.loc5_21 [symbolic = %Self (constants.%Self)]
// CHECK:STDOUT: %Self.as_type.loc5_25.1: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_25.2 (constants.%Self.as_type)]
// CHECK:STDOUT: %.loc5_25: type = converted %Self.ref, %Self.as_type.loc5_25.1 [symbolic = %Self.as_type.loc5_25.2 (constants.%Self.as_type)]
@@ -817,7 +817,7 @@ interface Z(T:! type) {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc4_23.1
// CHECK:STDOUT: .Self = %Self.loc4_22.1
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .Z = <poisoned>
// CHECK:STDOUT: .T = <poisoned>
@@ -833,7 +833,7 @@ interface Z(T:! type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic require @Z.WithSelf.T.impls.Z.type.require(@Z.%T.loc4_14.2: type, @Z.%Self.loc4_23.1: @Z.%Z.type (%Z.type.924)) {
// CHECK:STDOUT: generic require @Z.WithSelf.T.impls.Z.type.require(@Z.%T.loc4_14.2: type, @Z.%Self.loc4_22.1: @Z.%Z.type (%Z.type.924)) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Z.type.loc5_21: type = facet_type <@Z, @Z(%T)> [symbolic = %Z.type.loc5_21 (constants.%Z.type.924)]
// CHECK:STDOUT: %Self: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)]
@@ -960,9 +960,9 @@ interface Z(T:! type) {
// CHECK:STDOUT: %Z.decl: %Z.type.c39 = interface_decl @Z [concrete = constants.%Z.generic] {
// CHECK:STDOUT: %T.patt.loc8_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] {
// CHECK:STDOUT: %.loc8_16.1: type = splice_block %.loc8_16.2 [concrete = type] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: %.loc8_16.2: type = type_literal type [concrete = type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
// CHECK:STDOUT: }
@@ -974,24 +974,24 @@ interface Z(T:! type) {
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc8_14.1)> [symbolic = %Z.type (constants.%Z.type.924)]
// CHECK:STDOUT: %Self.loc8_23.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc8_23.2 (constants.%Self.21f)]
// CHECK:STDOUT: %Self.loc8_22.2: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc8_22.2 (constants.%Self.21f)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc8_23.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc8_23.2 (constants.%Self.21f)]
// CHECK:STDOUT: %Self.loc8_22.1: @Z.%Z.type (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self.loc8_22.2 (constants.%Self.21f)]
// CHECK:STDOUT: %Z.WithSelf.decl = interface_with_self_decl @Z [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !with Self:
// CHECK:STDOUT: %Z.WithSelf.Self.as_type.impls.Z.type.require.decl = require_decl @Z.WithSelf.Self.as_type.impls.Z.type.require [concrete] {
// CHECK:STDOUT: require %Self.as_type.loc11_11.1 impls %Z.type.loc11_20
// CHECK:STDOUT: } {
// CHECK:STDOUT: %Self.as_type.loc11_11.1: type = facet_access_type @Z.%Self.loc8_23.1 [symbolic = %Self.as_type.loc11_11.2 (constants.%Self.as_type.a0d)]
// CHECK:STDOUT: %Self.as_type.loc11_11.1: type = facet_access_type @Z.%Self.loc8_22.1 [symbolic = %Self.as_type.loc11_11.2 (constants.%Self.as_type.a0d)]
// CHECK:STDOUT: %Z.ref: %Z.type.c39 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic]
// CHECK:STDOUT: %T.ref: type = name_ref T, @Z.%T.loc8_14.2 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Z.type.loc11_20: type = facet_type <@Z, @Z(constants.%T)> [symbolic = %Z.type.loc11_11 (constants.%Z.type.924)]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc8_23.1
// CHECK:STDOUT: .Self = %Self.loc8_22.1
// CHECK:STDOUT: .Z = <poisoned>
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .Z = <poisoned>
@@ -1007,7 +1007,7 @@ interface Z(T:! type) {
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Z.type.require(@Z.%T.loc8_14.2: type, @Z.%Self.loc8_23.1: @Z.%Z.type (%Z.type.924)) {
// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Z.type.require(@Z.%T.loc8_14.2: type, @Z.%Self.loc8_22.1: @Z.%Z.type (%Z.type.924)) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %Z.type.loc11_11: type = facet_type <@Z, @Z(%T)> [symbolic = %Z.type.loc11_11 (constants.%Z.type.924)]
// CHECK:STDOUT: %Self: @Z.WithSelf.Self.as_type.impls.Z.type.require.%Z.type.loc11_11 (%Z.type.924) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.21f)]
+109 -109
View File
@@ -19,11 +19,11 @@ library "[[@TEST_NAME]]";
class C {}
alias D = C;
interface Foo(a:! C);
interface Foo(a:! C) {}
interface Foo(a: C);
interface Foo(a: C) {}
interface Bar(a:! D);
interface Bar(a:! D) {}
interface Bar(a: D);
interface Bar(a: D) {}
// --- spacing.carbon
@@ -31,8 +31,8 @@ library "[[@TEST_NAME]]";
class C {}
interface Foo [ ] ( a :! C );
interface Foo[](a:! C) {}
interface Foo [ ] ( a : C );
interface Foo[](a: C) {}
// --- fail_parens.carbon
@@ -40,15 +40,15 @@ library "[[@TEST_NAME]]";
class C {}
interface Foo(a:! C);
// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo(a:! (C)) {}
// CHECK:STDERR: ^
// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo(a:! C);
// CHECK:STDERR: ^
interface Foo(a: C);
// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:18: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo(a: (C)) {}
// CHECK:STDERR: ^
// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:18: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo(a: C);
// CHECK:STDERR: ^
// CHECK:STDERR:
interface Foo(a:! (C)) {}
interface Foo(a: (C)) {}
// --- fail_raw_identifier.carbon
@@ -56,15 +56,15 @@ library "[[@TEST_NAME]]";
class C {}
interface Foo(a:! C);
// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo(a:! r#C) {}
// CHECK:STDERR: ^~~
// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo(a:! C);
// CHECK:STDERR: ^
interface Foo(a: C);
// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+7]]:18: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo(a: r#C) {}
// CHECK:STDERR: ^~~
// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE-4]]:18: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo(a: C);
// CHECK:STDERR: ^
// CHECK:STDERR:
interface Foo(a:! r#C) {}
interface Foo(a: r#C) {}
// --- two_file.carbon
@@ -73,31 +73,31 @@ library "[[@TEST_NAME]]";
class C {}
alias D = C;
interface Foo(a:! C);
interface Bar(a:! D);
interface Foo(a: C);
interface Bar(a: D);
// --- fail_todo_two_file.impl.carbon
impl library "[[@TEST_NAME]]";
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:11: error: duplicate name `Foo` being declared in the same scope [NameDeclDuplicate]
// CHECK:STDERR: interface Foo(a:! C) {}
// CHECK:STDERR: interface Foo(a: C) {}
// CHECK:STDERR: ^~~
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-5]]:1: in import [InImport]
// CHECK:STDERR: two_file.carbon:7:1: note: name is previously declared here [NameDeclPrevious]
// CHECK:STDERR: interface Foo(a:! C);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: interface Foo(a: C);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
interface Foo(a:! C) {}
interface Foo(a: C) {}
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:11: error: duplicate name `Bar` being declared in the same scope [NameDeclDuplicate]
// CHECK:STDERR: interface Bar(a:! D) {}
// CHECK:STDERR: interface Bar(a: D) {}
// CHECK:STDERR: ^~~
// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-14]]:1: in import [InImport]
// CHECK:STDERR: two_file.carbon:8:1: note: name is previously declared here [NameDeclPrevious]
// CHECK:STDERR: interface Bar(a:! D);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: interface Bar(a: D);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
interface Bar(a:! D) {}
interface Bar(a: D) {}
// --- fail_name_mismatch.carbon
@@ -106,15 +106,15 @@ library "[[@TEST_NAME]]";
class C {}
alias D = C;
interface Foo(a:! C);
interface Foo(a: C);
// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:15: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
// CHECK:STDERR: interface Foo(b:! D) {}
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: interface Foo(b: D) {}
// CHECK:STDERR: ^~~~
// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:15: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
// CHECK:STDERR: interface Foo(a:! C);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: interface Foo(a: C);
// CHECK:STDERR: ^~~~
// CHECK:STDERR:
interface Foo(b:! D) {}
interface Foo(b: D) {}
// --- fail_alias.carbon
@@ -123,15 +123,15 @@ library "[[@TEST_NAME]]";
class C {}
alias D = C;
interface Foo(a:! C);
// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo(a:! D) {}
// CHECK:STDERR: ^
// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo(a:! C);
// CHECK:STDERR: ^
interface Foo(a: C);
// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:18: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo(a: D) {}
// CHECK:STDERR: ^
// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:18: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo(a: C);
// CHECK:STDERR: ^
// CHECK:STDERR:
interface Foo(a:! D) {}
interface Foo(a: D) {}
// --- fail_deduced_alias.carbon
@@ -140,15 +140,15 @@ library "[[@TEST_NAME]]";
class C {}
alias D = C;
interface Foo[a:! C]();
// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo[a:! D]() {}
// CHECK:STDERR: ^
// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo[a:! C]();
// CHECK:STDERR: ^
interface Foo[a: C]();
// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:18: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo[a: D]() {}
// CHECK:STDERR: ^
// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:18: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo[a: C]();
// CHECK:STDERR: ^
// CHECK:STDERR:
interface Foo[a:! D]() {}
interface Foo[a: D]() {}
// --- alias_two_file.carbon
@@ -156,7 +156,7 @@ library "[[@TEST_NAME]]";
class C {}
interface Foo(a:! C);
interface Foo(a: C);
// --- fail_alias_two_file.impl.carbon
@@ -168,14 +168,14 @@ alias D = C;
// fail due to `C` versus `D`, but may succeed if importing interfaces is fixed
// before syntax matching on imports is supported.
// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE+8]]:11: error: duplicate name `Foo` being declared in the same scope [NameDeclDuplicate]
// CHECK:STDERR: interface Foo(a:! D) {}
// CHECK:STDERR: interface Foo(a: D) {}
// CHECK:STDERR: ^~~
// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE-10]]:1: in import [InImport]
// CHECK:STDERR: alias_two_file.carbon:6:1: note: name is previously declared here [NameDeclPrevious]
// CHECK:STDERR: interface Foo(a:! C);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: interface Foo(a: C);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
interface Foo(a:! D) {}
interface Foo(a: D) {}
// --- fail_repeat_const.carbon
@@ -183,19 +183,19 @@ library "[[@TEST_NAME]]";
class C {}
interface Foo(a:! const C);
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:19: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst]
// CHECK:STDERR: interface Foo(a:! const (const C)) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~
interface Foo(a: const C);
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:18: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst]
// CHECK:STDERR: interface Foo(a: const (const C)) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:25: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo(a:! const (const C)) {}
// CHECK:STDERR: ^
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:25: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo(a:! const C);
// CHECK:STDERR: ^
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:24: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
// CHECK:STDERR: interface Foo(a: const (const C)) {}
// CHECK:STDERR: ^
// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:24: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
// CHECK:STDERR: interface Foo(a: const C);
// CHECK:STDERR: ^
// CHECK:STDERR:
interface Foo(a:! const (const C)) {}
interface Foo(a: const (const C)) {}
// CHECK:STDOUT: --- basic.carbon
// CHECK:STDOUT:
@@ -272,14 +272,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo, @Foo(%a.loc7_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)]
// CHECK:STDOUT: %Self.loc8_22.2: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc8_22.2 (constants.%Self.a95)]
// CHECK:STDOUT: %Self.loc8_21.2: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc8_21.2 (constants.%Self.a95)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc8_22.1: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc8_22.2 (constants.%Self.a95)]
// CHECK:STDOUT: %Self.loc8_21.1: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc8_21.2 (constants.%Self.a95)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc8_22.1
// CHECK:STDOUT: .Self = %Self.loc8_21.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -294,14 +294,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Bar.type: type = facet_type <@Bar, @Bar(%a.loc10_16.1)> [symbolic = %Bar.type (constants.%Bar.type.ab7)]
// CHECK:STDOUT: %Self.loc11_22.2: @Bar.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc11_22.2 (constants.%Self.a90)]
// CHECK:STDOUT: %Self.loc11_21.2: @Bar.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc11_21.2 (constants.%Self.a90)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc11_22.1: @Bar.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc11_22.2 (constants.%Self.a90)]
// CHECK:STDOUT: %Self.loc11_21.1: @Bar.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc11_21.2 (constants.%Self.a90)]
// CHECK:STDOUT: %Bar.WithSelf.decl = interface_with_self_decl @Bar [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc11_22.1
// CHECK:STDOUT: .Self = %Self.loc11_21.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -381,14 +381,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo, @Foo(%a.loc6_23.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)]
// CHECK:STDOUT: %Self.loc7_24.2: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc7_23.2: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc7_23.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc7_24.1: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc7_23.1: @Foo.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc7_23.2 (constants.%Self)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc7_24.1
// CHECK:STDOUT: .Self = %Self.loc7_23.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -470,14 +470,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc14, @Foo.loc14(%a.loc14_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)]
// CHECK:STDOUT: %Self.loc14_24.2: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc14_23.2: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc14_24.1: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc14_23.1: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc14 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc14_24.1
// CHECK:STDOUT: .Self = %Self.loc14_23.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -564,14 +564,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc14, @Foo.loc14(%a.loc14_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)]
// CHECK:STDOUT: %Self.loc14_24.2: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc14_23.2: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc14_24.1: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc14_23.1: @Foo.loc14.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc14_23.2 (constants.%Self)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc14 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc14_24.1
// CHECK:STDOUT: .Self = %Self.loc14_23.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -757,14 +757,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc12, @Foo.loc12(%a.loc12_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)]
// CHECK:STDOUT: %Self.loc12_22.2: @Foo.loc12.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc12_22.2 (constants.%Self.a95)]
// CHECK:STDOUT: %Self.loc12_21.2: @Foo.loc12.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc12_21.2 (constants.%Self.a95)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc12_22.1: @Foo.loc12.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc12_22.2 (constants.%Self.a95)]
// CHECK:STDOUT: %Self.loc12_21.1: @Foo.loc12.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc12_21.2 (constants.%Self.a95)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc12 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc12_22.1
// CHECK:STDOUT: .Self = %Self.loc12_21.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -786,14 +786,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Bar.type: type = facet_type <@Bar.loc21, @Bar.loc21(%a.loc21_16.1)> [symbolic = %Bar.type (constants.%Bar.type.ab7)]
// CHECK:STDOUT: %Self.loc21_22.2: @Bar.loc21.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc21_22.2 (constants.%Self.a90)]
// CHECK:STDOUT: %Self.loc21_21.2: @Bar.loc21.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc21_21.2 (constants.%Self.a90)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc21_22.1: @Bar.loc21.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc21_22.2 (constants.%Self.a90)]
// CHECK:STDOUT: %Self.loc21_21.1: @Bar.loc21.%Bar.type (%Bar.type.ab7) = symbolic_binding Self, 1 [symbolic = %Self.loc21_21.2 (constants.%Self.a90)]
// CHECK:STDOUT: %Bar.WithSelf.decl = interface_with_self_decl @Bar.loc21 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc21_22.1
// CHECK:STDOUT: .Self = %Self.loc21_21.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -896,14 +896,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc15, @Foo.loc15(%b.loc15_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)]
// CHECK:STDOUT: %Self.loc15_22.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc15_21.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_21.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc15_22.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc15_21.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_21.2 (constants.%Self)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc15 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc15_22.1
// CHECK:STDOUT: .Self = %Self.loc15_21.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -993,14 +993,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc15, @Foo.loc15(%a.loc15_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)]
// CHECK:STDOUT: %Self.loc15_22.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc15_21.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_21.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc15_22.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc15_21.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_21.2 (constants.%Self)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc15 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc15_22.1
// CHECK:STDOUT: .Self = %Self.loc15_21.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -1090,14 +1090,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc15, @Foo.loc15(%a.loc15_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)]
// CHECK:STDOUT: %Self.loc15_24.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_24.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc15_23.2: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc15_24.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_24.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc15_23.1: @Foo.loc15.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc15 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc15_24.1
// CHECK:STDOUT: .Self = %Self.loc15_23.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -1239,14 +1239,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc17, @Foo.loc17(%a.loc17_16.1)> [symbolic = %Foo.type (constants.%Foo.type.8ee)]
// CHECK:STDOUT: %Self.loc17_22.2: @Foo.loc17.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc17_22.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc17_21.2: @Foo.loc17.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc17_21.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc17_22.1: @Foo.loc17.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc17_22.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc17_21.1: @Foo.loc17.%Foo.type (%Foo.type.8ee) = symbolic_binding Self, 1 [symbolic = %Self.loc17_21.2 (constants.%Self)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc17 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc17_22.1
// CHECK:STDOUT: .Self = %Self.loc17_21.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -1313,11 +1313,11 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT: %Foo.decl.loc18: %Foo.type.bc6a25.2 = interface_decl @Foo.loc18 [concrete = constants.%Foo.generic.d3ea5a.2] {
// CHECK:STDOUT: %a.patt.loc18_16.1: %pattern_type = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_16.2 (constants.%a.patt)]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_19 [concrete = constants.%const] {
// CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_18 [concrete = constants.%const] {
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %const.loc18_26: type = const_type %C.ref [concrete = constants.%const]
// CHECK:STDOUT: %const.loc18_19: type = const_type %const.loc18_26 [concrete = constants.%const]
// CHECK:STDOUT: %const.loc18_25: type = const_type %C.ref [concrete = constants.%const]
// CHECK:STDOUT: %const.loc18_18: type = const_type %const.loc18_25 [concrete = constants.%const]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.loc18_16.2: %const = symbolic_binding a, 0 [symbolic = %a.loc18_16.1 (constants.%a)]
// CHECK:STDOUT: }
@@ -1336,14 +1336,14 @@ interface Foo(a:! const (const C)) {}
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %Foo.type: type = facet_type <@Foo.loc18, @Foo.loc18(%a.loc18_16.1)> [symbolic = %Foo.type (constants.%Foo.type.b25)]
// CHECK:STDOUT: %Self.loc18_36.2: @Foo.loc18.%Foo.type (%Foo.type.b25) = symbolic_binding Self, 1 [symbolic = %Self.loc18_36.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc18_35.2: @Foo.loc18.%Foo.type (%Foo.type.b25) = symbolic_binding Self, 1 [symbolic = %Self.loc18_35.2 (constants.%Self)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: %Self.loc18_36.1: @Foo.loc18.%Foo.type (%Foo.type.b25) = symbolic_binding Self, 1 [symbolic = %Self.loc18_36.2 (constants.%Self)]
// CHECK:STDOUT: %Self.loc18_35.1: @Foo.loc18.%Foo.type (%Foo.type.b25) = symbolic_binding Self, 1 [symbolic = %Self.loc18_35.2 (constants.%Self)]
// CHECK:STDOUT: %Foo.WithSelf.decl = interface_with_self_decl @Foo.loc18 [concrete]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self.loc18_36.1
// CHECK:STDOUT: .Self = %Self.loc18_35.1
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -19,8 +19,8 @@ interface I {
// TODO: An associated constant with an initializer without `default` in an
// interface should be rejected.
let T:! type = (i32, i32);
let N:! i32 = 42;
let T: type = (i32, i32);
let N: i32 = 42;
}
// CHECK:STDOUT: --- todo_define_not_default.carbon
@@ -122,21 +122,21 @@ interface I {
// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.WithSelf.G.decl [concrete = constants.%assoc1]
// CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.WithSelf.%T [concrete = constants.%assoc2]
// CHECK:STDOUT: %i32.loc22_19: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %i32.loc22_24: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %.loc22_27: %tuple.type.24b = tuple_literal (%i32.loc22_19, %i32.loc22_24) [concrete = constants.%tuple]
// CHECK:STDOUT: %.loc22_28: type = converted %.loc22_27, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55]
// CHECK:STDOUT: %i32.loc22_18: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %i32.loc22_23: type = type_literal constants.%i32 [concrete = constants.%i32]
// CHECK:STDOUT: %.loc22_26: %tuple.type.24b = tuple_literal (%i32.loc22_18, %i32.loc22_23) [concrete = constants.%tuple]
// CHECK:STDOUT: %.loc22_27: type = converted %.loc22_26, constants.%tuple.type.e55 [concrete = constants.%tuple.type.e55]
// CHECK:STDOUT: }
// CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] {
// CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.WithSelf.%N [concrete = constants.%assoc3]
// CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e]
// CHECK:STDOUT: %impl.elem0: %.1c5 = impl_witness_access constants.%ImplicitAs.impl_witness.a23, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.e39]
// CHECK:STDOUT: %bound_method.loc23_19.1: <bound method> = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %bound_method.loc23_18.1: <bound method> = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc23_19.2: <bound method> = bound_method %int_42, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc23_19.2(%int_42) [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %.loc23_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %.loc23_19.2: %i32 = converted %int_42, %.loc23_19.1 [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %bound_method.loc23_18.2: <bound method> = bound_method %int_42, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc23_18.2(%int_42) [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %.loc23_18.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: %.loc23_18.2: %i32 = converted %int_42, %.loc23_18.1 [concrete = constants.%int_42.ac4]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members: