mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
+22
-22
@@ -11,22 +11,22 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/generic/call_basic_depth.carbon
|
||||
|
||||
class C {
|
||||
fn Cfn[T:! type](unused self, unused x: T) {
|
||||
fn Cfn[T: type](unused self, unused x: T) {
|
||||
}
|
||||
}
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn F[T:! type](unused x: T) {
|
||||
fn F[T: type](unused x: T) {
|
||||
}
|
||||
//@dump-sem-ir-end
|
||||
|
||||
fn H[T:! type](x: T) {
|
||||
fn H[T: type](x: T) {
|
||||
//@dump-sem-ir-begin
|
||||
F(x);
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
fn G[T:! type](x: T) {
|
||||
fn G[T: type](x: T) {
|
||||
//@dump-sem-ir-begin
|
||||
H(x);
|
||||
F(x);
|
||||
@@ -87,12 +87,12 @@ fn M() {
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// 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: %x.param_patt.loc19_24.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_24.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc19_24.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc19_24.1 [symbolic = %x.patt.loc19_24.2 (constants.%x.patt.800c32.2)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc19_23.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_23.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc19_23.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc19_23.1 [symbolic = %x.patt.loc19_23.2 (constants.%x.patt.800c32.2)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc19_10.1: type = splice_block %.loc19_10.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc19_9.1: type = splice_block %.loc19_9.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_9.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: %x.param: @F.%T.loc19_7.1 (%T) = value_param call_param0
|
||||
@@ -105,8 +105,8 @@ fn M() {
|
||||
// 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: %pattern_type: type = pattern_type %T.loc19_7.1 [symbolic = %pattern_type (constants.%pattern_type.51d)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc19_24.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_24.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc19_24.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc19_24.2 [symbolic = %x.patt.loc19_24.2 (constants.%x.patt.800c32.2)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc19_23.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_23.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc19_23.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc19_23.2 [symbolic = %x.patt.loc19_23.2 (constants.%x.patt.800c32.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc19_7.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
@@ -185,8 +185,8 @@ fn M() {
|
||||
// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc19_7.1 => constants.%T
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
|
||||
// CHECK:STDOUT: %x.param_patt.loc19_24.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc19_24.2 => constants.%x.patt.800c32.1
|
||||
// CHECK:STDOUT: %x.param_patt.loc19_23.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc19_23.2 => constants.%x.patt.800c32.1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete
|
||||
@@ -196,8 +196,8 @@ fn M() {
|
||||
// CHECK:STDOUT: %T.patt.loc23_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc23_7.1 => constants.%T
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
|
||||
// CHECK:STDOUT: %x.param_patt.loc23_17.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc23_17.2 => constants.%x.patt.800c32.3
|
||||
// CHECK:STDOUT: %x.param_patt.loc23_16.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc23_16.2 => constants.%x.patt.800c32.3
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete
|
||||
@@ -208,16 +208,16 @@ fn M() {
|
||||
// CHECK:STDOUT: %T.patt.loc29_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc29_7.1 => constants.%T
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
|
||||
// CHECK:STDOUT: %x.param_patt.loc29_17.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc29_17.2 => constants.%x.patt.800c32.3
|
||||
// CHECK:STDOUT: %x.param_patt.loc29_16.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc29_16.2 => constants.%x.patt.800c32.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%C) {
|
||||
// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc19_7.1 => constants.%C
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b
|
||||
// CHECK:STDOUT: %x.param_patt.loc19_24.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc19_24.2 => constants.%x.patt.2ccf4d.1
|
||||
// CHECK:STDOUT: %x.param_patt.loc19_23.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc19_23.2 => constants.%x.patt.2ccf4d.1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type
|
||||
@@ -227,8 +227,8 @@ fn M() {
|
||||
// CHECK:STDOUT: %T.patt.loc29_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc29_7.1 => constants.%C
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b
|
||||
// CHECK:STDOUT: %x.param_patt.loc29_17.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc29_17.2 => constants.%x.patt.2ccf4d.2
|
||||
// CHECK:STDOUT: %x.param_patt.loc29_16.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc29_16.2 => constants.%x.patt.2ccf4d.2
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type
|
||||
@@ -241,8 +241,8 @@ fn M() {
|
||||
// CHECK:STDOUT: %T.patt.loc23_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc23_7.1 => constants.%C
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b
|
||||
// CHECK:STDOUT: %x.param_patt.loc23_17.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc23_17.2 => constants.%x.patt.2ccf4d.2
|
||||
// CHECK:STDOUT: %x.param_patt.loc23_16.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc23_16.2 => constants.%x.patt.2ccf4d.2
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type
|
||||
|
||||
+74
-74
@@ -18,7 +18,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
class B;
|
||||
|
||||
class A(T:! type) {
|
||||
class A(T: type) {
|
||||
var v: T;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
class B;
|
||||
|
||||
fn F(T:! type, v: T*) {
|
||||
fn F(generic T: type, v: T*) {
|
||||
*v;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
class B;
|
||||
|
||||
fn F(T:! type, p: T*) {
|
||||
fn F(generic T: type, p: T*) {
|
||||
let _: T = *p;
|
||||
}
|
||||
|
||||
@@ -132,9 +132,9 @@ fn G(p: B*) { F(B, p); }
|
||||
// CHECK:STDOUT: %A.decl: %A.type = class_decl @A [concrete = constants.%A.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc6_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_10.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc6_13.1: type = splice_block %.loc6_13.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc6_13.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc6_12.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc6_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_10.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -260,21 +260,21 @@ fn G(p: B*) { F(B, p); }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %B.decl.loc4: type = class_decl @B [concrete = constants.%B] {} {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %v.param_patt.loc6_17.1: @F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %v.param_patt.loc6_17.2 (constants.%v.param_patt.88d)]
|
||||
// CHECK:STDOUT: %v.patt.loc6_17.1: @F.%pattern_type (%pattern_type.4f4) = at_binding_pattern v, %v.param_patt.loc6_17.1 [symbolic = %v.patt.loc6_17.2 (constants.%v.patt.ddf)]
|
||||
// CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %v.param_patt.loc6_24.1: @F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %v.param_patt.loc6_24.2 (constants.%v.param_patt.88d)]
|
||||
// CHECK:STDOUT: %v.patt.loc6_24.1: @F.%pattern_type (%pattern_type.4f4) = at_binding_pattern v, %v.param_patt.loc6_24.1 [symbolic = %v.patt.loc6_24.2 (constants.%v.patt.ddf)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc6_17.1: type = splice_block %.loc6_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc6_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %v.param: @F.%ptr.loc6_20.1 (%ptr.e8f) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.2 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %ptr.loc6_20.2: type = ptr_type %T.ref [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %T.loc6_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %v.param: @F.%ptr.loc6_27.1 (%ptr.e8f) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc6_27: type = splice_block %ptr.loc6_27.2 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)] {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %ptr.loc6_27.2: type = ptr_type %T.ref [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v: @F.%ptr.loc6_20.1 (%ptr.e8f) = wrapper_binding v, %v.param
|
||||
// CHECK:STDOUT: %v: @F.%ptr.loc6_27.1 (%ptr.e8f) = wrapper_binding v, %v.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %p.param_patt: %pattern_type.3c8 = value_param_pattern [concrete = constants.%p.param_patt]
|
||||
@@ -298,21 +298,21 @@ fn G(p: B*) { F(B, p); }
|
||||
// CHECK:STDOUT: .Self = constants.%B
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T.loc6_7.1 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc6_20.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)]
|
||||
// CHECK:STDOUT: %v.param_patt.loc6_17.2: @F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %v.param_patt.loc6_17.2 (constants.%v.param_patt.88d)]
|
||||
// CHECK:STDOUT: %v.patt.loc6_17.2: @F.%pattern_type (%pattern_type.4f4) = at_binding_pattern v, %v.param_patt.loc6_17.2 [symbolic = %v.patt.loc6_17.2 (constants.%v.patt.ddf)]
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc6_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc6_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %ptr.loc6_27.1: type = ptr_type %T.loc6_15.1 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc6_27.1 [symbolic = %pattern_type (constants.%pattern_type.4f4)]
|
||||
// CHECK:STDOUT: %v.param_patt.loc6_24.2: @F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %v.param_patt.loc6_24.2 (constants.%v.param_patt.88d)]
|
||||
// CHECK:STDOUT: %v.patt.loc6_24.2: @F.%pattern_type (%pattern_type.4f4) = at_binding_pattern v, %v.param_patt.loc6_24.2 [symbolic = %v.patt.loc6_24.2 (constants.%v.patt.ddf)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc6_20.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc6_27.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%v.param: @F.%ptr.loc6_20.1 (%ptr.e8f)) {
|
||||
// CHECK:STDOUT: fn(%v.param: @F.%ptr.loc6_27.1 (%ptr.e8f)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %v.ref: @F.%ptr.loc6_20.1 (%ptr.e8f) = name_ref v, %v
|
||||
// CHECK:STDOUT: %.loc7: ref @F.%T.loc6_7.1 (%T) = deref %v.ref
|
||||
// CHECK:STDOUT: %v.ref: @F.%ptr.loc6_27.1 (%ptr.e8f) = name_ref v, %v
|
||||
// CHECK:STDOUT: %.loc7: ref @F.%T.loc6_15.1 (%T) = deref %v.ref
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
@@ -332,21 +332,21 @@ fn G(p: B*) { F(B, p); }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc6_7.1 => constants.%T
|
||||
// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc6_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %ptr.loc6_27.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4
|
||||
// CHECK:STDOUT: %v.param_patt.loc6_17.2 => constants.%v.param_patt.88d
|
||||
// CHECK:STDOUT: %v.patt.loc6_17.2 => constants.%v.patt.ddf
|
||||
// CHECK:STDOUT: %v.param_patt.loc6_24.2 => constants.%v.param_patt.88d
|
||||
// CHECK:STDOUT: %v.patt.loc6_24.2 => constants.%v.patt.ddf
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%B) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc6_7.1 => constants.%B
|
||||
// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.432
|
||||
// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc6_15.1 => constants.%B
|
||||
// CHECK:STDOUT: %ptr.loc6_27.1 => constants.%ptr.432
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.3c8
|
||||
// CHECK:STDOUT: %v.param_patt.loc6_17.2 => constants.%v.param_patt.8ec
|
||||
// CHECK:STDOUT: %v.patt.loc6_17.2 => constants.%v.patt.24a
|
||||
// CHECK:STDOUT: %v.param_patt.loc6_24.2 => constants.%v.param_patt.8ec
|
||||
// CHECK:STDOUT: %v.patt.loc6_24.2 => constants.%v.patt.24a
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.85b
|
||||
@@ -401,21 +401,21 @@ fn G(p: B*) { F(B, p); }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// 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.loc6_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %p.param_patt.loc6_17.1: @F.%pattern_type.loc6 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.a12)]
|
||||
// CHECK:STDOUT: %p.patt.loc6_17.1: @F.%pattern_type.loc6 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_17.1 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.14c)]
|
||||
// CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %p.param_patt.loc6_24.1: @F.%pattern_type.loc6 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_24.2 (constants.%p.param_patt.a12)]
|
||||
// CHECK:STDOUT: %p.patt.loc6_24.1: @F.%pattern_type.loc6 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_24.1 [symbolic = %p.patt.loc6_24.2 (constants.%p.patt.14c)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc6_17.1: type = splice_block %.loc6_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc6_10.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc6_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.1 (%ptr.e8f) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.2 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)] {
|
||||
// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %ptr.loc6_20.2: type = ptr_type %T.ref.loc6 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %T.loc6_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %p.param: @F.%ptr.loc6_27.1 (%ptr.e8f) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc6_27: type = splice_block %ptr.loc6_27.2 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)] {
|
||||
// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %ptr.loc6_27.2: type = ptr_type %T.ref.loc6 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %p: @F.%ptr.loc6_20.1 (%ptr.e8f) = wrapper_binding p, %p.param
|
||||
// CHECK:STDOUT: %p: @F.%ptr.loc6_27.1 (%ptr.e8f) = wrapper_binding p, %p.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %p.param_patt: %pattern_type.3c8 = value_param_pattern [concrete = constants.%p.param_patt.436]
|
||||
@@ -432,27 +432,27 @@ fn G(p: B*) { F(B, p); }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @B;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T.loc6_7.1 [symbolic = %ptr.loc6_20.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %ptr.loc6_20.1 [symbolic = %pattern_type.loc6 (constants.%pattern_type.4f4)]
|
||||
// CHECK:STDOUT: %p.param_patt.loc6_17.2: @F.%pattern_type.loc6 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_17.2 (constants.%p.param_patt.a12)]
|
||||
// CHECK:STDOUT: %p.patt.loc6_17.2: @F.%pattern_type.loc6 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_17.2 [symbolic = %p.patt.loc6_17.2 (constants.%p.patt.14c)]
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc6_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc6_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %ptr.loc6_27.1: type = ptr_type %T.loc6_15.1 [symbolic = %ptr.loc6_27.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %ptr.loc6_27.1 [symbolic = %pattern_type.loc6 (constants.%pattern_type.4f4)]
|
||||
// CHECK:STDOUT: %p.param_patt.loc6_24.2: @F.%pattern_type.loc6 (%pattern_type.4f4) = value_param_pattern [symbolic = %p.param_patt.loc6_24.2 (constants.%p.param_patt.a12)]
|
||||
// CHECK:STDOUT: %p.patt.loc6_24.2: @F.%pattern_type.loc6 (%pattern_type.4f4) = at_binding_pattern p, %p.param_patt.loc6_24.2 [symbolic = %p.patt.loc6_24.2 (constants.%p.patt.14c)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc6: <witness> = require_complete_type %ptr.loc6_20.1 [symbolic = %require_complete.loc6 (constants.%require_complete.ef1)]
|
||||
// CHECK:STDOUT: %require_complete.loc7: <witness> = require_complete_type %T.loc6_7.1 [symbolic = %require_complete.loc7 (constants.%require_complete.944)]
|
||||
// CHECK:STDOUT: %pattern_type.loc7: type = pattern_type %T.loc6_7.1 [symbolic = %pattern_type.loc7 (constants.%pattern_type.51d)]
|
||||
// CHECK:STDOUT: %require_complete.loc6: <witness> = require_complete_type %ptr.loc6_27.1 [symbolic = %require_complete.loc6 (constants.%require_complete.ef1)]
|
||||
// CHECK:STDOUT: %require_complete.loc7: <witness> = require_complete_type %T.loc6_15.1 [symbolic = %require_complete.loc7 (constants.%require_complete.944)]
|
||||
// CHECK:STDOUT: %pattern_type.loc7: type = pattern_type %T.loc6_15.1 [symbolic = %pattern_type.loc7 (constants.%pattern_type.51d)]
|
||||
// CHECK:STDOUT: %_.patt.loc7_8.2: @F.%pattern_type.loc7 (%pattern_type.51d) = value_binding_pattern _ [symbolic = %_.patt.loc7_8.2 (constants.%_.patt.ee9)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_20.1 (%ptr.e8f)) {
|
||||
// CHECK:STDOUT: fn(%p.param: @F.%ptr.loc6_27.1 (%ptr.e8f)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_20.1 (%ptr.e8f) = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc7_14.1: ref @F.%T.loc6_7.1 (%T) = deref %p.ref
|
||||
// CHECK:STDOUT: %.loc7_14.2: @F.%T.loc6_7.1 (%T) = acquire_value %.loc7_14.1
|
||||
// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %_: @F.%T.loc6_7.1 (%T) = wrapper_binding _, %.loc7_14.2
|
||||
// CHECK:STDOUT: %p.ref: @F.%ptr.loc6_27.1 (%ptr.e8f) = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc7_14.1: ref @F.%T.loc6_15.1 (%T) = deref %p.ref
|
||||
// CHECK:STDOUT: %.loc7_14.2: @F.%T.loc6_15.1 (%T) = acquire_value %.loc7_14.1
|
||||
// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %_: @F.%T.loc6_15.1 (%T) = wrapper_binding _, %.loc7_14.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc7_8.1: @F.%pattern_type.loc7 (%pattern_type.51d) = value_binding_pattern _ [symbolic = %_.patt.loc7_8.2 (constants.%_.patt.ee9)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -475,21 +475,21 @@ fn G(p: B*) { F(B, p); }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc6_7.1 => constants.%T
|
||||
// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc6_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %ptr.loc6_27.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %pattern_type.loc6 => constants.%pattern_type.4f4
|
||||
// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.a12
|
||||
// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.14c
|
||||
// CHECK:STDOUT: %p.param_patt.loc6_24.2 => constants.%p.param_patt.a12
|
||||
// CHECK:STDOUT: %p.patt.loc6_24.2 => constants.%p.patt.14c
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%B) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc6_7.1 => constants.%B
|
||||
// CHECK:STDOUT: %ptr.loc6_20.1 => constants.%ptr.432
|
||||
// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc6_15.1 => constants.%B
|
||||
// CHECK:STDOUT: %ptr.loc6_27.1 => constants.%ptr.432
|
||||
// CHECK:STDOUT: %pattern_type.loc6 => constants.%pattern_type.3c8
|
||||
// CHECK:STDOUT: %p.param_patt.loc6_17.2 => constants.%p.param_patt.436
|
||||
// CHECK:STDOUT: %p.patt.loc6_17.2 => constants.%p.patt.c38
|
||||
// CHECK:STDOUT: %p.param_patt.loc6_24.2 => constants.%p.param_patt.436
|
||||
// CHECK:STDOUT: %p.patt.loc6_24.2 => constants.%p.patt.c38
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc6 => constants.%complete_type
|
||||
|
||||
+6
-6
@@ -14,8 +14,8 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class Outer(T:! Core.Copy) {
|
||||
class Inner(U:! T) {
|
||||
class Outer(T: Core.Copy) {
|
||||
class Inner(U: T) {
|
||||
//@dump-sem-ir-begin
|
||||
fn Get() -> T { return U; }
|
||||
//@dump-sem-ir-end
|
||||
@@ -142,7 +142,7 @@ var n: i32 = Outer(i32).Inner(42).Get();
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_14.2: %Copy.type, %U.loc5_16.2: @Inner.%T.as_type.loc5_19.1 (%T.as_type)) {
|
||||
// CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_14.2: %Copy.type, %U.loc5_16.2: @Inner.%T.as_type.loc5_18.1 (%T.as_type)) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
@@ -172,7 +172,7 @@ var n: i32 = Outer(i32).Inner(42).Get();
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Inner.Get(@Outer.%T.loc4_14.2: %Copy.type, @Inner.%U.loc5_16.2: @Inner.%T.as_type.loc5_19.1 (%T.as_type)) {
|
||||
// CHECK:STDOUT: generic fn @Inner.Get(@Outer.%T.loc4_14.2: %Copy.type, @Inner.%U.loc5_16.2: @Inner.%T.as_type.loc5_18.1 (%T.as_type)) {
|
||||
// CHECK:STDOUT: %T: %Copy.type = symbolic_binding T, 0 [symbolic = %T (constants.%T.f84)]
|
||||
// CHECK:STDOUT: %T.as_type.loc7_17.1: type = facet_access_type %T [symbolic = %T.as_type.loc7_17.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc7_17.2: Core.Form = init_form %T.as_type.loc7_17.1 [symbolic = %.loc7_17.2 (constants.%.1ce700.2)]
|
||||
@@ -249,7 +249,7 @@ var n: i32 = Outer(i32).Inner(42).Get();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Inner(constants.%T.f84, constants.%U.7e5) {
|
||||
// CHECK:STDOUT: %T => constants.%T.f84
|
||||
// CHECK:STDOUT: %T.as_type.loc5_19.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %T.as_type.loc5_18.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2
|
||||
// CHECK:STDOUT: %U.patt.loc5_16.2 => constants.%U.patt.ed4
|
||||
// CHECK:STDOUT: %U.loc5_16.1 => constants.%U.7e5
|
||||
@@ -279,7 +279,7 @@ var n: i32 = Outer(i32).Inner(42).Get();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Inner(constants.%Copy.facet.987, constants.%int_42.ac4) {
|
||||
// CHECK:STDOUT: %T => constants.%Copy.facet.987
|
||||
// CHECK:STDOUT: %T.as_type.loc5_19.1 => constants.%i32
|
||||
// CHECK:STDOUT: %T.as_type.loc5_18.1 => constants.%i32
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6
|
||||
// CHECK:STDOUT: %U.patt.loc5_16.2 => constants.%U.patt.a76
|
||||
// CHECK:STDOUT: %U.loc5_16.1 => constants.%int_42.ac4
|
||||
|
||||
+135
-135
@@ -14,33 +14,33 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface A(AA:! type) { let X:! type; }
|
||||
interface A(AA: type) { let X: type; }
|
||||
|
||||
class C(CC:! type) {
|
||||
class C(CC: type) {
|
||||
//@dump-sem-ir-begin
|
||||
// The `.Self` bind_symbolic_name here should have a
|
||||
// symbolic constant value, not symbolic_self, because
|
||||
// its type depends on `CC`.
|
||||
fn F(unused T:! A(CC) where .X = CC) {}
|
||||
fn F(unused generic T: A(CC) where .X = CC) {}
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
class D(DD:! type) {
|
||||
fn G(T:! type) {
|
||||
class D(DD: type) {
|
||||
fn G(generic T: type) {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_dot_self_symbolic_type.carbon:[[@LINE+7]]:5: error: cannot convert type `T` into type implementing `A(DD) where .(A(DD).X) = DD` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: C(DD).F(T);
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: fail_dot_self_symbolic_type.carbon:[[@LINE-10]]:3: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn F(unused T:! A(CC) where .X = CC) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn F(unused generic T: A(CC) where .X = CC) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
C(DD).F(T);
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
}
|
||||
|
||||
fn H(T:! type) {
|
||||
fn H(generic T: type) {
|
||||
D({}).G(T);
|
||||
}
|
||||
|
||||
@@ -48,18 +48,18 @@ fn H(T:! type) {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface A(AA:! type) { let X:! type; }
|
||||
interface A(AA: type) { let X: type; }
|
||||
|
||||
interface B(AA:! type) {}
|
||||
interface B(AA: type) {}
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
impl forall [AA:! type, BB:! A(AA) where .X = ()] BB as B(AA*) {}
|
||||
impl forall [AA: type, BB: A(AA) where .X = ()] BB as B(AA*) {}
|
||||
//@dump-sem-ir-end
|
||||
|
||||
impl forall [AA:! type, BB:! type] BB as B(AA) {}
|
||||
impl forall [AA: type, BB: type] BB as B(AA) {}
|
||||
|
||||
class D(DD:! type) {
|
||||
fn G(T:! type) {
|
||||
class D(DD: type) {
|
||||
fn G(generic T: type) {
|
||||
// TODO: This produces a `lookup_impl_witness` instruction looking
|
||||
// for `.Self` as `A(DD)` in the generic eval block for `G`. That
|
||||
// is from an impl we ended up not using, so shouldn't be included
|
||||
@@ -70,7 +70,7 @@ class D(DD:! type) {
|
||||
}
|
||||
}
|
||||
|
||||
fn H(T:! type) {
|
||||
fn H(generic T: type) {
|
||||
D({}).G(T);
|
||||
}
|
||||
|
||||
@@ -134,31 +134,31 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %C.F.decl: @C.%C.F.type (%C.F.type.55fb78.1) = fn_decl @C.F [symbolic = @C.%C.F (constants.%C.F.6da92d.1)] {
|
||||
// CHECK:STDOUT: %T.patt.loc11_16.1: @C.F.%pattern_type (%pattern_type.b1a) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc11_16.2 (constants.%T.patt.0e4)]
|
||||
// CHECK:STDOUT: %T.patt.loc11_24.1: @C.F.%pattern_type (%pattern_type.b1a) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc11_24.2 (constants.%T.patt.0e4)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_25.1: type = splice_block %.loc11_25.2 [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc11_32.1: type = splice_block %.loc11_32.2 [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic]
|
||||
// CHECK:STDOUT: %CC.ref.loc11_21: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)]
|
||||
// CHECK:STDOUT: %A.type.loc11_23.2: type = facet_type <@A, @A(constants.%CC)> [symbolic = %A.type.loc11_23.1 (constants.%A.type.acd3aa.2)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_25.2: @C.F.%A.type.loc11_23.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_25.1 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc11_23.2 [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref: @C.F.%A.type.loc11_23.1 (%A.type.acd3aa.2) = name_ref .Self, %.Self.frozen.loc11_25.2 [symbolic = %.Self.frozen.loc11_25.1 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %CC.ref.loc11_28: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)]
|
||||
// CHECK:STDOUT: %A.type.loc11_30.2: type = facet_type <@A, @A(constants.%CC)> [symbolic = %A.type.loc11_30.1 (constants.%A.type.acd3aa.2)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_32.2: @C.F.%A.type.loc11_30.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_32.1 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc11_30.2 [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref: @C.F.%A.type.loc11_30.1 (%A.type.acd3aa.2) = name_ref .Self, %.Self.frozen.loc11_32.2 [symbolic = %.Self.frozen.loc11_32.1 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %.loc11_31.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %.loc11_31.2: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = specific_constant @X.%assoc0, @A.WithSelf(constants.%CC, constants.%.Self.frozen.14f) [symbolic = %assoc0 (constants.%assoc0.e0998a.2)]
|
||||
// CHECK:STDOUT: %X.ref: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = name_ref X, %.loc11_31.2 [symbolic = %assoc0 (constants.%assoc0.e0998a.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_31.3: type = impl_witness_access constants.%A.lookup_impl_witness.8d4, element0 [symbolic = %impl.elem0.loc11_31.1 (constants.%impl.elem0.796)]
|
||||
// CHECK:STDOUT: %CC.ref.loc11_36: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)]
|
||||
// CHECK:STDOUT: %rewrite.loc11_34.1 = requirement_rewrite %impl.elem0.loc11_31.3, %CC.ref.loc11_36 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_31.4: type = impl_witness_access constants.%A.lookup_impl_witness.b03c54.1, element0 [symbolic = %impl.elem0.loc11_31.2 (constants.%impl.elem0.14e5d2.1)]
|
||||
// CHECK:STDOUT: %rewrite.loc11_34.2 = requirement_rewrite %impl.elem0.loc11_31.4, %CC.ref.loc11_36 [concrete]
|
||||
// CHECK:STDOUT: %.loc11_25.2: type = where_expr [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] {
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc11_23.2 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc11_34.2 = requirement_rewrite %impl.elem0.loc11_31.4, %CC.ref.loc11_36 [concrete]
|
||||
// CHECK:STDOUT: %.loc11_38.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %.loc11_38.2: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = specific_constant @X.%assoc0, @A.WithSelf(constants.%CC, constants.%.Self.frozen.14f) [symbolic = %assoc0 (constants.%assoc0.e0998a.2)]
|
||||
// CHECK:STDOUT: %X.ref: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = name_ref X, %.loc11_38.2 [symbolic = %assoc0 (constants.%assoc0.e0998a.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_38.3: type = impl_witness_access constants.%A.lookup_impl_witness.8d4, element0 [symbolic = %impl.elem0.loc11_38.1 (constants.%impl.elem0.796)]
|
||||
// CHECK:STDOUT: %CC.ref.loc11_43: type = name_ref CC, @C.%CC.loc6_11.2 [symbolic = %CC (constants.%CC)]
|
||||
// CHECK:STDOUT: %rewrite.loc11_41.1 = requirement_rewrite %impl.elem0.loc11_38.3, %CC.ref.loc11_43 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_38.4: type = impl_witness_access constants.%A.lookup_impl_witness.b03c54.1, element0 [symbolic = %impl.elem0.loc11_38.2 (constants.%impl.elem0.14e5d2.1)]
|
||||
// CHECK:STDOUT: %rewrite.loc11_41.2 = requirement_rewrite %impl.elem0.loc11_38.4, %CC.ref.loc11_43 [concrete]
|
||||
// CHECK:STDOUT: %.loc11_32.2: type = where_expr [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)] {
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc11_30.2 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc11_41.2 = requirement_rewrite %impl.elem0.loc11_38.4, %CC.ref.loc11_43 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc11_16.2: @C.F.%A_where.type (%A_where.type.da43f4.1) = symbolic_binding T, 1 [symbolic = %T.loc11_16.1 (constants.%T.422)]
|
||||
// CHECK:STDOUT: %T.loc11_24.2: @C.F.%A_where.type (%A_where.type.da43f4.1) = symbolic_binding T, 1 [symbolic = %T.loc11_24.1 (constants.%T.422)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
@@ -189,23 +189,23 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @C.F(@C.%CC.loc6_11.2: type, %T.loc11_16.2: @C.F.%A_where.type (%A_where.type.da43f4.1)) {
|
||||
// CHECK:STDOUT: generic fn @C.F(@C.%CC.loc6_11.2: type, %T.loc11_24.2: @C.F.%A_where.type (%A_where.type.da43f4.1)) {
|
||||
// CHECK:STDOUT: %CC: type = symbolic_binding CC, 0 [symbolic = %CC (constants.%CC)]
|
||||
// CHECK:STDOUT: %A.type.loc11_23.1: type = facet_type <@A, @A(%CC)> [symbolic = %A.type.loc11_23.1 (constants.%A.type.acd3aa.2)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_25.1: @C.F.%A.type.loc11_23.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_25.1 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %A.type.loc11_23.1 [symbolic = %require_complete (constants.%require_complete.21f)]
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc11_25.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %A.type.loc11_30.1: type = facet_type <@A, @A(%CC)> [symbolic = %A.type.loc11_30.1 (constants.%A.type.acd3aa.2)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_32.1: @C.F.%A.type.loc11_30.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_32.1 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %A.type.loc11_30.1 [symbolic = %require_complete (constants.%require_complete.21f)]
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc11_32.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%CC) [symbolic = %A.assoc_type (constants.%A.assoc_type.447662.2)]
|
||||
// CHECK:STDOUT: %assoc0: @C.F.%A.assoc_type (%A.assoc_type.447662.2) = assoc_entity element0, @A.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0.e0998a.2)]
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc11_31.1: <witness> = lookup_impl_witness %.Self.frozen.loc11_25.1, @A, @A(%CC) [symbolic = %A.lookup_impl_witness.loc11_31.1 (constants.%A.lookup_impl_witness.8d4)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_31.1: type = impl_witness_access %A.lookup_impl_witness.loc11_31.1, element0 [symbolic = %impl.elem0.loc11_31.1 (constants.%impl.elem0.796)]
|
||||
// CHECK:STDOUT: %.Self: @C.F.%A.type.loc11_23.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.a16688.1)]
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc11_31.2: <witness> = lookup_impl_witness %.Self, @A, @A(%CC) [symbolic = %A.lookup_impl_witness.loc11_31.2 (constants.%A.lookup_impl_witness.b03c54.1)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_31.2: type = impl_witness_access %A.lookup_impl_witness.loc11_31.2, element0 [symbolic = %impl.elem0.loc11_31.2 (constants.%impl.elem0.14e5d2.1)]
|
||||
// CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%CC) where %impl.elem0.loc11_31.2 = %CC> [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)]
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc11_38.1: <witness> = lookup_impl_witness %.Self.frozen.loc11_32.1, @A, @A(%CC) [symbolic = %A.lookup_impl_witness.loc11_38.1 (constants.%A.lookup_impl_witness.8d4)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_38.1: type = impl_witness_access %A.lookup_impl_witness.loc11_38.1, element0 [symbolic = %impl.elem0.loc11_38.1 (constants.%impl.elem0.796)]
|
||||
// CHECK:STDOUT: %.Self: @C.F.%A.type.loc11_30.1 (%A.type.acd3aa.2) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.a16688.1)]
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc11_38.2: <witness> = lookup_impl_witness %.Self, @A, @A(%CC) [symbolic = %A.lookup_impl_witness.loc11_38.2 (constants.%A.lookup_impl_witness.b03c54.1)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_38.2: type = impl_witness_access %A.lookup_impl_witness.loc11_38.2, element0 [symbolic = %impl.elem0.loc11_38.2 (constants.%impl.elem0.14e5d2.1)]
|
||||
// CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%CC) where %impl.elem0.loc11_38.2 = %CC> [symbolic = %A_where.type (constants.%A_where.type.da43f4.1)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %A_where.type [symbolic = %pattern_type (constants.%pattern_type.b1a)]
|
||||
// CHECK:STDOUT: %T.patt.loc11_16.2: @C.F.%pattern_type (%pattern_type.b1a) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc11_16.2 (constants.%T.patt.0e4)]
|
||||
// CHECK:STDOUT: %T.loc11_16.1: @C.F.%A_where.type (%A_where.type.da43f4.1) = symbolic_binding T, 1 [symbolic = %T.loc11_16.1 (constants.%T.422)]
|
||||
// CHECK:STDOUT: %T.patt.loc11_24.2: @C.F.%pattern_type (%pattern_type.b1a) = symbolic_binding_pattern T, 1 [symbolic = %T.patt.loc11_24.2 (constants.%T.patt.0e4)]
|
||||
// CHECK:STDOUT: %T.loc11_24.1: @C.F.%A_where.type (%A_where.type.da43f4.1) = symbolic_binding T, 1 [symbolic = %T.loc11_24.1 (constants.%T.422)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
@@ -217,7 +217,7 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @D.G(@D.%DD.loc15_11.2: type, %T.loc16_9.2: type) {
|
||||
// CHECK:STDOUT: generic fn @D.G(@D.%DD.loc15_11.2: type, %T.loc16_17.2: type) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
@@ -234,7 +234,7 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: %C.loc25_9.1: type = class_type @C, @C(constants.%DD) [symbolic = %C.loc25_9.2 (constants.%C.1d0e8a.2)]
|
||||
// CHECK:STDOUT: %.loc25: @D.G.%C.F.type (%C.F.type.55fb78.2) = specific_constant @C.%C.F.decl, @C(constants.%DD) [symbolic = %C.F (constants.%C.F.6da92d.2)]
|
||||
// CHECK:STDOUT: %F.ref: @D.G.%C.F.type (%C.F.type.55fb78.2) = name_ref F, %.loc25 [symbolic = %C.F (constants.%C.F.6da92d.2)]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc16_9.2 [symbolic = %T.loc16_9.1 (constants.%T.091)]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc16_17.2 [symbolic = %T.loc16_17.1 (constants.%T.091)]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
@@ -252,21 +252,21 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C.F(constants.%CC, constants.%T.422) {
|
||||
// CHECK:STDOUT: %CC => constants.%CC
|
||||
// CHECK:STDOUT: %A.type.loc11_23.1 => constants.%A.type.acd3aa.2
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_25.1 => constants.%.Self.frozen.14f
|
||||
// CHECK:STDOUT: %A.type.loc11_30.1 => constants.%A.type.acd3aa.2
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_32.1 => constants.%.Self.frozen.14f
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete.21f
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type
|
||||
// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.447662.2
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.e0998a.2
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc11_31.1 => constants.%A.lookup_impl_witness.8d4
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_31.1 => constants.%impl.elem0.796
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc11_38.1 => constants.%A.lookup_impl_witness.8d4
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_38.1 => constants.%impl.elem0.796
|
||||
// CHECK:STDOUT: %.Self => constants.%.Self.a16688.1
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc11_31.2 => constants.%A.lookup_impl_witness.b03c54.1
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_31.2 => constants.%impl.elem0.14e5d2.1
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc11_38.2 => constants.%A.lookup_impl_witness.b03c54.1
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_38.2 => constants.%impl.elem0.14e5d2.1
|
||||
// CHECK:STDOUT: %A_where.type => constants.%A_where.type.da43f4.1
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b1a
|
||||
// CHECK:STDOUT: %T.patt.loc11_16.2 => constants.%T.patt.0e4
|
||||
// CHECK:STDOUT: %T.loc11_16.1 => constants.%T.422
|
||||
// CHECK:STDOUT: %T.patt.loc11_24.2 => constants.%T.patt.0e4
|
||||
// CHECK:STDOUT: %T.loc11_24.1 => constants.%T.422
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @D(constants.%DD) {
|
||||
@@ -279,8 +279,8 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @D.G(constants.%DD, constants.%T.091) {
|
||||
// CHECK:STDOUT: %T.patt.loc16_9.2 => constants.%T.patt.014
|
||||
// CHECK:STDOUT: %T.loc16_9.1 => constants.%T.091
|
||||
// CHECK:STDOUT: %T.patt.loc16_17.2 => constants.%T.patt.014
|
||||
// CHECK:STDOUT: %T.loc16_17.1 => constants.%T.091
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%DD) {
|
||||
@@ -302,8 +302,8 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @D.G(constants.%empty_struct_type, constants.%T.67d) {
|
||||
// CHECK:STDOUT: %T.patt.loc16_9.2 => constants.%T.patt.014
|
||||
// CHECK:STDOUT: %T.loc16_9.1 => constants.%T.67d
|
||||
// CHECK:STDOUT: %T.patt.loc16_17.2 => constants.%T.patt.014
|
||||
// CHECK:STDOUT: %T.loc16_17.1 => constants.%T.67d
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %DD => constants.%empty_struct_type
|
||||
@@ -382,80 +382,80 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: impl_decl @BB.as_type.as.B.impl [concrete] {
|
||||
// CHECK:STDOUT: %AA.patt.loc9_16.1: %pattern_type.98f = symbolic_binding_pattern AA, 0 [symbolic = %AA.patt.loc9_16.2 (constants.%AA.patt)]
|
||||
// CHECK:STDOUT: %BB.patt.loc9_27.1: @BB.as_type.as.B.impl.%pattern_type (%pattern_type.98d) = symbolic_binding_pattern BB, 1 [symbolic = %BB.patt.loc9_27.2 (constants.%BB.patt.aea)]
|
||||
// CHECK:STDOUT: %BB.patt.loc9_26.1: @BB.as_type.as.B.impl.%pattern_type (%pattern_type.98d) = symbolic_binding_pattern BB, 1 [symbolic = %BB.patt.loc9_26.2 (constants.%BB.patt.aea)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %BB.ref: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = name_ref BB, %BB.loc9_27.1 [symbolic = %BB.loc9_27.2 (constants.%BB.6ca)]
|
||||
// CHECK:STDOUT: %BB.as_type.loc9_51.1: type = facet_access_type %BB.ref [symbolic = %BB.as_type.loc9_51.2 (constants.%BB.as_type)]
|
||||
// CHECK:STDOUT: %.loc9_51: type = converted %BB.ref, %BB.as_type.loc9_51.1 [symbolic = %BB.as_type.loc9_51.2 (constants.%BB.as_type)]
|
||||
// CHECK:STDOUT: %BB.ref: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = name_ref BB, %BB.loc9_26.1 [symbolic = %BB.loc9_26.2 (constants.%BB.6ca)]
|
||||
// CHECK:STDOUT: %BB.as_type.loc9_49.1: type = facet_access_type %BB.ref [symbolic = %BB.as_type.loc9_49.2 (constants.%BB.as_type)]
|
||||
// CHECK:STDOUT: %.loc9_49: type = converted %BB.ref, %BB.as_type.loc9_49.1 [symbolic = %BB.as_type.loc9_49.2 (constants.%BB.as_type)]
|
||||
// CHECK:STDOUT: %B.ref: %B.type.d1b = name_ref B, file.%B.decl [concrete = constants.%B.generic]
|
||||
// CHECK:STDOUT: %AA.ref.loc9_59: type = name_ref AA, %AA.loc9_16.1 [symbolic = %AA.loc9_16.2 (constants.%AA)]
|
||||
// CHECK:STDOUT: %ptr.loc9_61.1: type = ptr_type %AA.ref.loc9_59 [symbolic = %ptr.loc9_61.2 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %B.type.loc9_62.1: type = facet_type <@B, @B(constants.%ptr.e8f8f9.1)> [symbolic = %B.type.loc9_62.2 (constants.%B.type.4a0be4.1)]
|
||||
// CHECK:STDOUT: %.loc9_19.1: type = splice_block %.loc9_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %AA.ref.loc9_57: type = name_ref AA, %AA.loc9_16.1 [symbolic = %AA.loc9_16.2 (constants.%AA)]
|
||||
// CHECK:STDOUT: %ptr.loc9_59.1: type = ptr_type %AA.ref.loc9_57 [symbolic = %ptr.loc9_59.2 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %B.type.loc9_60.1: type = facet_type <@B, @B(constants.%ptr.e8f8f9.1)> [symbolic = %B.type.loc9_60.2 (constants.%B.type.4a0be4.1)]
|
||||
// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc9_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc9_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %AA.loc9_16.1: type = symbolic_binding AA, 0 [symbolic = %AA.loc9_16.2 (constants.%AA)]
|
||||
// CHECK:STDOUT: %.loc9_36.1: type = splice_block %.loc9_36.2 [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc9_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc9_34.1: type = splice_block %.loc9_34.2 [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc9_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic]
|
||||
// CHECK:STDOUT: %AA.ref.loc9_32: type = name_ref AA, %AA.loc9_16.1 [symbolic = %AA.loc9_16.2 (constants.%AA)]
|
||||
// CHECK:STDOUT: %A.type.loc9_34.1: type = facet_type <@A, @A(constants.%AA)> [symbolic = %A.type.loc9_34.2 (constants.%A.type.acd3aa.1)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc9_36.1: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_36.2 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc9_34.1 [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.acd3aa.1) = name_ref .Self, %.Self.frozen.loc9_36.1 [symbolic = %.Self.frozen.loc9_36.2 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %AA.ref.loc9_30: type = name_ref AA, %AA.loc9_16.1 [symbolic = %AA.loc9_16.2 (constants.%AA)]
|
||||
// CHECK:STDOUT: %A.type.loc9_32.1: type = facet_type <@A, @A(constants.%AA)> [symbolic = %A.type.loc9_32.2 (constants.%A.type.acd3aa.1)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc9_34.1: @BB.as_type.as.B.impl.%A.type.loc9_32.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_34.2 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc9_32.1 [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref: @BB.as_type.as.B.impl.%A.type.loc9_32.2 (%A.type.acd3aa.1) = name_ref .Self, %.Self.frozen.loc9_34.1 [symbolic = %.Self.frozen.loc9_34.2 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %.loc9_42.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %.loc9_42.2: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = specific_constant @X.%assoc0, @A.WithSelf(constants.%AA, constants.%.Self.frozen.14f) [symbolic = %assoc0 (constants.%assoc0)]
|
||||
// CHECK:STDOUT: %X.ref: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = name_ref X, %.loc9_42.2 [symbolic = %assoc0 (constants.%assoc0)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_42.1: type = impl_witness_access constants.%A.lookup_impl_witness.8d4, element0 [symbolic = %impl.elem0.loc9_42.3 (constants.%impl.elem0.796)]
|
||||
// CHECK:STDOUT: %.loc9_48.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_48.2: type = converted %.loc9_48.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %rewrite.loc9_45.1 = requirement_rewrite %impl.elem0.loc9_42.1, %.loc9_48.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_42.2: type = impl_witness_access constants.%A.lookup_impl_witness.b03c54.1, element0 [symbolic = %impl.elem0.loc9_42.4 (constants.%impl.elem0.14e5d2.1)]
|
||||
// CHECK:STDOUT: %rewrite.loc9_45.2 = requirement_rewrite %impl.elem0.loc9_42.2, %.loc9_48.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc9_36.2: type = where_expr [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] {
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc9_34.1 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc9_45.2 = requirement_rewrite %impl.elem0.loc9_42.2, %.loc9_48.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc9_40.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %.loc9_40.2: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = specific_constant @X.%assoc0, @A.WithSelf(constants.%AA, constants.%.Self.frozen.14f) [symbolic = %assoc0 (constants.%assoc0)]
|
||||
// CHECK:STDOUT: %X.ref: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = name_ref X, %.loc9_40.2 [symbolic = %assoc0 (constants.%assoc0)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_40.1: type = impl_witness_access constants.%A.lookup_impl_witness.8d4, element0 [symbolic = %impl.elem0.loc9_40.3 (constants.%impl.elem0.796)]
|
||||
// CHECK:STDOUT: %.loc9_46.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_46.2: type = converted %.loc9_46.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %rewrite.loc9_43.1 = requirement_rewrite %impl.elem0.loc9_40.1, %.loc9_46.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_40.2: type = impl_witness_access constants.%A.lookup_impl_witness.b03c54.1, element0 [symbolic = %impl.elem0.loc9_40.4 (constants.%impl.elem0.14e5d2.1)]
|
||||
// CHECK:STDOUT: %rewrite.loc9_43.2 = requirement_rewrite %impl.elem0.loc9_40.2, %.loc9_46.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc9_34.2: type = where_expr [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)] {
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %A.type.loc9_32.1 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc9_43.2 = requirement_rewrite %impl.elem0.loc9_40.2, %.loc9_46.2 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %BB.loc9_27.1: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = symbolic_binding BB, 1 [symbolic = %BB.loc9_27.2 (constants.%BB.6ca)]
|
||||
// CHECK:STDOUT: %BB.loc9_26.1: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = symbolic_binding BB, 1 [symbolic = %BB.loc9_26.2 (constants.%BB.6ca)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic impl @BB.as_type.as.B.impl(%AA.loc9_16.1: type, %BB.loc9_27.1: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1)) {
|
||||
// CHECK:STDOUT: generic impl @BB.as_type.as.B.impl(%AA.loc9_16.1: type, %BB.loc9_26.1: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1)) {
|
||||
// CHECK:STDOUT: %AA.patt.loc9_16.2: %pattern_type.98f = symbolic_binding_pattern AA, 0 [symbolic = %AA.patt.loc9_16.2 (constants.%AA.patt)]
|
||||
// CHECK:STDOUT: %AA.loc9_16.2: type = symbolic_binding AA, 0 [symbolic = %AA.loc9_16.2 (constants.%AA)]
|
||||
// CHECK:STDOUT: %A.type.loc9_34.2: type = facet_type <@A, @A(%AA.loc9_16.2)> [symbolic = %A.type.loc9_34.2 (constants.%A.type.acd3aa.1)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc9_36.2: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_36.2 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %require_complete.loc9_42: <witness> = require_complete_type %A.type.loc9_34.2 [symbolic = %require_complete.loc9_42 (constants.%require_complete.21f)]
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc9_36.2 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %A.type.loc9_32.2: type = facet_type <@A, @A(%AA.loc9_16.2)> [symbolic = %A.type.loc9_32.2 (constants.%A.type.acd3aa.1)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc9_34.2: @BB.as_type.as.B.impl.%A.type.loc9_32.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self.frozen.loc9_34.2 (constants.%.Self.frozen.14f)]
|
||||
// CHECK:STDOUT: %require_complete.loc9_40: <witness> = require_complete_type %A.type.loc9_32.2 [symbolic = %require_complete.loc9_40 (constants.%require_complete.21f)]
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc9_34.2 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type)]
|
||||
// CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%AA.loc9_16.2) [symbolic = %A.assoc_type (constants.%A.assoc_type)]
|
||||
// CHECK:STDOUT: %assoc0: @BB.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = assoc_entity element0, @A.WithSelf.%X [symbolic = %assoc0 (constants.%assoc0)]
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc9_42.1: <witness> = lookup_impl_witness %.Self.frozen.loc9_36.2, @A, @A(%AA.loc9_16.2) [symbolic = %A.lookup_impl_witness.loc9_42.1 (constants.%A.lookup_impl_witness.8d4)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_42.3: type = impl_witness_access %A.lookup_impl_witness.loc9_42.1, element0 [symbolic = %impl.elem0.loc9_42.3 (constants.%impl.elem0.796)]
|
||||
// CHECK:STDOUT: %.Self: @BB.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.a16688.1)]
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc9_42.2: <witness> = lookup_impl_witness %.Self, @A, @A(%AA.loc9_16.2) [symbolic = %A.lookup_impl_witness.loc9_42.2 (constants.%A.lookup_impl_witness.b03c54.1)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_42.4: type = impl_witness_access %A.lookup_impl_witness.loc9_42.2, element0 [symbolic = %impl.elem0.loc9_42.4 (constants.%impl.elem0.14e5d2.1)]
|
||||
// CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%AA.loc9_16.2) where %impl.elem0.loc9_42.4 = constants.%empty_tuple.type> [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)]
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc9_40.1: <witness> = lookup_impl_witness %.Self.frozen.loc9_34.2, @A, @A(%AA.loc9_16.2) [symbolic = %A.lookup_impl_witness.loc9_40.1 (constants.%A.lookup_impl_witness.8d4)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_40.3: type = impl_witness_access %A.lookup_impl_witness.loc9_40.1, element0 [symbolic = %impl.elem0.loc9_40.3 (constants.%impl.elem0.796)]
|
||||
// CHECK:STDOUT: %.Self: @BB.as_type.as.B.impl.%A.type.loc9_32.2 (%A.type.acd3aa.1) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.a16688.1)]
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc9_40.2: <witness> = lookup_impl_witness %.Self, @A, @A(%AA.loc9_16.2) [symbolic = %A.lookup_impl_witness.loc9_40.2 (constants.%A.lookup_impl_witness.b03c54.1)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_40.4: type = impl_witness_access %A.lookup_impl_witness.loc9_40.2, element0 [symbolic = %impl.elem0.loc9_40.4 (constants.%impl.elem0.14e5d2.1)]
|
||||
// CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%AA.loc9_16.2) where %impl.elem0.loc9_40.4 = constants.%empty_tuple.type> [symbolic = %A_where.type (constants.%A_where.type.ce6fa0.1)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %A_where.type [symbolic = %pattern_type (constants.%pattern_type.98d)]
|
||||
// CHECK:STDOUT: %BB.patt.loc9_27.2: @BB.as_type.as.B.impl.%pattern_type (%pattern_type.98d) = symbolic_binding_pattern BB, 1 [symbolic = %BB.patt.loc9_27.2 (constants.%BB.patt.aea)]
|
||||
// CHECK:STDOUT: %BB.loc9_27.2: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = symbolic_binding BB, 1 [symbolic = %BB.loc9_27.2 (constants.%BB.6ca)]
|
||||
// CHECK:STDOUT: %BB.as_type.loc9_51.2: type = facet_access_type %BB.loc9_27.2 [symbolic = %BB.as_type.loc9_51.2 (constants.%BB.as_type)]
|
||||
// CHECK:STDOUT: %ptr.loc9_61.2: type = ptr_type %AA.loc9_16.2 [symbolic = %ptr.loc9_61.2 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %B.type.loc9_62.2: type = facet_type <@B, @B(%ptr.loc9_61.2)> [symbolic = %B.type.loc9_62.2 (constants.%B.type.4a0be4.1)]
|
||||
// CHECK:STDOUT: %B.impl_witness.loc9_64.2: <witness> = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(%AA.loc9_16.2, %BB.loc9_27.2) [symbolic = %B.impl_witness.loc9_64.2 (constants.%B.impl_witness.8cc)]
|
||||
// CHECK:STDOUT: %BB.patt.loc9_26.2: @BB.as_type.as.B.impl.%pattern_type (%pattern_type.98d) = symbolic_binding_pattern BB, 1 [symbolic = %BB.patt.loc9_26.2 (constants.%BB.patt.aea)]
|
||||
// CHECK:STDOUT: %BB.loc9_26.2: @BB.as_type.as.B.impl.%A_where.type (%A_where.type.ce6fa0.1) = symbolic_binding BB, 1 [symbolic = %BB.loc9_26.2 (constants.%BB.6ca)]
|
||||
// CHECK:STDOUT: %BB.as_type.loc9_49.2: type = facet_access_type %BB.loc9_26.2 [symbolic = %BB.as_type.loc9_49.2 (constants.%BB.as_type)]
|
||||
// CHECK:STDOUT: %ptr.loc9_59.2: type = ptr_type %AA.loc9_16.2 [symbolic = %ptr.loc9_59.2 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %B.type.loc9_60.2: type = facet_type <@B, @B(%ptr.loc9_59.2)> [symbolic = %B.type.loc9_60.2 (constants.%B.type.4a0be4.1)]
|
||||
// CHECK:STDOUT: %B.impl_witness.loc9_62.2: <witness> = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(%AA.loc9_16.2, %BB.loc9_26.2) [symbolic = %B.impl_witness.loc9_62.2 (constants.%B.impl_witness.8cc)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc9_62: <witness> = require_complete_type %B.type.loc9_62.2 [symbolic = %require_complete.loc9_62 (constants.%require_complete.a5dc9d.1)]
|
||||
// CHECK:STDOUT: %require_complete.loc9_60: <witness> = require_complete_type %B.type.loc9_60.2 [symbolic = %require_complete.loc9_60 (constants.%require_complete.a5dc9d.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %.loc9_51 as %B.type.loc9_62.1 {
|
||||
// CHECK:STDOUT: impl: %.loc9_49 as %B.type.loc9_60.1 {
|
||||
// CHECK:STDOUT: %B.impl_witness_table = impl_witness_table (), @BB.as_type.as.B.impl [concrete]
|
||||
// CHECK:STDOUT: %B.impl_witness.loc9_64.1: <witness> = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(constants.%AA, constants.%BB.6ca) [symbolic = %B.impl_witness.loc9_64.2 (constants.%B.impl_witness.8cc)]
|
||||
// CHECK:STDOUT: %B.impl_witness.loc9_62.1: <witness> = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(constants.%AA, constants.%BB.6ca) [symbolic = %B.impl_witness.loc9_62.2 (constants.%B.impl_witness.8cc)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: extend %B.type.loc9_62.1
|
||||
// CHECK:STDOUT: witness = %B.impl_witness.loc9_64.1
|
||||
// CHECK:STDOUT: extend %B.type.loc9_60.1
|
||||
// CHECK:STDOUT: witness = %B.impl_witness.loc9_62.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -477,20 +477,20 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @D.G(@D.%DD.loc14_11.2: type, %T.loc15_9.2: type) {
|
||||
// CHECK:STDOUT: generic fn @D.G(@D.%DD.loc14_11.2: type, %T.loc15_17.2: type) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %DD: type = symbolic_binding DD, 0 [symbolic = %DD (constants.%DD)]
|
||||
// CHECK:STDOUT: %ptr.loc21_14.2: type = ptr_type %DD [symbolic = %ptr.loc21_14.2 (constants.%ptr.e8f8f9.2)]
|
||||
// CHECK:STDOUT: %B.type.loc21_15.2: type = facet_type <@B, @B(%ptr.loc21_14.2)> [symbolic = %B.type.loc21_15.2 (constants.%B.type.4a0be4.2)]
|
||||
// CHECK:STDOUT: %.loc21_7.2: require_specific_def_type = require_specific_def @BB.as.B.impl(%ptr.loc21_14.2, %T.loc15_9.1) [symbolic = %.loc21_7.2 (constants.%.800)]
|
||||
// CHECK:STDOUT: %B.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc15_9.1, @B, @B(%ptr.loc21_14.2) [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness.fc3)]
|
||||
// CHECK:STDOUT: %B.facet.loc21_7.2: @D.G.%B.type.loc21_15.2 (%B.type.4a0be4.2) = facet_value %T.loc15_9.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc21_7.2 (constants.%B.facet.f68)]
|
||||
// CHECK:STDOUT: %.loc21_7.2: require_specific_def_type = require_specific_def @BB.as.B.impl(%ptr.loc21_14.2, %T.loc15_17.1) [symbolic = %.loc21_7.2 (constants.%.800)]
|
||||
// CHECK:STDOUT: %B.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc15_17.1, @B, @B(%ptr.loc21_14.2) [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness.fc3)]
|
||||
// CHECK:STDOUT: %B.facet.loc21_7.2: @D.G.%B.type.loc21_15.2 (%B.type.4a0be4.2) = facet_value %T.loc15_17.1, (%B.lookup_impl_witness) [symbolic = %B.facet.loc21_7.2 (constants.%B.facet.f68)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_9.2 [symbolic = %T.loc15_9.1 (constants.%T.091)]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_17.2 [symbolic = %T.loc15_17.1 (constants.%T.091)]
|
||||
// CHECK:STDOUT: %B.ref: %B.type.d1b = name_ref B, file.%B.decl [concrete = constants.%B.generic]
|
||||
// CHECK:STDOUT: %DD.ref: type = name_ref DD, @D.%DD.loc14_11.2 [symbolic = %DD (constants.%DD)]
|
||||
// CHECK:STDOUT: %ptr.loc21_14.1: type = ptr_type %DD.ref [symbolic = %ptr.loc21_14.2 (constants.%ptr.e8f8f9.2)]
|
||||
@@ -506,25 +506,25 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: specific @BB.as_type.as.B.impl(constants.%AA, constants.%BB.6ca) {
|
||||
// CHECK:STDOUT: %AA.patt.loc9_16.2 => constants.%AA.patt
|
||||
// CHECK:STDOUT: %AA.loc9_16.2 => constants.%AA
|
||||
// CHECK:STDOUT: %A.type.loc9_34.2 => constants.%A.type.acd3aa.1
|
||||
// CHECK:STDOUT: %.Self.frozen.loc9_36.2 => constants.%.Self.frozen.14f
|
||||
// CHECK:STDOUT: %require_complete.loc9_42 => constants.%require_complete.21f
|
||||
// CHECK:STDOUT: %A.type.loc9_32.2 => constants.%A.type.acd3aa.1
|
||||
// CHECK:STDOUT: %.Self.frozen.loc9_34.2 => constants.%.Self.frozen.14f
|
||||
// CHECK:STDOUT: %require_complete.loc9_40 => constants.%require_complete.21f
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type
|
||||
// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc9_42.1 => constants.%A.lookup_impl_witness.8d4
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_42.3 => constants.%impl.elem0.796
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc9_40.1 => constants.%A.lookup_impl_witness.8d4
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_40.3 => constants.%impl.elem0.796
|
||||
// CHECK:STDOUT: %.Self => constants.%.Self.a16688.1
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc9_42.2 => constants.%A.lookup_impl_witness.b03c54.1
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_42.4 => constants.%impl.elem0.14e5d2.1
|
||||
// CHECK:STDOUT: %A.lookup_impl_witness.loc9_40.2 => constants.%A.lookup_impl_witness.b03c54.1
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_40.4 => constants.%impl.elem0.14e5d2.1
|
||||
// CHECK:STDOUT: %A_where.type => constants.%A_where.type.ce6fa0.1
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98d
|
||||
// CHECK:STDOUT: %BB.patt.loc9_27.2 => constants.%BB.patt.aea
|
||||
// CHECK:STDOUT: %BB.loc9_27.2 => constants.%BB.6ca
|
||||
// CHECK:STDOUT: %BB.as_type.loc9_51.2 => constants.%BB.as_type
|
||||
// CHECK:STDOUT: %ptr.loc9_61.2 => constants.%ptr.e8f8f9.1
|
||||
// CHECK:STDOUT: %B.type.loc9_62.2 => constants.%B.type.4a0be4.1
|
||||
// CHECK:STDOUT: %B.impl_witness.loc9_64.2 => constants.%B.impl_witness.8cc
|
||||
// CHECK:STDOUT: %BB.patt.loc9_26.2 => constants.%BB.patt.aea
|
||||
// CHECK:STDOUT: %BB.loc9_26.2 => constants.%BB.6ca
|
||||
// CHECK:STDOUT: %BB.as_type.loc9_49.2 => constants.%BB.as_type
|
||||
// CHECK:STDOUT: %ptr.loc9_59.2 => constants.%ptr.e8f8f9.1
|
||||
// CHECK:STDOUT: %B.type.loc9_60.2 => constants.%B.type.4a0be4.1
|
||||
// CHECK:STDOUT: %B.impl_witness.loc9_62.2 => constants.%B.impl_witness.8cc
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @D(constants.%DD) {
|
||||
@@ -537,8 +537,8 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @D.G(constants.%DD, constants.%T.091) {
|
||||
// CHECK:STDOUT: %T.patt.loc15_9.2 => constants.%T.patt.014
|
||||
// CHECK:STDOUT: %T.loc15_9.1 => constants.%T.091
|
||||
// CHECK:STDOUT: %T.patt.loc15_17.2 => constants.%T.patt.014
|
||||
// CHECK:STDOUT: %T.loc15_17.1 => constants.%T.091
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @D(constants.%empty_struct_type) {
|
||||
@@ -551,8 +551,8 @@ fn H(T:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @D.G(constants.%empty_struct_type, constants.%T.67d) {
|
||||
// CHECK:STDOUT: %T.patt.loc15_9.2 => constants.%T.patt.014
|
||||
// CHECK:STDOUT: %T.loc15_9.1 => constants.%T.67d
|
||||
// CHECK:STDOUT: %T.patt.loc15_17.2 => constants.%T.patt.014
|
||||
// CHECK:STDOUT: %T.loc15_17.1 => constants.%T.67d
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %DD => constants.%empty_struct_type
|
||||
|
||||
+16
-16
@@ -13,9 +13,9 @@
|
||||
// --- class_impl_doesnt_need_complete_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K(T:! type) {}
|
||||
interface K(T: type) {}
|
||||
|
||||
class C(N:! i32) {
|
||||
class C(N: i32) {
|
||||
impl as K(array(i32, N)) {}
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ fn F(unused v: C(-1)) {}
|
||||
// --- fail_class_extend_impl_does_need_complete_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K(T:! type) {}
|
||||
interface K(T: type) {}
|
||||
|
||||
class C(N:! i32) {
|
||||
class C(N: i32) {
|
||||
extend impl as K(array(i32, N)) {}
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ fn F(unused v: C(-1)) {}
|
||||
// --- interface_require_impls_doesnt_need_complete_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K(T:! type) {}
|
||||
interface J(N:! i32) {
|
||||
interface K(T: type) {}
|
||||
interface J(N: i32) {
|
||||
require impls K(array(i32, N));
|
||||
}
|
||||
|
||||
@@ -55,11 +55,11 @@ fn F(unused v: J(-1)) {}
|
||||
// --- fail_interface_extend_require_impls_does_need_complete_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K(T:! type) {}
|
||||
interface J(N:! i32) {
|
||||
interface K(T: type) {}
|
||||
interface J(N: i32) {
|
||||
extend require impls K(array(i32, N));
|
||||
}
|
||||
interface I(N:! i32) {
|
||||
interface I(N: i32) {
|
||||
extend require impls J(N);
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@ fn F(unused v: I(-1)) {}
|
||||
// --- constraint_require_impls_doesnt_need_complete_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K(T:! type) {}
|
||||
constraint J(N:! i32) {
|
||||
interface K(T: type) {}
|
||||
constraint J(N: i32) {
|
||||
require impls K(array(i32, N));
|
||||
}
|
||||
|
||||
@@ -95,11 +95,11 @@ fn F(unused v: J(-1)) {}
|
||||
// --- fail_constraint_extend_require_impls_does_need_complete_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K(T:! type) {}
|
||||
constraint J(N:! i32) {
|
||||
interface K(T: type) {}
|
||||
constraint J(N: i32) {
|
||||
extend require impls K(array(i32, N));
|
||||
}
|
||||
constraint I(N:! i32) {
|
||||
constraint I(N: i32) {
|
||||
extend require impls J(N);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ fn F(unused v: I(-1)) {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K {}
|
||||
interface J(N:! i32) {
|
||||
interface J(N: i32) {
|
||||
require array(Self, N) impls K;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ fn F(unused v: J(-1)) {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K {}
|
||||
constraint J(N:! i32) {
|
||||
constraint J(N: i32) {
|
||||
require array(Self, N) impls K;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F[T:! type](x: T) -> T {
|
||||
fn F[T: type](x: T) -> T {
|
||||
// CHECK:STDERR: fail_return.carbon:[[@LINE+7]]:10: error: cannot copy value of type `T` [CopyOfUncopyableType]
|
||||
// CHECK:STDERR: return x;
|
||||
// CHECK:STDERR: ^
|
||||
@@ -29,7 +29,7 @@ fn F[T:! type](x: T) -> T {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F[T:! Core.Destroy](x: T) {
|
||||
fn F[T: Core.Destroy](x: T) {
|
||||
// CHECK:STDERR: fail_var.carbon:[[@LINE+7]]:21: error: cannot copy value of type `T` [CopyOfUncopyableType]
|
||||
// CHECK:STDERR: var unused y: T = x;
|
||||
// CHECK:STDERR: ^
|
||||
|
||||
+2
-2
@@ -15,10 +15,10 @@ interface Z {}
|
||||
class C {}
|
||||
impl C as Z {}
|
||||
|
||||
fn G[T:! Z](p: T);
|
||||
fn G[T: Z](p: T);
|
||||
|
||||
fn F() {
|
||||
G({} as C);
|
||||
}
|
||||
|
||||
fn G[T:! Z](unused p: T) {}
|
||||
fn G[T: Z](unused p: T) {}
|
||||
|
||||
@@ -16,11 +16,11 @@ library "[[@TEST_NAME]]";
|
||||
// Identification tries to form the specific interface `K(array(i32, -1))` which
|
||||
// is invalid, so the impl as a whole is invalid.
|
||||
|
||||
interface K(T:! type) {}
|
||||
constraint L(N:! i32) {
|
||||
interface K(T: type) {}
|
||||
constraint L(N: i32) {
|
||||
require impls K(array(i32, N));
|
||||
}
|
||||
constraint J(N:! i32) {
|
||||
constraint J(N: i32) {
|
||||
require impls L(N);
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ library "[[@TEST_NAME]]";
|
||||
// Identification tries to form the specific interface `K(array(i32, -1))` which
|
||||
// is invalid, so the impl as a whole is invalid.
|
||||
|
||||
interface K(T:! type) {}
|
||||
constraint J(N:! i32) {
|
||||
interface K(T: type) {}
|
||||
constraint J(N: i32) {
|
||||
extend require impls K(array(i32, N));
|
||||
}
|
||||
|
||||
@@ -57,12 +57,12 @@ impl {} as J(-1) {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Y {}
|
||||
interface CanFailToMonomorphize(N:! Core.IntLiteral) {
|
||||
let Z1:! array((), N);
|
||||
let Z2:! type;
|
||||
interface CanFailToMonomorphize(N: Core.IntLiteral) {
|
||||
let Z1: array((), N);
|
||||
let Z2: type;
|
||||
}
|
||||
|
||||
constraint S(N:! Core.IntLiteral) {
|
||||
constraint S(N: Core.IntLiteral) {
|
||||
extend require impls CanFailToMonomorphize(N);
|
||||
}
|
||||
|
||||
@@ -75,21 +75,21 @@ constraint S(N:! Core.IntLiteral) {
|
||||
// gets to the `.Z2` and attempts `SubstPeriodSelf()` before failing. Without
|
||||
// the named constraint indirection, we'd just fail to build a specific for
|
||||
// `CanFailToMonomorphize(N)` and fail without attempting `SubstPeriodSelf()`.
|
||||
fn F(N:! Core.IntLiteral, _:! S(N) where .Z2 impls Y) {}
|
||||
fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z2 impls Y) {}
|
||||
|
||||
fn G(T:! Y) {
|
||||
fn G(generic T: Y) {
|
||||
// CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE+13]]:3: error: facet type `S(-1) where .(CanFailToMonomorphize(-1).Z2) impls Y` can not be identified [ImplLookupInUnidentifiedFacetType]
|
||||
// CHECK:STDERR: F(-1, T);
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-18]]:24: note: `CanFailToMonomorphize(N)` evaluates to incomplete type `CanFailToMonomorphize(-1)` [IncompleteTypeInMonomorphization]
|
||||
// CHECK:STDERR: extend require impls CanFailToMonomorphize(N);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-26]]:22: note: array bound of -1 is negative [ArrayBoundNegative]
|
||||
// CHECK:STDERR: let Z1:! array((), N);
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-26]]:21: note: array bound of -1 is negative [ArrayBoundNegative]
|
||||
// CHECK:STDERR: let Z1: array((), N);
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_monomorphization_during_period_self_substitution.carbon:[[@LINE-12]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn F(N:! Core.IntLiteral, _:! S(N) where .Z2 impls Y) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z2 impls Y) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
F(-1, T);
|
||||
};
|
||||
@@ -99,16 +99,16 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Y {}
|
||||
interface Z {
|
||||
let Z1:! type;
|
||||
let Z1: type;
|
||||
}
|
||||
|
||||
constraint S(N:! Core.IntLiteral) {
|
||||
constraint S(N: Core.IntLiteral) {
|
||||
extend require impls Z where .Z1 = array((), N);
|
||||
}
|
||||
|
||||
fn F(N:! Core.IntLiteral, _:! S(N)) {}
|
||||
fn F(generic N: Core.IntLiteral, generic _: S(N)) {}
|
||||
|
||||
fn G(T:! Z) {
|
||||
fn G(generic T: Z) {
|
||||
// CHECK:STDERR: fail_monomorphization_identify_in_call.carbon:[[@LINE+10]]:3: error: facet type `S(-1)` can not be identified [ImplLookupInUnidentifiedFacetType]
|
||||
// CHECK:STDERR: F(-1, T);
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
@@ -116,8 +116,8 @@ fn G(T:! Z) {
|
||||
// CHECK:STDERR: extend require impls Z where .Z1 = array((), N);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_monomorphization_identify_in_call.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn F(N:! Core.IntLiteral, _:! S(N)) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N)) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
F(-1, T);
|
||||
};
|
||||
@@ -127,25 +127,25 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Y {}
|
||||
interface Z {
|
||||
let Z1:! type;
|
||||
let Z1: type;
|
||||
}
|
||||
|
||||
constraint S(N:! Core.IntLiteral) {
|
||||
constraint S(N: Core.IntLiteral) {
|
||||
extend require impls Z;
|
||||
}
|
||||
|
||||
fn F(N:! Core.IntLiteral, _:! S(N) where .Z1 = array((), N)) {}
|
||||
fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = array((), N)) {}
|
||||
|
||||
fn G(T:! Z) {
|
||||
fn G(generic T: Z) {
|
||||
// CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE+10]]:3: error: constructed invalid specific for `S(N) where .(Z.Z1) = array((), N)` from argument [SubstitutingGenericParamType]
|
||||
// CHECK:STDERR: F(-1, T);
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE-6]]:27: note: array bound of -1 is negative [ArrayBoundNegative]
|
||||
// CHECK:STDERR: fn F(N:! Core.IntLiteral, _:! S(N) where .Z1 = array((), N)) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE-6]]:42: note: array bound of -1 is negative [ArrayBoundNegative]
|
||||
// CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = array((), N)) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_monomorphization_during_deduction_in_call.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn F(N:! Core.IntLiteral, _:! S(N) where .Z1 = array((), N)) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn F(generic N: Core.IntLiteral, generic _: S(N) where .Z1 = array((), N)) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
F(-1, T);
|
||||
};
|
||||
|
||||
+12
-12
@@ -17,7 +17,7 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F() {
|
||||
class C(T:! type) {
|
||||
class C(T: type) {
|
||||
var x: T;
|
||||
}
|
||||
var unused v: C(i32) = {.x = 1};
|
||||
@@ -30,13 +30,13 @@ library "[[@TEST_NAME]]";
|
||||
fn F() {
|
||||
// TODO: Decide on what behavior we want here. We don't reject the corresponding case outside of a function.
|
||||
// CHECK:STDERR: fail_param_shadows_class.carbon:[[@LINE+7]]:9: error: duplicate name `C` being declared in the same scope [NameDeclDuplicate]
|
||||
// CHECK:STDERR: class C(C:! type) {
|
||||
// CHECK:STDERR: class C(C: type) {
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_param_shadows_class.carbon:[[@LINE+4]]:11: note: name is previously declared here [NameDeclPrevious]
|
||||
// CHECK:STDERR: class C(C:! type) {
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: class C(C: type) {
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
class C(C:! type) {
|
||||
class C(C: type) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ fn F() {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C(C:! type) {
|
||||
class C(C: type) {
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- class.carbon
|
||||
@@ -161,9 +161,9 @@ class C(C:! type) {
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc5_12.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_12.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc5_15.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc5_14.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc5_12.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_12.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -293,9 +293,9 @@ class C(C:! type) {
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %C.patt.loc13_12.1: %pattern_type = symbolic_binding_pattern C, 0 [symbolic = %C.patt.loc13_12.2 (constants.%C.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc13_15.1: type = splice_block %.loc13_15.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc13_14.1: type = splice_block %.loc13_14.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc13_15.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc13_14.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.loc13_12.2: type = symbolic_binding C, 0 [symbolic = %C.loc13_12.1 (constants.%C.67d)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -340,9 +340,9 @@ class C(C:! type) {
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %C.patt.loc4_10.1: %pattern_type = symbolic_binding_pattern C, 0 [symbolic = %C.patt.loc4_10.2 (constants.%C.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_13.1: type = splice_block %.loc4_13.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_12.1: type = splice_block %.loc4_12.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_13.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_12.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.loc4_10.2: type = symbolic_binding C, 0 [symbolic = %C.loc4_10.1 (constants.%C.67d)]
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+3
-3
@@ -12,7 +12,7 @@
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/generic/local_function.carbon
|
||||
|
||||
fn Test[unused T:! type]() {
|
||||
fn Test[unused T: type]() {
|
||||
fn Local() {
|
||||
}
|
||||
Local();
|
||||
@@ -50,9 +50,9 @@ fn Test[unused T:! type]() {
|
||||
// CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] {
|
||||
// CHECK:STDOUT: %T.patt.loc15_17.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_17.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc15_20.1: type = splice_block %.loc15_20.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc15_19.1: type = splice_block %.loc15_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc15_20.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc15_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc15_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_17.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+26
-26
@@ -16,7 +16,7 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F[template T:! type](x: T) -> i32 {
|
||||
fn F[template T: type](x: T) -> i32 {
|
||||
let n: i32 = x;
|
||||
return n;
|
||||
}
|
||||
@@ -40,7 +40,7 @@ fn Test2(c: C) -> i32 {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F[template T:! type](x: T) -> i32 {
|
||||
fn F[template T: type](x: T) -> i32 {
|
||||
let n: i32 = x;
|
||||
return n;
|
||||
}
|
||||
@@ -174,16 +174,16 @@ fn Test(d: D) -> i32 {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// 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.loc4 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %x.param: @F.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0
|
||||
@@ -268,8 +268,8 @@ fn Test(d: D) -> i32 {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)]
|
||||
@@ -340,16 +340,16 @@ fn Test(d: D) -> i32 {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%i32) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%i32
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.cee
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.fbe
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.cee
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.fbe
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
|
||||
@@ -361,8 +361,8 @@ fn Test(d: D) -> i32 {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%C
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.2cc
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.2cc
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.cdf
|
||||
@@ -452,16 +452,16 @@ fn Test(d: D) -> i32 {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// 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.loc4 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %x.param: @F.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0
|
||||
@@ -499,8 +499,8 @@ fn Test(d: D) -> i32 {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)]
|
||||
@@ -544,16 +544,16 @@ fn Test(d: D) -> i32 {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%D) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%D
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d8d
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.23b
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.75f
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.23b
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.75f
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.357
|
||||
|
||||
+5
-5
@@ -15,10 +15,10 @@ library "[[@TEST_NAME]]";
|
||||
// TODO: This should check. The `T.I1` access should be deferred until we know
|
||||
// the value of the `template T`.
|
||||
//
|
||||
// CHECK:STDERR: fail_todo_template_access_assoc_const.carbon:[[@LINE+4]]:36: error: cannot evaluate type expression [TypeExprEvaluationFailure]
|
||||
// CHECK:STDERR: interface I(template T:! type, N:! T.I1) {
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR: fail_todo_template_access_assoc_const.carbon:[[@LINE+4]]:34: error: cannot evaluate type expression [TypeExprEvaluationFailure]
|
||||
// CHECK:STDERR: interface I(template T: type, N: T.I1) {
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
interface I(template T:! type, N:! T.I1) {
|
||||
let I1:! type;
|
||||
interface I(template T: type, N: T.I1) {
|
||||
let I1: type;
|
||||
}
|
||||
|
||||
+38
-38
@@ -16,7 +16,7 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F[template T:! type](x: T) -> i32 {
|
||||
fn F[template T: type](x: T) -> i32 {
|
||||
let n: i32 = x.n;
|
||||
return n;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ fn Test2(x: {.m: i32, .n: i32}) {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F[template T:! type](x: T) -> i32 {
|
||||
fn F[template T: type](x: T) -> i32 {
|
||||
let n: i32 = x.n;
|
||||
return n;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ fn Test(d: D) {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F[template T:! type](x: T) -> i32 {
|
||||
fn F[template T: type](x: T) -> i32 {
|
||||
let n: i32 = x.n;
|
||||
return n;
|
||||
}
|
||||
@@ -187,16 +187,16 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// 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.loc4 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %x.param: @F.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0
|
||||
@@ -242,8 +242,8 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)]
|
||||
@@ -301,16 +301,16 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%C) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%C
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.2cc
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.0f9
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.2cc
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.cdf
|
||||
@@ -324,8 +324,8 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%struct_type.m.n
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.860
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.c8a
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.14d
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.c8a
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.14d
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.08f
|
||||
@@ -415,16 +415,16 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.1: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// 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.loc4 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %x.param: @F.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0
|
||||
@@ -459,8 +459,8 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2: @F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)]
|
||||
@@ -507,16 +507,16 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%D) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%D
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.d8d
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.23b
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.75f
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.23b
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.75f
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.37d
|
||||
@@ -619,16 +619,16 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F.loc4 [concrete = constants.%F.708] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.1: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.1: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.1 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.1: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.1: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.1 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// 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.loc4 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %i32.loc4: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_34: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_33: Core.Form = init_form %i32.loc4 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %x.param: @F.loc4.%T.loc4_16.1 (%T.67db0b.1) = value_param call_param0
|
||||
@@ -672,8 +672,8 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_26.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_26.2 [template = %x.patt.loc4_26.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc4_25.2 (constants.%x.param_patt.91d)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2: @F.loc4.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc4_25.2 [template = %x.patt.loc4_25.2 (constants.%x.patt.800)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc4_16.1 [template = %require_complete (constants.%require_complete.944)]
|
||||
@@ -720,16 +720,16 @@ fn Test(e: E) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67db0b.1
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.91d
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.800
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.loc4(constants.%E) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%E
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.849
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_26.2 => constants.%x.param_patt.209
|
||||
// CHECK:STDOUT: %x.patt.loc4_26.2 => constants.%x.patt.b95
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_25.2 => constants.%x.param_patt.209
|
||||
// CHECK:STDOUT: %x.patt.loc4_25.2 => constants.%x.patt.b95
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.15a
|
||||
|
||||
+39
-39
@@ -18,7 +18,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
// Check that we get a reasonable diagnostic for an unimplemented operation on a
|
||||
// template dependent expression.
|
||||
fn F[template T:! type](x: T) -> i32 {
|
||||
fn F[template T: type](x: T) -> i32 {
|
||||
// CHECK:STDERR: fail_todo_unimplemented_operator.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.MulWith(Core.IntLiteral)` in type `<dependent type>` that does not implement that interface [MissingImplInMemberAccess]
|
||||
// CHECK:STDERR: return x.n * 3;
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
@@ -37,7 +37,7 @@ class C {
|
||||
// Check that we get a reasonable diagnostic for an unimplemented operation on a
|
||||
// template dependent value where the type is concrete but determined through
|
||||
// the template dependent value.
|
||||
fn F(template c:! C) -> i32 {
|
||||
fn F(template c: C) -> i32 {
|
||||
// CHECK:STDERR: fail_todo_unimplemented_value.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Core.MulWith(Core.IntLiteral)` in type `<dependent type>` that does not implement that interface [MissingImplInMemberAccess]
|
||||
// CHECK:STDERR: return c.n * 3;
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
@@ -49,7 +49,7 @@ fn F(template c:! C) -> i32 {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F[template T:! Core.Destroy](x: T) {
|
||||
fn F[template T: Core.Destroy](x: T) {
|
||||
// TODO: These diagnostics aren't very good, and we should only produce one error here.
|
||||
// CHECK:STDERR: fail_todo_unimplemented_convert.carbon:[[@LINE+8]]:3: error: member name of type `<dependent type>` in compound member access is not an instance member or an interface member [CompoundMemberAccessDoesNotUseBase]
|
||||
// CHECK:STDERR: var unused v: T = 0;
|
||||
@@ -117,16 +117,16 @@ fn F[template T:! Core.Destroy](x: T) {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc6_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc6_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc6_26.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc6_26.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc6_26.1 [template = %x.patt.loc6_26.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc6_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc6_25.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc6_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc6_25.1 [template = %x.patt.loc6_25.2 (constants.%x.patt)]
|
||||
// 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 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc6_34: Core.Form = init_form %i32 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc6_33: Core.Form = init_form %i32 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc6_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc6_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc6_16.2: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %x.param: @F.%T.loc6_16.1 (%T) = value_param call_param0
|
||||
@@ -141,8 +141,8 @@ fn F[template T:! Core.Destroy](x: T) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc6_16.1: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc6_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc6_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc6_26.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc6_26.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc6_26.2 [template = %x.patt.loc6_26.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc6_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc6_25.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc6_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = at_binding_pattern x, %x.param_patt.loc6_25.2 [template = %x.patt.loc6_25.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.loc6_16.1 [template = %require_complete (constants.%require_complete.944)]
|
||||
@@ -166,8 +166,8 @@ fn F[template T:! Core.Destroy](x: T) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_16.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc6_16.1 => constants.%T
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1
|
||||
// CHECK:STDOUT: %x.param_patt.loc6_26.2 => constants.%x.param_patt
|
||||
// CHECK:STDOUT: %x.patt.loc6_26.2 => constants.%x.patt
|
||||
// CHECK:STDOUT: %x.param_patt.loc6_25.2 => constants.%x.param_patt
|
||||
// CHECK:STDOUT: %x.patt.loc6_25.2 => constants.%x.patt
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_todo_unimplemented_value.carbon
|
||||
@@ -222,8 +222,8 @@ fn F[template T:! Core.Destroy](x: T) {
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc11_25: Core.Form = init_form %i32 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc11_19: type = splice_block %C.ref [concrete = constants.%C] {
|
||||
// CHECK:STDOUT: %.loc11_24: Core.Form = init_form %i32 [concrete = constants.%.795]
|
||||
// CHECK:STDOUT: %.loc11_18: type = splice_block %C.ref [concrete = constants.%C] {
|
||||
// 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: }
|
||||
@@ -328,38 +328,38 @@ fn F[template T:! Core.Destroy](x: T) {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.1: %pattern_type.429 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.351)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_34.1: @F.%pattern_type (%pattern_type.f4e485.2) = value_param_pattern [template = %x.param_patt.loc4_34.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_34.1: @F.%pattern_type (%pattern_type.f4e485.2) = at_binding_pattern x, %x.param_patt.loc4_34.1 [template = %x.patt.loc4_34.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_33.1: @F.%pattern_type (%pattern_type.f4e485.2) = value_param_pattern [template = %x.param_patt.loc4_33.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_33.1: @F.%pattern_type (%pattern_type.f4e485.2) = at_binding_pattern x, %x.param_patt.loc4_33.1 [template = %x.patt.loc4_33.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_23: type = splice_block %Destroy.ref [concrete = constants.%Destroy.type] {
|
||||
// CHECK:STDOUT: %.loc4_22: type = splice_block %Destroy.ref [concrete = constants.%Destroy.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %Destroy.ref: type = name_ref Destroy, imports.%Core.Destroy [concrete = constants.%Destroy.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_16.2: %Destroy.type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.0e7)]
|
||||
// CHECK:STDOUT: %x.param: @F.%T.as_type.loc4_36.1 (%T.as_type.700) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.2 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)] {
|
||||
// CHECK:STDOUT: %x.param: @F.%T.as_type.loc4_35.1 (%T.as_type.700) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc4_35.1: type = splice_block %.loc4_35.2 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)] {
|
||||
// CHECK:STDOUT: %T.ref.loc4: %Destroy.type = name_ref T, %T.loc4_16.2 [template = %T.loc4_16.1 (constants.%T.0e7)]
|
||||
// CHECK:STDOUT: %T.as_type.loc4_36.2: type = facet_access_type %T.ref.loc4 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: %.loc4_36.2: type = converted %T.ref.loc4, %T.as_type.loc4_36.2 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: %T.as_type.loc4_35.2: type = facet_access_type %T.ref.loc4 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: %.loc4_35.2: type = converted %T.ref.loc4, %T.as_type.loc4_35.2 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: @F.%T.as_type.loc4_36.1 (%T.as_type.700) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: %x: @F.%T.as_type.loc4_35.1 (%T.as_type.700) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc4_16.2: %Destroy.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2: %pattern_type.429 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc4_16.2 (constants.%T.patt.351)]
|
||||
// CHECK:STDOUT: %T.loc4_16.1: %Destroy.type = symbolic_binding T, 0, template [template = %T.loc4_16.1 (constants.%T.0e7)]
|
||||
// CHECK:STDOUT: %T.as_type.loc4_36.1: type = facet_access_type %T.loc4_16.1 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc4_36.1 [template = %pattern_type (constants.%pattern_type.f4e485.2)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_34.2: @F.%pattern_type (%pattern_type.f4e485.2) = value_param_pattern [template = %x.param_patt.loc4_34.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_34.2: @F.%pattern_type (%pattern_type.f4e485.2) = at_binding_pattern x, %x.param_patt.loc4_34.2 [template = %x.patt.loc4_34.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT: %T.as_type.loc4_35.1: type = facet_access_type %T.loc4_16.1 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc4_35.1 [template = %pattern_type (constants.%pattern_type.f4e485.2)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_33.2: @F.%pattern_type (%pattern_type.f4e485.2) = value_param_pattern [template = %x.param_patt.loc4_33.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc4_33.2: @F.%pattern_type (%pattern_type.f4e485.2) = at_binding_pattern x, %x.param_patt.loc4_33.2 [template = %x.patt.loc4_33.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc4_36.1 [template = %require_complete (constants.%require_complete.14c)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc4_35.1 [template = %require_complete (constants.%require_complete.14c)]
|
||||
// CHECK:STDOUT: %v.patt.loc14_15.2: @F.%pattern_type (%pattern_type.f4e485.2) = ref_binding_pattern v [template = %v.patt.loc14_15.2 (constants.%v.patt)]
|
||||
// CHECK:STDOUT: %v.var_patt.loc14_3.2: @F.%pattern_type (%pattern_type.f4e485.2) = var_pattern %v.patt.loc14_15.2 [template = %v.var_patt.loc14_3.2 (constants.%v.var_patt)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.loc14_3.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.as_type.loc4_36.1)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.f42)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.loc14_3.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.as_type.loc4_35.1)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.f42)]
|
||||
// CHECK:STDOUT: %.loc14_3.5: <instruction> = access_member_action %ImplicitAs.type.loc14_3.1, Convert [template]
|
||||
// CHECK:STDOUT: %.loc14_3.6: type = type_of_inst %.loc14_3.5 [template]
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy.WithSelf(%T.loc4_16.1) [template = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.d3ece9.2)]
|
||||
@@ -368,26 +368,26 @@ fn F[template T:! Core.Destroy](x: T) {
|
||||
// CHECK:STDOUT: %impl.elem0.loc14_3.2: @F.%.loc14_3.7 (%.53a) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.0f9)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: <specific function> = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.WithSelf.Op(%T.loc4_16.1) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.afc)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%x.param: @F.%T.as_type.loc4_36.1 (%T.as_type.700)) {
|
||||
// CHECK:STDOUT: fn(%x.param: @F.%T.as_type.loc4_35.1 (%T.as_type.700)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %v.var: ref @F.%T.as_type.loc4_36.1 (%T.as_type.700) = var_storage %v.var_patt.loc14_3.1
|
||||
// CHECK:STDOUT: %v.var: ref @F.%T.as_type.loc4_35.1 (%T.as_type.700) = var_storage %v.var_patt.loc14_3.1
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.loc14_3.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T.as_type.700)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.f42)]
|
||||
// CHECK:STDOUT: %.loc14_3.1: @F.%.loc14_3.6 (@F.%.loc14_3.6) = splice_inst %.loc14_3.5
|
||||
// CHECK:STDOUT: %.loc14_3.2: @F.%T.as_type.loc4_36.1 (%T.as_type.700) = converted %int_0, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc14_3.2: @F.%T.as_type.loc4_35.1 (%T.as_type.700) = converted %int_0, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: assign %v.var, <error>
|
||||
// CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)] {
|
||||
// CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)] {
|
||||
// CHECK:STDOUT: %T.ref.loc14: %Destroy.type = name_ref T, %T.loc4_16.2 [template = %T.loc4_16.1 (constants.%T.0e7)]
|
||||
// CHECK:STDOUT: %T.as_type.loc14: type = facet_access_type %T.ref.loc14 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: %.loc14_17.2: type = converted %T.ref.loc14, %T.as_type.loc14 [template = %T.as_type.loc4_36.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: %T.as_type.loc14: type = facet_access_type %T.ref.loc14 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: %.loc14_17.2: type = converted %T.ref.loc14, %T.as_type.loc14 [template = %T.as_type.loc4_35.1 (constants.%T.as_type.700)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v: ref @F.%T.as_type.loc4_36.1 (%T.as_type.700) = wrapper_binding v, %v.var
|
||||
// CHECK:STDOUT: %v: ref @F.%T.as_type.loc4_35.1 (%T.as_type.700) = wrapper_binding v, %v.var
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v.patt.loc14_15.1: @F.%pattern_type (%pattern_type.f4e485.2) = ref_binding_pattern v [template = %v.patt.loc14_15.2 (constants.%v.patt)]
|
||||
// CHECK:STDOUT: %v.var_patt.loc14_3.1: @F.%pattern_type (%pattern_type.f4e485.2) = var_pattern %v.patt.loc14_15.1 [template = %v.var_patt.loc14_3.2 (constants.%v.var_patt)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %w.var: ref %i32 = var_storage %w.var_patt
|
||||
// CHECK:STDOUT: %x.ref: @F.%T.as_type.loc4_36.1 (%T.as_type.700) = name_ref x, %x
|
||||
// CHECK:STDOUT: %x.ref: @F.%T.as_type.loc4_35.1 (%T.as_type.700) = name_ref x, %x
|
||||
// CHECK:STDOUT: %.loc22: %i32 = converted %x.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: assign %w.var, <error>
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
@@ -423,9 +423,9 @@ fn F[template T:! Core.Destroy](x: T) {
|
||||
// CHECK:STDOUT: specific @F(constants.%T.0e7) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_16.2 => constants.%T.patt.351
|
||||
// CHECK:STDOUT: %T.loc4_16.1 => constants.%T.0e7
|
||||
// CHECK:STDOUT: %T.as_type.loc4_36.1 => constants.%T.as_type.700
|
||||
// CHECK:STDOUT: %T.as_type.loc4_35.1 => constants.%T.as_type.700
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.f4e485.2
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_34.2 => constants.%x.param_patt
|
||||
// CHECK:STDOUT: %x.patt.loc4_34.2 => constants.%x.patt
|
||||
// CHECK:STDOUT: %x.param_patt.loc4_33.2 => constants.%x.param_patt
|
||||
// CHECK:STDOUT: %x.patt.loc4_33.2 => constants.%x.patt
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+76
-76
@@ -15,7 +15,7 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn F[template T:! type](x: T**) -> T* {
|
||||
fn F[template T: type](x: T**) -> T* {
|
||||
return *x;
|
||||
}
|
||||
//@dump-sem-ir-end
|
||||
@@ -25,7 +25,7 @@ fn F[template T:! type](x: T**) -> T* {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn F(template T:! type, U:! type) -> (T, U) {
|
||||
fn F(template T: type, generic U: type) -> (T, U) {
|
||||
return F(T, U);
|
||||
}
|
||||
//@dump-sem-ir-end
|
||||
@@ -65,60 +65,60 @@ fn F(template T:! type, U:! type) -> (T, U) {
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc5_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc5_26.1: @F.%pattern_type.loc5_26 (%pattern_type.8bb) = value_param_pattern [template = %x.param_patt.loc5_26.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc5_26.1: @F.%pattern_type.loc5_26 (%pattern_type.8bb) = at_binding_pattern x, %x.param_patt.loc5_26.1 [template = %x.patt.loc5_26.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_37.1: @F.%pattern_type.loc5_37 (%pattern_type.4f4b84.1) = out_param_pattern [template = %return.param_patt.loc5_37.2 (constants.%return.param_patt.27f587.1)]
|
||||
// CHECK:STDOUT: %return.patt.loc5_33.1: @F.%pattern_type.loc5_37 (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc5_37.1, %ptr.loc5_37 [template = %return.patt.loc5_33.2 (constants.%return.patt.d67)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc5_25.1: @F.%pattern_type.loc5_25 (%pattern_type.8bb) = value_param_pattern [template = %x.param_patt.loc5_25.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc5_25.1: @F.%pattern_type.loc5_25 (%pattern_type.8bb) = at_binding_pattern x, %x.param_patt.loc5_25.1 [template = %x.patt.loc5_25.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_36.1: @F.%pattern_type.loc5_36 (%pattern_type.4f4b84.1) = out_param_pattern [template = %return.param_patt.loc5_36.2 (constants.%return.param_patt.27f587.1)]
|
||||
// CHECK:STDOUT: %return.patt.loc5_32.1: @F.%pattern_type.loc5_36 (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc5_36.1, %ptr.loc5_36 [template = %return.patt.loc5_32.2 (constants.%return.patt.d67)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc5_36: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %ptr.loc5_37: type = ptr_type %T.ref.loc5_36 [template = %ptr.loc5_29.1 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %ptr.loc5_37 [template = %.loc5_37.1 (constants.%.cb6cb9.1)]
|
||||
// CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %T.ref.loc5_35: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %ptr.loc5_36: type = ptr_type %T.ref.loc5_35 [template = %ptr.loc5_28.1 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %.loc5_36.2: Core.Form = init_form %ptr.loc5_36 [template = %.loc5_36.1 (constants.%.cb6cb9.1)]
|
||||
// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc5_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc5_16.2: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %x.param: @F.%ptr.loc5_30.1 (%ptr.125) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_30: type = splice_block %ptr.loc5_30.2 [template = %ptr.loc5_30.1 (constants.%ptr.125)] {
|
||||
// CHECK:STDOUT: %T.ref.loc5_28: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %ptr.loc5_29.2: type = ptr_type %T.ref.loc5_28 [template = %ptr.loc5_29.1 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %ptr.loc5_30.2: type = ptr_type %ptr.loc5_29.2 [template = %ptr.loc5_30.1 (constants.%ptr.125)]
|
||||
// CHECK:STDOUT: %x.param: @F.%ptr.loc5_29.1 (%ptr.125) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_29: type = splice_block %ptr.loc5_29.2 [template = %ptr.loc5_29.1 (constants.%ptr.125)] {
|
||||
// CHECK:STDOUT: %T.ref.loc5_27: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %ptr.loc5_28.2: type = ptr_type %T.ref.loc5_27 [template = %ptr.loc5_28.1 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %ptr.loc5_29.2: type = ptr_type %ptr.loc5_28.2 [template = %ptr.loc5_29.1 (constants.%ptr.125)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: @F.%ptr.loc5_30.1 (%ptr.125) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: %return.param: ref @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = return_slot %return.param
|
||||
// CHECK:STDOUT: %x: @F.%ptr.loc5_29.1 (%ptr.125) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: %return.param: ref @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc5_16.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc5_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.d47011.1)]
|
||||
// CHECK:STDOUT: %T.loc5_16.1: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T.67db0b.1)]
|
||||
// CHECK:STDOUT: %ptr.loc5_29.1: type = ptr_type %T.loc5_16.1 [template = %ptr.loc5_29.1 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %ptr.loc5_30.1: type = ptr_type %ptr.loc5_29.1 [template = %ptr.loc5_30.1 (constants.%ptr.125)]
|
||||
// CHECK:STDOUT: %pattern_type.loc5_26: type = pattern_type %ptr.loc5_30.1 [template = %pattern_type.loc5_26 (constants.%pattern_type.8bb)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc5_26.2: @F.%pattern_type.loc5_26 (%pattern_type.8bb) = value_param_pattern [template = %x.param_patt.loc5_26.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc5_26.2: @F.%pattern_type.loc5_26 (%pattern_type.8bb) = at_binding_pattern x, %x.param_patt.loc5_26.2 [template = %x.patt.loc5_26.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT: %.loc5_37.1: Core.Form = init_form %ptr.loc5_29.1 [template = %.loc5_37.1 (constants.%.cb6cb9.1)]
|
||||
// CHECK:STDOUT: %pattern_type.loc5_37: type = pattern_type %ptr.loc5_29.1 [template = %pattern_type.loc5_37 (constants.%pattern_type.4f4b84.1)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_37.2: @F.%pattern_type.loc5_37 (%pattern_type.4f4b84.1) = out_param_pattern [template = %return.param_patt.loc5_37.2 (constants.%return.param_patt.27f587.1)]
|
||||
// CHECK:STDOUT: %return.patt.loc5_33.2: @F.%pattern_type.loc5_37 (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc5_37.2, %ptr.loc5_29.1 [template = %return.patt.loc5_33.2 (constants.%return.patt.d67)]
|
||||
// CHECK:STDOUT: %ptr.loc5_28.1: type = ptr_type %T.loc5_16.1 [template = %ptr.loc5_28.1 (constants.%ptr.e8f8f9.1)]
|
||||
// CHECK:STDOUT: %ptr.loc5_29.1: type = ptr_type %ptr.loc5_28.1 [template = %ptr.loc5_29.1 (constants.%ptr.125)]
|
||||
// CHECK:STDOUT: %pattern_type.loc5_25: type = pattern_type %ptr.loc5_29.1 [template = %pattern_type.loc5_25 (constants.%pattern_type.8bb)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc5_25.2: @F.%pattern_type.loc5_25 (%pattern_type.8bb) = value_param_pattern [template = %x.param_patt.loc5_25.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc5_25.2: @F.%pattern_type.loc5_25 (%pattern_type.8bb) = at_binding_pattern x, %x.param_patt.loc5_25.2 [template = %x.patt.loc5_25.2 (constants.%x.patt)]
|
||||
// CHECK:STDOUT: %.loc5_36.1: Core.Form = init_form %ptr.loc5_28.1 [template = %.loc5_36.1 (constants.%.cb6cb9.1)]
|
||||
// CHECK:STDOUT: %pattern_type.loc5_36: type = pattern_type %ptr.loc5_28.1 [template = %pattern_type.loc5_36 (constants.%pattern_type.4f4b84.1)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_36.2: @F.%pattern_type.loc5_36 (%pattern_type.4f4b84.1) = out_param_pattern [template = %return.param_patt.loc5_36.2 (constants.%return.param_patt.27f587.1)]
|
||||
// CHECK:STDOUT: %return.patt.loc5_32.2: @F.%pattern_type.loc5_36 (%pattern_type.4f4b84.1) = return_slot_pattern %return.param_patt.loc5_36.2, %ptr.loc5_28.1 [template = %return.patt.loc5_32.2 (constants.%return.patt.d67)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete.loc5_26: <witness> = require_complete_type %ptr.loc5_30.1 [template = %require_complete.loc5_26 (constants.%require_complete.fbe)]
|
||||
// CHECK:STDOUT: %require_complete.loc5_33: <witness> = require_complete_type %ptr.loc5_29.1 [template = %require_complete.loc5_33 (constants.%require_complete.ef162c.1)]
|
||||
// CHECK:STDOUT: %require_complete.loc5_25: <witness> = require_complete_type %ptr.loc5_29.1 [template = %require_complete.loc5_25 (constants.%require_complete.fbe)]
|
||||
// CHECK:STDOUT: %require_complete.loc5_32: <witness> = require_complete_type %ptr.loc5_28.1 [template = %require_complete.loc5_32 (constants.%require_complete.ef162c.1)]
|
||||
// CHECK:STDOUT: %.loc6_10.5: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc5_16.1) [template = %.loc6_10.5 (constants.%.0e9)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc5_29.1, @Copy [template = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc6_10.3: %Copy.type = facet_value %ptr.loc5_29.1, (%Copy.lookup_impl_witness) [template = %Copy.facet.loc6_10.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc5_28.1, @Copy [template = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc6_10.3: %Copy.type = facet_value %ptr.loc5_28.1, (%Copy.lookup_impl_witness) [template = %Copy.facet.loc6_10.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc6_10.3) [template = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.884)]
|
||||
// CHECK:STDOUT: %.loc6_10.6: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc6_10.3 [template = %.loc6_10.6 (constants.%.be5)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.6 (%.be5) = impl_witness_access %Copy.lookup_impl_witness, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: <specific function> = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%Copy.facet.loc6_10.3) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.a76)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%x.param: @F.%ptr.loc5_30.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) {
|
||||
// CHECK:STDOUT: fn(%x.param: @F.%ptr.loc5_29.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: @F.%ptr.loc5_30.1 (%ptr.125) = name_ref x, %x
|
||||
// CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = deref %x.ref
|
||||
// CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = acquire_value %.loc6_10.1
|
||||
// CHECK:STDOUT: %x.ref: @F.%ptr.loc5_29.1 (%ptr.125) = name_ref x, %x
|
||||
// CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = deref %x.ref
|
||||
// CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = acquire_value %.loc6_10.1
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.6 (%.be5) = impl_witness_access constants.%Copy.lookup_impl_witness.1da, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.484)]
|
||||
// CHECK:STDOUT: %bound_method.loc6_10.1: <bound method> = bound_method %.loc6_10.2, %impl.elem0.loc6_10.1
|
||||
// CHECK:STDOUT: %Copy.facet.loc6_10.1: %Copy.type = facet_value constants.%ptr.e8f8f9.1, (constants.%Copy.lookup_impl_witness.1da) [template = %Copy.facet.loc6_10.3 (constants.%Copy.facet)]
|
||||
@@ -127,7 +127,7 @@ fn F(template T:! type, U:! type) -> (T, U) {
|
||||
// CHECK:STDOUT: %.loc6_10.4: %Copy.type = converted constants.%ptr.e8f8f9.1, %Copy.facet.loc6_10.2 [template = %Copy.facet.loc6_10.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: <specific function> = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.a76)]
|
||||
// CHECK:STDOUT: %bound_method.loc6_10.2: <bound method> = bound_method %.loc6_10.2, %specific_impl_fn.loc6_10.1
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = call %bound_method.loc6_10.2(%.loc6_10.2)
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc5_28.1 (%ptr.e8f8f9.1) = call %bound_method.loc6_10.2(%.loc6_10.2)
|
||||
// CHECK:STDOUT: return %Copy.WithSelf.Op.call
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
@@ -137,15 +137,15 @@ fn F(template T:! type, U:! type) -> (T, U) {
|
||||
// CHECK:STDOUT: specific @F(constants.%T.67db0b.1) {
|
||||
// CHECK:STDOUT: %T.patt.loc5_16.2 => constants.%T.patt.d47011.1
|
||||
// CHECK:STDOUT: %T.loc5_16.1 => constants.%T.67db0b.1
|
||||
// CHECK:STDOUT: %ptr.loc5_29.1 => constants.%ptr.e8f8f9.1
|
||||
// CHECK:STDOUT: %ptr.loc5_30.1 => constants.%ptr.125
|
||||
// CHECK:STDOUT: %pattern_type.loc5_26 => constants.%pattern_type.8bb
|
||||
// CHECK:STDOUT: %x.param_patt.loc5_26.2 => constants.%x.param_patt
|
||||
// CHECK:STDOUT: %x.patt.loc5_26.2 => constants.%x.patt
|
||||
// CHECK:STDOUT: %.loc5_37.1 => constants.%.cb6cb9.1
|
||||
// CHECK:STDOUT: %pattern_type.loc5_37 => constants.%pattern_type.4f4b84.1
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_37.2 => constants.%return.param_patt.27f587.1
|
||||
// CHECK:STDOUT: %return.patt.loc5_33.2 => constants.%return.patt.d67
|
||||
// CHECK:STDOUT: %ptr.loc5_28.1 => constants.%ptr.e8f8f9.1
|
||||
// CHECK:STDOUT: %ptr.loc5_29.1 => constants.%ptr.125
|
||||
// CHECK:STDOUT: %pattern_type.loc5_25 => constants.%pattern_type.8bb
|
||||
// CHECK:STDOUT: %x.param_patt.loc5_25.2 => constants.%x.param_patt
|
||||
// CHECK:STDOUT: %x.patt.loc5_25.2 => constants.%x.patt
|
||||
// CHECK:STDOUT: %.loc5_36.1 => constants.%.cb6cb9.1
|
||||
// CHECK:STDOUT: %pattern_type.loc5_36 => constants.%pattern_type.4f4b84.1
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_36.2 => constants.%return.param_patt.27f587.1
|
||||
// CHECK:STDOUT: %return.patt.loc5_32.2 => constants.%return.patt.d67
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- mixed.carbon
|
||||
@@ -174,54 +174,54 @@ fn F(template T:! type, U:! type) -> (T, U) {
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc5_16.1: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %U.patt.loc5_26.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_26.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_43.1: @F.%pattern_type (%pattern_type.eee) = out_param_pattern [template = %return.param_patt.loc5_43.2 (constants.%return.param_patt)]
|
||||
// CHECK:STDOUT: %return.patt.loc5_35.1: @F.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc5_43.1, %.loc5_43.4 [template = %return.patt.loc5_35.2 (constants.%return.patt)]
|
||||
// CHECK:STDOUT: %U.patt.loc5_33.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_33.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_49.1: @F.%pattern_type (%pattern_type.eee) = out_param_pattern [template = %return.param_patt.loc5_49.2 (constants.%return.param_patt)]
|
||||
// CHECK:STDOUT: %return.patt.loc5_41.1: @F.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc5_49.1, %.loc5_49.4 [template = %return.patt.loc5_41.2 (constants.%return.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc5: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %U.ref.loc5: type = name_ref U, %U.loc5_26.2 [symbolic = %U.loc5_26.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %.loc5_43.3: %tuple.type.24b = tuple_literal (%T.ref.loc5, %U.ref.loc5) [template = %tuple (constants.%tuple)]
|
||||
// CHECK:STDOUT: %.loc5_43.4: type = converted %.loc5_43.3, constants.%tuple.type.a5e [template = %tuple.type (constants.%tuple.type.a5e)]
|
||||
// CHECK:STDOUT: %.loc5_43.5: Core.Form = init_form %.loc5_43.4 [template = %.loc5_43.2 (constants.%.f18)]
|
||||
// CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %U.ref.loc5: type = name_ref U, %U.loc5_33.2 [symbolic = %U.loc5_33.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %.loc5_49.3: %tuple.type.24b = tuple_literal (%T.ref.loc5, %U.ref.loc5) [template = %tuple (constants.%tuple)]
|
||||
// CHECK:STDOUT: %.loc5_49.4: type = converted %.loc5_49.3, constants.%tuple.type.a5e [template = %tuple.type (constants.%tuple.type.a5e)]
|
||||
// CHECK:STDOUT: %.loc5_49.5: Core.Form = init_form %.loc5_49.4 [template = %.loc5_49.2 (constants.%.f18)]
|
||||
// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc5_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc5_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc5_16.2: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc5_29.1: type = splice_block %.loc5_29.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc5_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc5_29.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc5_35.1: type = splice_block %.loc5_35.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc5_33: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc5_35.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc5_26.2: type = symbolic_binding U, 1 [symbolic = %U.loc5_26.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.loc5_33.2: type = symbolic_binding U, 1 [symbolic = %U.loc5_33.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %return.param: ref @F.%tuple.type (%tuple.type.a5e) = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref @F.%tuple.type (%tuple.type.a5e) = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc5_16.2: type, %U.loc5_26.2: type) {
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc5_16.2: type, %U.loc5_33.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc5_16.2: %pattern_type.98f = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc5_16.1: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %U.patt.loc5_26.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_26.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %U.loc5_26.1: type = symbolic_binding U, 1 [symbolic = %U.loc5_26.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc5_16.1, %U.loc5_26.1) [template = %tuple (constants.%tuple)]
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc5_16.1, %U.loc5_26.1) [template = %tuple.type (constants.%tuple.type.a5e)]
|
||||
// CHECK:STDOUT: %.loc5_43.2: Core.Form = init_form %tuple.type [template = %.loc5_43.2 (constants.%.f18)]
|
||||
// CHECK:STDOUT: %U.patt.loc5_33.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc5_33.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %U.loc5_33.1: type = symbolic_binding U, 1 [symbolic = %U.loc5_33.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%T.loc5_16.1, %U.loc5_33.1) [template = %tuple (constants.%tuple)]
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (%T.loc5_16.1, %U.loc5_33.1) [template = %tuple.type (constants.%tuple.type.a5e)]
|
||||
// CHECK:STDOUT: %.loc5_49.2: Core.Form = init_form %tuple.type [template = %.loc5_49.2 (constants.%.f18)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [template = %pattern_type (constants.%pattern_type.eee)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_43.2: @F.%pattern_type (%pattern_type.eee) = out_param_pattern [template = %return.param_patt.loc5_43.2 (constants.%return.param_patt)]
|
||||
// CHECK:STDOUT: %return.patt.loc5_35.2: @F.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc5_43.2, %tuple.type [template = %return.patt.loc5_35.2 (constants.%return.patt)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_49.2: @F.%pattern_type (%pattern_type.eee) = out_param_pattern [template = %return.param_patt.loc5_49.2 (constants.%return.param_patt)]
|
||||
// CHECK:STDOUT: %return.patt.loc5_41.2: @F.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc5_49.2, %tuple.type [template = %return.patt.loc5_41.2 (constants.%return.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %tuple.type [template = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %F.specific_fn.loc6_10.2: <specific function> = specific_function constants.%F, @F(%T.loc5_16.1, %U.loc5_26.1) [template = %F.specific_fn.loc6_10.2 (constants.%F.specific_fn)]
|
||||
// CHECK:STDOUT: %F.specific_fn.loc6_10.2: <specific function> = specific_function constants.%F, @F(%T.loc5_16.1, %U.loc5_33.1) [template = %F.specific_fn.loc6_10.2 (constants.%F.specific_fn)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() -> out %return.param: @F.%tuple.type (%tuple.type.a5e) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %U.ref.loc6: type = name_ref U, %U.loc5_26.2 [symbolic = %U.loc5_26.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.ref.loc6: type = name_ref U, %U.loc5_33.2 [symbolic = %U.loc5_33.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %F.specific_fn.loc6_10.1: <specific function> = specific_function %F.ref, @F(constants.%T, constants.%U) [template = %F.specific_fn.loc6_10.2 (constants.%F.specific_fn)]
|
||||
// CHECK:STDOUT: %.loc5_43.1: ref @F.%tuple.type (%tuple.type.a5e) = splice_block %return.param {}
|
||||
// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.a5e) to %.loc5_43.1 = call %F.specific_fn.loc6_10.1()
|
||||
// CHECK:STDOUT: %.loc5_49.1: ref @F.%tuple.type (%tuple.type.a5e) = splice_block %return.param {}
|
||||
// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.a5e) to %.loc5_49.1 = call %F.specific_fn.loc6_10.1()
|
||||
// CHECK:STDOUT: return %F.call to %return.param
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
@@ -231,14 +231,14 @@ fn F(template T:! type, U:! type) -> (T, U) {
|
||||
// CHECK:STDOUT: specific @F(constants.%T, constants.%U) {
|
||||
// CHECK:STDOUT: %T.patt.loc5_16.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc5_16.1 => constants.%T
|
||||
// CHECK:STDOUT: %U.patt.loc5_26.2 => constants.%U.patt
|
||||
// CHECK:STDOUT: %U.loc5_26.1 => constants.%U
|
||||
// CHECK:STDOUT: %U.patt.loc5_33.2 => constants.%U.patt
|
||||
// CHECK:STDOUT: %U.loc5_33.1 => constants.%U
|
||||
// CHECK:STDOUT: %tuple => constants.%tuple
|
||||
// CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e
|
||||
// CHECK:STDOUT: %.loc5_43.2 => constants.%.f18
|
||||
// CHECK:STDOUT: %.loc5_49.2 => constants.%.f18
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.eee
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_43.2 => constants.%return.param_patt
|
||||
// CHECK:STDOUT: %return.patt.loc5_35.2 => constants.%return.patt
|
||||
// CHECK:STDOUT: %return.param_patt.loc5_49.2 => constants.%return.param_patt
|
||||
// CHECK:STDOUT: %return.patt.loc5_41.2 => constants.%return.patt
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete
|
||||
|
||||
+25
-25
@@ -19,7 +19,7 @@ impl i32 as I {
|
||||
}
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn TestOp[T:! I](unused var x: T) {}
|
||||
fn TestOp[T: I](unused var x: T) {}
|
||||
//@dump-sem-ir-end
|
||||
|
||||
fn Test(x: i32) {
|
||||
@@ -66,7 +66,7 @@ fn Test(x: i32) {
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type.d09: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete]
|
||||
// CHECK:STDOUT: %.7a6: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d09, %Copy.facet [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.4f6, @Int.as.Copy.impl.Op(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Destroy.Op.type.1d8f74.2: type = fn_type @Destroy.Op.loc22_25.2 [concrete]
|
||||
// CHECK:STDOUT: %Destroy.Op.type.1d8f74.2: type = fn_type @Destroy.Op.loc22_24.2 [concrete]
|
||||
// CHECK:STDOUT: %Destroy.Op.1a2547.2: %Destroy.Op.type.1d8f74.2 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -78,36 +78,36 @@ fn Test(x: i32) {
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %TestOp.decl: %TestOp.type = fn_decl @TestOp [concrete = constants.%TestOp] {
|
||||
// CHECK:STDOUT: %T.patt.loc22_12.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_12.2 (constants.%T.patt.1df)]
|
||||
// CHECK:STDOUT: %x.patt.loc22_30.1: @TestOp.%pattern_type (%pattern_type.b3a) = ref_binding_pattern x [symbolic = %x.patt.loc22_30.2 (constants.%x.patt.414)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc22_25.1: @TestOp.%pattern_type (%pattern_type.b3a) = var_param_pattern %x.patt.loc22_30.1 [symbolic = %x.param_patt.loc22_25.2 (constants.%x.param_patt.1e1)]
|
||||
// CHECK:STDOUT: %x.patt.loc22_29.1: @TestOp.%pattern_type (%pattern_type.b3a) = ref_binding_pattern x [symbolic = %x.patt.loc22_29.2 (constants.%x.patt.414)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc22_24.1: @TestOp.%pattern_type (%pattern_type.b3a) = var_param_pattern %x.patt.loc22_29.1 [symbolic = %x.param_patt.loc22_24.2 (constants.%x.param_patt.1e1)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc22_15: type = splice_block %I.ref [concrete = constants.%I.type] {
|
||||
// CHECK:STDOUT: %.loc22_14: 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.loc22_12.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc22_12.1 (constants.%T.dda)]
|
||||
// CHECK:STDOUT: %x.param: ref @TestOp.%T.as_type.loc22_32.1 (%T.as_type.b38) = ref_param call_param0
|
||||
// CHECK:STDOUT: %.loc22_32.1: type = splice_block %.loc22_32.2 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.b38)] {
|
||||
// CHECK:STDOUT: %x.param: ref @TestOp.%T.as_type.loc22_31.1 (%T.as_type.b38) = ref_param call_param0
|
||||
// CHECK:STDOUT: %.loc22_31.1: type = splice_block %.loc22_31.2 [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.b38)] {
|
||||
// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc22_12.2 [symbolic = %T.loc22_12.1 (constants.%T.dda)]
|
||||
// CHECK:STDOUT: %T.as_type.loc22_32.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %.loc22_32.2: type = converted %T.ref, %T.as_type.loc22_32.2 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %T.as_type.loc22_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %.loc22_31.2: type = converted %T.ref, %T.as_type.loc22_31.2 [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref @TestOp.%T.as_type.loc22_32.1 (%T.as_type.b38) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: %x: ref @TestOp.%T.as_type.loc22_31.1 (%T.as_type.b38) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @TestOp(%T.loc22_12.2: %I.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc22_12.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_12.2 (constants.%T.patt.1df)]
|
||||
// CHECK:STDOUT: %T.loc22_12.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc22_12.1 (constants.%T.dda)]
|
||||
// CHECK:STDOUT: %T.as_type.loc22_32.1: type = facet_access_type %T.loc22_12.1 [symbolic = %T.as_type.loc22_32.1 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_32.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)]
|
||||
// CHECK:STDOUT: %x.patt.loc22_30.2: @TestOp.%pattern_type (%pattern_type.b3a) = ref_binding_pattern x [symbolic = %x.patt.loc22_30.2 (constants.%x.patt.414)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc22_25.2: @TestOp.%pattern_type (%pattern_type.b3a) = var_param_pattern %x.patt.loc22_30.2 [symbolic = %x.param_patt.loc22_25.2 (constants.%x.param_patt.1e1)]
|
||||
// CHECK:STDOUT: %T.as_type.loc22_31.1: type = facet_access_type %T.loc22_12.1 [symbolic = %T.as_type.loc22_31.1 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_31.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)]
|
||||
// CHECK:STDOUT: %x.patt.loc22_29.2: @TestOp.%pattern_type (%pattern_type.b3a) = ref_binding_pattern x [symbolic = %x.patt.loc22_29.2 (constants.%x.patt.414)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc22_24.2: @TestOp.%pattern_type (%pattern_type.b3a) = var_param_pattern %x.patt.loc22_29.2 [symbolic = %x.param_patt.loc22_24.2 (constants.%x.param_patt.1e1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc22_32.1 [symbolic = %require_complete (constants.%require_complete.27c)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc22_31.1 [symbolic = %require_complete (constants.%require_complete.27c)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%x.param: ref @TestOp.%T.as_type.loc22_32.1 (%T.as_type.b38)) {
|
||||
// CHECK:STDOUT: fn(%x.param: ref @TestOp.%T.as_type.loc22_31.1 (%T.as_type.b38)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT:
|
||||
@@ -129,7 +129,7 @@ fn Test(x: i32) {
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc27_10.2: <bound method> = bound_method %x.ref, %specific_fn
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc27_10.2(%x.ref)
|
||||
// CHECK:STDOUT: %x.var: ref %i32 = var_storage @TestOp.%x.param_patt.loc22_25.1
|
||||
// CHECK:STDOUT: %x.var: ref %i32 = var_storage @TestOp.%x.param_patt.loc22_24.1
|
||||
// CHECK:STDOUT: assign %x.var, %Int.as.Copy.impl.Op.call
|
||||
// CHECK:STDOUT: %TestOp.call: init %empty_tuple.type = call %TestOp.specific_fn(%x.var)
|
||||
// CHECK:STDOUT: %Destroy.Op.bound: <bound method> = bound_method %x.var, constants.%Destroy.Op.1a2547.2
|
||||
@@ -139,9 +139,9 @@ fn Test(x: i32) {
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Destroy.Op.loc22_25.1(%self.param: ref %i32.builtin) = "no_op";
|
||||
// CHECK:STDOUT: fn @Destroy.Op.loc22_24.1(%self.param: ref %i32.builtin) = "no_op";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Destroy.Op.loc22_25.2(%self.param: ref %i32) {
|
||||
// CHECK:STDOUT: fn @Destroy.Op.loc22_24.2(%self.param: ref %i32) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT:
|
||||
@@ -151,19 +151,19 @@ fn Test(x: i32) {
|
||||
// CHECK:STDOUT: specific @TestOp(constants.%T.dda) {
|
||||
// CHECK:STDOUT: %T.patt.loc22_12.2 => constants.%T.patt.1df
|
||||
// CHECK:STDOUT: %T.loc22_12.1 => constants.%T.dda
|
||||
// CHECK:STDOUT: %T.as_type.loc22_32.1 => constants.%T.as_type.b38
|
||||
// CHECK:STDOUT: %T.as_type.loc22_31.1 => constants.%T.as_type.b38
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a
|
||||
// CHECK:STDOUT: %x.patt.loc22_30.2 => constants.%x.patt.414
|
||||
// CHECK:STDOUT: %x.param_patt.loc22_25.2 => constants.%x.param_patt.1e1
|
||||
// CHECK:STDOUT: %x.patt.loc22_29.2 => constants.%x.patt.414
|
||||
// CHECK:STDOUT: %x.param_patt.loc22_24.2 => constants.%x.param_patt.1e1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @TestOp(constants.%I.facet) {
|
||||
// CHECK:STDOUT: %T.patt.loc22_12.2 => constants.%T.patt.1df
|
||||
// CHECK:STDOUT: %T.loc22_12.1 => constants.%I.facet
|
||||
// CHECK:STDOUT: %T.as_type.loc22_32.1 => constants.%i32
|
||||
// CHECK:STDOUT: %T.as_type.loc22_31.1 => constants.%i32
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6b6
|
||||
// CHECK:STDOUT: %x.patt.loc22_30.2 => constants.%x.patt.aaf
|
||||
// CHECK:STDOUT: %x.param_patt.loc22_25.2 => constants.%x.param_patt.8f9
|
||||
// CHECK:STDOUT: %x.patt.loc22_29.2 => constants.%x.patt.aaf
|
||||
// CHECK:STDOUT: %x.param_patt.loc22_24.2 => constants.%x.param_patt.8f9
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
|
||||
|
||||
Reference in New Issue
Block a user