mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 08:32:39 +00: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:
1 parent
bf106c3b4b
commit
8be274cf60
482 files changed
+16917
-16226
No files matched your search
+48
-48
@@ -17,7 +17,7 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let V:! Self;
|
||||
let V: Self;
|
||||
}
|
||||
|
||||
impl {} as I where .V = {} {}
|
||||
@@ -29,7 +29,7 @@ impl i32 as I where .V = 0 {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let V:! Self;
|
||||
let V: Self;
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_assoc_const_mismatch.carbon:[[@LINE+7]]:12: error: cannot implicitly convert expression of type `Core.IntLiteral` to `{}` [ConversionFailure]
|
||||
@@ -46,7 +46,7 @@ impl {} as I where .V = 0 {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let V:! Self;
|
||||
let V: Self;
|
||||
}
|
||||
|
||||
class C {}
|
||||
@@ -65,16 +65,16 @@ impl C as I where .V = () {}
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(N:! Core.IntLiteral) {
|
||||
let V:! array(Self, N);
|
||||
interface I(N: Core.IntLiteral) {
|
||||
let V: array(Self, N);
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+7]]:24: error: member access into facet of incomplete type `I(-1)` [IncompleteTypeInMemberAccessOfFacet]
|
||||
// CHECK:STDERR: impl {} as I(-1) where .V = () {}
|
||||
// CHECK:STDERR: ^~
|
||||
// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE-6]]:17: note: array bound of -1 is negative [ArrayBoundNegative]
|
||||
// CHECK:STDERR: let V:! array(Self, N);
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE-6]]:16: note: array bound of -1 is negative [ArrayBoundNegative]
|
||||
// CHECK:STDERR: let V: array(Self, N);
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
impl {} as I(-1) where .V = () {}
|
||||
|
||||
@@ -83,19 +83,19 @@ impl {} as I(-1) where .V = () {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let V:! Self;
|
||||
let V: Self;
|
||||
}
|
||||
|
||||
fn F(T:! I where {} impls Core.ImplicitAs(.Self) and .V = {});
|
||||
fn F(generic T: I where {} impls Core.ImplicitAs(.Self) and .V = {});
|
||||
|
||||
fn CallF() {
|
||||
// TODO: This call should eventually work.
|
||||
// CHECK:STDERR: fail_todo_constrained_fn.carbon:[[@LINE+7]]:3: error: cannot convert type `{}` into type implementing `I where {} impls Core.ImplicitAs(.Self) and .(I.V) = {}` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: F({});
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR: fail_todo_constrained_fn.carbon:[[@LINE-7]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
||||
// CHECK:STDERR: fn F(T:! I where {} impls Core.ImplicitAs(.Self) and .V = {});
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_constrained_fn.carbon:[[@LINE-7]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
||||
// CHECK:STDERR: fn F(generic T: I where {} impls Core.ImplicitAs(.Self) and .V = {});
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
F({});
|
||||
}
|
||||
@@ -718,10 +718,10 @@ fn CallF() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%N.loc4_14.1)> [symbolic = %I.type (constants.%I.type.ac2)]
|
||||
// CHECK:STDOUT: %Self.loc4_34.2: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.4d2)]
|
||||
// CHECK:STDOUT: %Self.loc4_33.2: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.4d2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc4_34.1: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.4d2)]
|
||||
// CHECK:STDOUT: %Self.loc4_33.1: @I.%I.type (%I.type.ac2) = symbolic_binding Self, 1 [symbolic = %Self.loc4_33.2 (constants.%Self.4d2)]
|
||||
// CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -730,7 +730,7 @@ fn CallF() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_34.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_33.1
|
||||
// CHECK:STDOUT: .N = <poisoned>
|
||||
// CHECK:STDOUT: .N = <poisoned>
|
||||
// CHECK:STDOUT: .V = @V.%assoc0
|
||||
@@ -761,7 +761,7 @@ fn CallF() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %I.type => constants.%I.type.ce3
|
||||
// CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.4a1
|
||||
// CHECK:STDOUT: %Self.loc4_33.2 => constants.%Self.4a1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf(constants.%int_-1, constants.%Self.4d2) {
|
||||
@@ -829,42 +829,42 @@ fn CallF() {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.692 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.692 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = constants.%I_where.type.14de72.1] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc8_7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.2 [concrete = constants.%I_where.type.14de72.1] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc8_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc8_12: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc8_19: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete]
|
||||
// CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.0ff = name_ref ImplicitAs, imports.%Core.ImplicitAs [concrete = constants.%ImplicitAs.generic]
|
||||
// CHECK:STDOUT: %.Self.ref.loc8_43: %I.type = name_ref .Self, %.Self.frozen.loc8_12 [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %.Self.as_type.loc8_48: type = facet_access_type %.Self.ref.loc8_43 [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %.loc8_48: type = converted %.Self.ref.loc8_43, %.Self.as_type.loc8_48 [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.loc8_48.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.frozen.as_type)> [symbolic_self = constants.%ImplicitAs.type.acb]
|
||||
// CHECK:STDOUT: %.loc8_19.2: type = converted %.loc8_19.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %impls.loc8_21.1 = requirement_impls %.loc8_19.2, %ImplicitAs.type.loc8_48.1 [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref.loc8_54: %I.type = name_ref .Self, %.Self.frozen.loc8_12 [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %.Self.as_type.loc8_54: type = facet_access_type %.Self.ref.loc8_54 [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %.loc8_54: type = converted %.Self.ref.loc8_54, %.Self.as_type.loc8_54 [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %.Self.ref.loc8_50: %I.type = name_ref .Self, %.Self.frozen.loc8_19 [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %.Self.as_type.loc8_55: type = facet_access_type %.Self.ref.loc8_50 [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %.loc8_55: type = converted %.Self.ref.loc8_50, %.Self.as_type.loc8_55 [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.loc8_55.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.frozen.as_type)> [symbolic_self = constants.%ImplicitAs.type.acb]
|
||||
// CHECK:STDOUT: %.loc8_26.2: type = converted %.loc8_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %impls.loc8_28.1 = requirement_impls %.loc8_26.2, %ImplicitAs.type.loc8_55.1 [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref.loc8_61: %I.type = name_ref .Self, %.Self.frozen.loc8_19 [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %.Self.as_type.loc8_61: type = facet_access_type %.Self.ref.loc8_61 [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %.loc8_61: type = converted %.Self.ref.loc8_61, %.Self.as_type.loc8_61 [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.660]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8_54.1: %.Self.frozen.as_type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.cba]
|
||||
// CHECK:STDOUT: %.loc8_60.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8_61.1: %.Self.frozen.as_type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.cba]
|
||||
// CHECK:STDOUT: %.loc8_67.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_60.2: %empty_struct_type = converted %.loc8_60.1, %empty_struct [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %rewrite.loc8_57.1 = requirement_rewrite %impl.elem0.loc8_54.1, %.loc8_60.2 [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.loc8_48.2: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.as_type)> [symbolic_self = constants.%ImplicitAs.type.418]
|
||||
// CHECK:STDOUT: %impls.loc8_21.2 = requirement_impls %.loc8_19.2, %ImplicitAs.type.loc8_48.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8_54.2: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.e15]
|
||||
// CHECK:STDOUT: %rewrite.loc8_57.2 = requirement_rewrite %impl.elem0.loc8_54.2, %.loc8_60.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc8_12.2: type = where_expr [concrete = constants.%I_where.type.14de72.1] {
|
||||
// CHECK:STDOUT: %.loc8_67.2: %empty_struct_type = converted %.loc8_67.1, %empty_struct [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %rewrite.loc8_64.1 = requirement_rewrite %impl.elem0.loc8_61.1, %.loc8_67.2 [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.loc8_55.2: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.as_type)> [symbolic_self = constants.%ImplicitAs.type.418]
|
||||
// CHECK:STDOUT: %impls.loc8_28.2 = requirement_impls %.loc8_26.2, %ImplicitAs.type.loc8_55.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8_61.2: %.Self.as_type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.e15]
|
||||
// CHECK:STDOUT: %rewrite.loc8_64.2 = requirement_rewrite %impl.elem0.loc8_61.2, %.loc8_67.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc8_19.2: type = where_expr [concrete = constants.%I_where.type.14de72.1] {
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete]
|
||||
// CHECK:STDOUT: %impls.loc8_21.2 = requirement_impls %.loc8_19.2, %ImplicitAs.type.loc8_48.2 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc8_57.2 = requirement_rewrite %impl.elem0.loc8_54.2, %.loc8_60.2 [concrete]
|
||||
// CHECK:STDOUT: %impls.loc8_28.2 = requirement_impls %.loc8_26.2, %ImplicitAs.type.loc8_55.2 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc8_64.2 = requirement_rewrite %impl.elem0.loc8_61.2, %.loc8_67.2 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc8_7.2: %I_where.type.14de72.1 = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc8_15.2: %I_where.type.14de72.1 = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %CallF.decl: %CallF.type = fn_decl @CallF [concrete = constants.%CallF] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
@@ -888,9 +888,9 @@ fn CallF() {
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %I_where.type.14de72.1) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.692 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc8_7.1: %I_where.type.14de72.1 = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc8_15.2: %I_where.type.14de72.1) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.692 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc8_15.1: %I_where.type.14de72.1 = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn();
|
||||
// CHECK:STDOUT: }
|
||||
@@ -918,7 +918,7 @@ fn CallF() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc8_7.1 => constants.%T
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc8_15.1 => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+1
-1
@@ -66,7 +66,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
// CHECK:STDERR: fail_conflicting_bad_impls.carbon:[[@LINE+4]]:12: error: name `invalid` not found [NameNotFound]
|
||||
// CHECK:STDERR: final impl invalid as I {}
|
||||
|
||||
+8
-8
@@ -15,7 +15,7 @@
|
||||
// --- core.carbon
|
||||
package Core;
|
||||
|
||||
interface ImplicitAs(Dest:! type) {
|
||||
interface ImplicitAs(Dest: type) {
|
||||
fn Convert(self) -> Dest;
|
||||
}
|
||||
|
||||
@@ -154,9 +154,9 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.0ff = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] {
|
||||
// CHECK:STDOUT: %Dest.patt.loc3_26.1: %pattern_type.98f = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_26.2 (constants.%Dest.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc3_29.1: type = splice_block %.loc3_29.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc3_28.1: type = splice_block %.loc3_28.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc3_29.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc3_28.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Dest.loc3_26.2: type = symbolic_binding Dest, 0 [symbolic = %Dest.loc3_26.1 (constants.%Dest)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -168,10 +168,10 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_26.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)]
|
||||
// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.loc3_34.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %ImplicitAs.WithSelf.decl = interface_with_self_decl @ImplicitAs [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -185,7 +185,7 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: %.loc4_23.2: Core.Form = init_form %Dest.ref [symbolic = %.loc4_23.1 (constants.%.184)]
|
||||
// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc4_14.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.3 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc3_34.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = name_ref Self, %.loc4_14.2 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc4_14.3: type = converted %Self.ref, %Self.as_type.loc4_14.2 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)]
|
||||
@@ -197,7 +197,7 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: %assoc0.loc4_27.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc4_27.2 (constants.%assoc0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc3_35.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc3_34.1
|
||||
// CHECK:STDOUT: .Dest = <poisoned>
|
||||
// CHECK:STDOUT: .Dest = <poisoned>
|
||||
// CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc4_27.1
|
||||
@@ -209,7 +209,7 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_26.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) {
|
||||
// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_26.2: type, @ImplicitAs.%Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) {
|
||||
// CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)]
|
||||
// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)]
|
||||
|
||||
@@ -48,7 +48,7 @@ fn F() {
|
||||
// --- destroy_symbolic_int_type.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(N:! Core.IntLiteral) {
|
||||
fn F(generic N: Core.IntLiteral) {
|
||||
// This looks for a Destroy witness for a class type that adapts IntType with a
|
||||
// symbolic type.
|
||||
Core.Int(N) as Core.Destroy;
|
||||
@@ -57,7 +57,7 @@ fn F(N:! Core.IntLiteral) {
|
||||
// --- destroy_class_type.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
fn F() {
|
||||
// This looks for a Destroy witness for a class type.
|
||||
@@ -67,7 +67,7 @@ fn F() {
|
||||
// --- fail_destroy_incomplete_class.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C(T:! type);
|
||||
class C(T: type);
|
||||
|
||||
fn F() {
|
||||
// This looks for a Destroy witness for an incomplete class type.
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
|
||||
package Core;
|
||||
|
||||
interface FloatFitsIn(Dest:! type) {}
|
||||
interface FloatFitsIn(Dest: type) {}
|
||||
|
||||
fn CheckFitsIn[U:! type, T:! FloatFitsIn(U)](unused t: T, unused u: U) {}
|
||||
fn CheckFitsIn[U: type, T: FloatFitsIn(U)](unused t: T, unused u: U) {}
|
||||
|
||||
// --- valid.carbon
|
||||
|
||||
@@ -46,16 +46,16 @@ fn CheckFail() {
|
||||
// CHECK:STDERR: Core.CheckFitsIn(1.0 as f64, 2.0 as f32);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn CheckFitsIn[U:! type, T:! FloatFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn CheckFitsIn[U: type, T: FloatFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Core.CheckFitsIn(1.0 as f64, 2.0 as f32);
|
||||
// CHECK:STDERR: fail_narrowing.carbon:[[@LINE+7]]:3: error: cannot convert type `f32` into type implementing `Core.FloatFitsIn(f16)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Core.CheckFitsIn(1.0 as f32, 2.0 as f16);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn CheckFitsIn[U:! type, T:! FloatFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn CheckFitsIn[U: type, T: FloatFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Core.CheckFitsIn(1.0 as f32, 2.0 as f16);
|
||||
}
|
||||
+16
-16
@@ -14,9 +14,9 @@
|
||||
|
||||
package Core;
|
||||
|
||||
interface IntFitsIn(Dest:! type) {}
|
||||
interface IntFitsIn(Dest: type) {}
|
||||
|
||||
fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
|
||||
// --- valid.carbon
|
||||
|
||||
@@ -46,32 +46,32 @@ fn CheckFail() {
|
||||
// CHECK:STDERR: Core.CheckFitsIn(1 as i64, 2 as i32);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Core.CheckFitsIn(1 as i64, 2 as i32);
|
||||
// CHECK:STDERR: fail_narrowing.carbon:[[@LINE+7]]:3: error: cannot convert type `i64` into type implementing `Core.IntFitsIn(u32)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Core.CheckFitsIn(1 as i64, 2 as u32);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Core.CheckFitsIn(1 as i64, 2 as u32);
|
||||
// CHECK:STDERR: fail_narrowing.carbon:[[@LINE+7]]:3: error: cannot convert type `u64` into type implementing `Core.IntFitsIn(i32)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Core.CheckFitsIn(1 as u64, 2 as i32);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Core.CheckFitsIn(1 as u64, 2 as i32);
|
||||
// CHECK:STDERR: fail_narrowing.carbon:[[@LINE+7]]:3: error: cannot convert type `u64` into type implementing `Core.IntFitsIn(u32)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Core.CheckFitsIn(1 as u64, 2 as u32);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Core.CheckFitsIn(1 as u64, 2 as u32);
|
||||
}
|
||||
@@ -87,16 +87,16 @@ fn CheckFail() {
|
||||
// CHECK:STDERR: Core.CheckFitsIn(1 as u32, 2 as i32);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Core.CheckFitsIn(1 as u32, 2 as i32);
|
||||
// CHECK:STDERR: fail_same_size_sign_change.carbon:[[@LINE+7]]:3: error: cannot convert type `i32` into type implementing `Core.IntFitsIn(u32)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Core.CheckFitsIn(1 as i32, 2 as u32);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Core.CheckFitsIn(1 as i32, 2 as u32);
|
||||
}
|
||||
@@ -112,8 +112,8 @@ fn CheckFail() {
|
||||
// CHECK:STDERR: Core.CheckFitsIn(1 as i32, 2 as u32);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: core.carbon:6:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn CheckFitsIn[U:! type, T:! IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn CheckFitsIn[U: type, T: IntFitsIn(U)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Core.CheckFitsIn(1 as i32, 2 as u32);
|
||||
}
|
||||
+45
-45
@@ -18,10 +18,10 @@ interface I {}
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: fail_runtime_generic_param.carbon:[[@LINE+4]]:14: error: parameters of generic types must be constant [GenericParamMustBeConstant]
|
||||
// CHECK:STDERR: impl forall [T: type] C as I {}
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR: impl forall [runtime T: type] C as I {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T: type] C as I {}
|
||||
impl forall [runtime T: type] C as I {}
|
||||
//@dump-sem-ir-end
|
||||
|
||||
// --- fail_nonfinal_lookup_impl_witness_error_in_import.carbon
|
||||
@@ -29,15 +29,15 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {}
|
||||
// CHECK:STDERR: fail_nonfinal_lookup_impl_witness_error_in_import.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as Z;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as Z;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type] T as Z;
|
||||
impl forall [T: type] T as Z;
|
||||
|
||||
fn F(unused U:! Z) {}
|
||||
fn F(unused generic U: Z) {}
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn G(T:! type) {
|
||||
fn G(generic T: type) {
|
||||
// This makes a LookupImplWitness instruction, but future lookups (evaluation
|
||||
// of this instruction with a specific) will result in an error since the impl
|
||||
// is never defined and is left with an error as its witness at the end of the
|
||||
@@ -61,15 +61,15 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {}
|
||||
// CHECK:STDERR: fail_nonfinal_lookup_impl_witness_error.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as Z;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as Z;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type] T as Z;
|
||||
impl forall [T: type] T as Z;
|
||||
|
||||
fn F(unused U:! Z) {}
|
||||
fn F(unused generic U: Z) {}
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn G(T:! type) {
|
||||
fn G(generic T: type) {
|
||||
// This makes a LookupImplWitness instruction, but future lookups (evaluation
|
||||
// of this instruction with a specific) will fail with an error since the impl
|
||||
// is never defined and is left with an error as its witness at the end of the
|
||||
@@ -90,12 +90,12 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {}
|
||||
// CHECK:STDERR: fail_final_lookup_impl_witness_error.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as Z;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as Z;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type] T as Z;
|
||||
impl forall [T: type] T as Z;
|
||||
|
||||
fn F(unused U:! Z) {}
|
||||
fn F(unused generic U: Z) {}
|
||||
|
||||
fn G() {
|
||||
// This impl lookup resolves to a final witness, which poisons any future
|
||||
@@ -180,30 +180,30 @@ impl C as I {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %T.patt.loc13_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc13_10.1: type = splice_block %.loc13_10.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc13_17.1: type = splice_block %.loc13_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc13_10.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc13_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc13_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc13_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @G(%T.loc13_7.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc13_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc13_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: generic fn @G(%T.loc13_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc13_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.loc19_6.2: require_specific_def_type = require_specific_def @T.as.Z.impl(%T.loc13_7.1) [symbolic = %.loc19_6.2 (constants.%.7ae)]
|
||||
// CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc13_7.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %Z.facet.loc19_6.2: %Z.type = facet_value %T.loc13_7.1, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)]
|
||||
// CHECK:STDOUT: %.loc19_6.2: require_specific_def_type = require_specific_def @T.as.Z.impl(%T.loc13_15.1) [symbolic = %.loc19_6.2 (constants.%.7ae)]
|
||||
// CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc13_15.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %Z.facet.loc19_6.2: %Z.type = facet_value %T.loc13_15.1, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)]
|
||||
// CHECK:STDOUT: %F.specific_fn.loc19_3.2: <specific function> = specific_function constants.%F, @F(%Z.facet.loc19_6.2) [symbolic = %F.specific_fn.loc19_3.2 (constants.%F.specific_fn)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %Z.facet.loc19_6.1: %Z.type = facet_value %T.ref, (constants.%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)]
|
||||
// CHECK:STDOUT: %.loc19_6.1: %Z.type = converted %T.ref, %Z.facet.loc19_6.1 [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)]
|
||||
// CHECK:STDOUT: %F.specific_fn.loc19_3.1: <specific function> = specific_function %F.ref, @F(constants.%Z.facet) [symbolic = %F.specific_fn.loc19_3.2 (constants.%F.specific_fn)]
|
||||
@@ -215,8 +215,8 @@ impl C as I {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc13_7.1 => constants.%T
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc13_15.1 => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_nonfinal_lookup_impl_witness_error.carbon
|
||||
@@ -242,30 +242,30 @@ impl C as I {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %T.patt.loc13_7.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc13_10.1: type = splice_block %.loc13_10.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc13_17.1: type = splice_block %.loc13_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc13_10.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc13_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc13_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc13_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @G(%T.loc13_7.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc13_7.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc13_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: generic fn @G(%T.loc13_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc13_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc13_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.loc19_6.2: require_specific_def_type = require_specific_def @T.as.Z.impl(%T.loc13_7.1) [symbolic = %.loc19_6.2 (constants.%.7ae)]
|
||||
// CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc13_7.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %Z.facet.loc19_6.2: %Z.type = facet_value %T.loc13_7.1, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)]
|
||||
// CHECK:STDOUT: %.loc19_6.2: require_specific_def_type = require_specific_def @T.as.Z.impl(%T.loc13_15.1) [symbolic = %.loc19_6.2 (constants.%.7ae)]
|
||||
// CHECK:STDOUT: %Z.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc13_15.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %Z.facet.loc19_6.2: %Z.type = facet_value %T.loc13_15.1, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)]
|
||||
// CHECK:STDOUT: %F.specific_fn.loc19_3.2: <specific function> = specific_function constants.%F, @F(%Z.facet.loc19_6.2) [symbolic = %F.specific_fn.loc19_3.2 (constants.%F.specific_fn)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_7.2 [symbolic = %T.loc13_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %Z.facet.loc19_6.1: %Z.type = facet_value %T.ref, (constants.%Z.lookup_impl_witness) [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)]
|
||||
// CHECK:STDOUT: %.loc19_6.1: %Z.type = converted %T.ref, %Z.facet.loc19_6.1 [symbolic = %Z.facet.loc19_6.2 (constants.%Z.facet)]
|
||||
// CHECK:STDOUT: %F.specific_fn.loc19_3.1: <specific function> = specific_function %F.ref, @F(constants.%Z.facet) [symbolic = %F.specific_fn.loc19_3.2 (constants.%F.specific_fn)]
|
||||
@@ -277,13 +277,13 @@ impl C as I {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc13_7.1 => constants.%T
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc13_15.1 => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G(constants.%empty_tuple.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc13_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc13_7.1 => constants.%empty_tuple.type
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc13_15.1 => constants.%empty_tuple.type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %.loc19_6.2 => constants.%.d12
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C {
|
||||
|
||||
+20
-20
@@ -16,7 +16,7 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface HasF(T:! type) {
|
||||
interface HasF(T: type) {
|
||||
fn F() -> T;
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@ fn G(c: C) {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(T:! type) {
|
||||
interface I(T: type) {
|
||||
fn F(self, t: T);
|
||||
}
|
||||
|
||||
class X(U:! type) {
|
||||
class X(U: type) {
|
||||
extend impl as I(U) {
|
||||
fn F(unused self, unused t: U) { }
|
||||
}
|
||||
@@ -183,9 +183,9 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT: %HasF.decl: %HasF.type.c96 = interface_decl @HasF [concrete = constants.%HasF.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt.d47)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T.67d)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -207,10 +207,10 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_17.1)> [symbolic = %HasF.type (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.loc4_25.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -226,7 +226,7 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT: %assoc0.loc5_14.1: @HasF.WithSelf.%HasF.assoc_type (%HasF.assoc_type.ddf) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.e9a)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_26.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_25.1
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0.loc5_14.1
|
||||
@@ -287,7 +287,7 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT: extend @C.as.HasF.impl.%HasF.type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf)) {
|
||||
// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf)) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)]
|
||||
// CHECK:STDOUT: %.loc5_13.1: Core.Form = init_form %T [symbolic = %.loc5_13.1 (constants.%.184347.1)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d1c4.1)]
|
||||
@@ -411,7 +411,7 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %HasF.type => constants.%HasF.type.9e1
|
||||
// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.ef3
|
||||
// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.ef3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @HasF.WithSelf(constants.%Param, constants.%Self.822) {
|
||||
@@ -525,18 +525,18 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %X.decl: %X.type = class_decl @X [concrete = constants.%X.generic] {
|
||||
// CHECK:STDOUT: %U.patt.loc8_10.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_10.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc8_12.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc8_10.2: type = symbolic_binding U, 0 [symbolic = %U.loc8_10.1 (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -548,10 +548,10 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_14.1)> [symbolic = %I.type (constants.%I.type.3fe556.1)]
|
||||
// CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.1916c4.1)]
|
||||
// CHECK:STDOUT: %Self.loc4_22.2: @I.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self.1916c4.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.1916c4.1)]
|
||||
// CHECK:STDOUT: %Self.loc4_22.1: @I.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self.1916c4.1)]
|
||||
// CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -563,7 +563,7 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_8.1: type = splice_block %.loc5_8.3 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc5_8.2: @I.WithSelf.F.%I.type (%I.type.3fe556.1) = specific_constant @I.%Self.loc4_23.1, @I(constants.%T) [symbolic = %Self (constants.%Self.1916c4.1)]
|
||||
// CHECK:STDOUT: %.loc5_8.2: @I.WithSelf.F.%I.type (%I.type.3fe556.1) = specific_constant @I.%Self.loc4_22.1, @I(constants.%T) [symbolic = %Self (constants.%Self.1916c4.1)]
|
||||
// CHECK:STDOUT: %Self.ref: @I.WithSelf.F.%I.type (%I.type.3fe556.1) = name_ref Self, %.loc5_8.2 [symbolic = %Self (constants.%Self.1916c4.1)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_8.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_8.3: type = converted %Self.ref, %Self.as_type.loc5_8.2 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)]
|
||||
@@ -576,7 +576,7 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT: %assoc0.loc5_19.1: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71f2b.1) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc5_19.2 (constants.%assoc0.13b5f8.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_23.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_22.1
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc5_19.1
|
||||
@@ -655,7 +655,7 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_14.2: type, @I.%Self.loc4_23.1: @I.%I.type (%I.type.3fe556.1)) {
|
||||
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_14.2: type, @I.%Self.loc4_22.1: @I.%I.type (%I.type.3fe556.1)) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.3fe556.1)]
|
||||
// CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.3fe556.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.1916c4.1)]
|
||||
@@ -727,7 +727,7 @@ class X(U:! type) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %I.type => constants.%I.type.3fe556.2
|
||||
// CHECK:STDOUT: %Self.loc4_23.2 => constants.%Self.1916c4.2
|
||||
// CHECK:STDOUT: %Self.loc4_22.2 => constants.%Self.1916c4.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @X.as.I.impl(constants.%U) {
|
||||
|
||||
+19
-19
@@ -12,16 +12,16 @@
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_extend_impl_forall.carbon
|
||||
|
||||
interface GenericInterface(T:! type) {
|
||||
interface GenericInterface(T: type) {
|
||||
fn F(x: T);
|
||||
}
|
||||
|
||||
class C {
|
||||
// CHECK:STDERR: fail_extend_impl_forall.carbon:[[@LINE+4]]:3: error: cannot `extend` a parameterized `impl` [ExtendImplForall]
|
||||
// CHECK:STDERR: extend impl forall [T:! type] as GenericInterface(T) {
|
||||
// CHECK:STDERR: extend impl forall [T: type] as GenericInterface(T) {
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR:
|
||||
extend impl forall [T:! type] as GenericInterface(T) {
|
||||
extend impl forall [T: type] as GenericInterface(T) {
|
||||
fn F(unused x: T) {}
|
||||
}
|
||||
}
|
||||
@@ -62,9 +62,9 @@ class C {
|
||||
// CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.26e = interface_decl @GenericInterface [concrete = constants.%GenericInterface.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc15_29.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_29.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc15_32.1: type = splice_block %.loc15_32.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc15_31.1: type = splice_block %.loc15_31.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc15_32.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc15_31.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc15_29.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_29.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -77,10 +77,10 @@ class C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %GenericInterface.type: type = facet_type <@GenericInterface, @GenericInterface(%T.loc15_29.1)> [symbolic = %GenericInterface.type (constants.%GenericInterface.type.4e1)]
|
||||
// CHECK:STDOUT: %Self.loc15_38.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_38.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.loc15_37.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_37.2 (constants.%Self)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc15_38.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_38.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.loc15_37.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_37.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %GenericInterface.WithSelf.decl = interface_with_self_decl @GenericInterface [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -95,7 +95,7 @@ class C {
|
||||
// CHECK:STDOUT: %assoc0.loc16_13.1: @GenericInterface.WithSelf.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %GenericInterface.WithSelf.F.decl [symbolic = %assoc0.loc16_13.2 (constants.%assoc0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc15_38.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc15_37.1
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .F = @GenericInterface.WithSelf.%assoc0.loc16_13.1
|
||||
@@ -110,14 +110,14 @@ class C {
|
||||
// CHECK:STDOUT: generic impl @C.as.GenericInterface.impl(%T.loc24_24.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc24_24.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_24.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc24_24.1: type = symbolic_binding T, 0 [symbolic = %T.loc24_24.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %GenericInterface.type.loc24_54.1: type = facet_type <@GenericInterface, @GenericInterface(%T.loc24_24.1)> [symbolic = %GenericInterface.type.loc24_54.1 (constants.%GenericInterface.type.4e1)]
|
||||
// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_56.2: <witness> = impl_witness %GenericInterface.impl_witness_table, @C.as.GenericInterface.impl(%T.loc24_24.1) [symbolic = %GenericInterface.impl_witness.loc24_56.2 (constants.%GenericInterface.impl_witness)]
|
||||
// CHECK:STDOUT: %GenericInterface.type.loc24_53.1: type = facet_type <@GenericInterface, @GenericInterface(%T.loc24_24.1)> [symbolic = %GenericInterface.type.loc24_53.1 (constants.%GenericInterface.type.4e1)]
|
||||
// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_55.2: <witness> = impl_witness %GenericInterface.impl_witness_table, @C.as.GenericInterface.impl(%T.loc24_24.1) [symbolic = %GenericInterface.impl_witness.loc24_55.2 (constants.%GenericInterface.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %C.as.GenericInterface.impl.F.type: type = fn_type @C.as.GenericInterface.impl.F, @C.as.GenericInterface.impl(%T.loc24_24.1) [symbolic = %C.as.GenericInterface.impl.F.type (constants.%C.as.GenericInterface.impl.F.type)]
|
||||
// CHECK:STDOUT: %C.as.GenericInterface.impl.F: @C.as.GenericInterface.impl.%C.as.GenericInterface.impl.F.type (%C.as.GenericInterface.impl.F.type) = struct_value () [symbolic = %C.as.GenericInterface.impl.F (constants.%C.as.GenericInterface.impl.F)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc24_54.2 {
|
||||
// CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc24_53.2 {
|
||||
// CHECK:STDOUT: %C.as.GenericInterface.impl.F.decl: @C.as.GenericInterface.impl.%C.as.GenericInterface.impl.F.type (%C.as.GenericInterface.impl.F.type) = fn_decl @C.as.GenericInterface.impl.F [symbolic = @C.as.GenericInterface.impl.%C.as.GenericInterface.impl.F (constants.%C.as.GenericInterface.impl.F)] {
|
||||
// CHECK:STDOUT: %x.param_patt.loc25_18.1: @C.as.GenericInterface.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc25_18.2 (constants.%x.param_patt)]
|
||||
// CHECK:STDOUT: %x.patt.loc25_18.1: @C.as.GenericInterface.impl.F.%pattern_type (%pattern_type.51d) = at_binding_pattern x, %x.param_patt.loc25_18.1 [symbolic = %x.patt.loc25_18.2 (constants.%x.patt)]
|
||||
@@ -127,12 +127,12 @@ class C {
|
||||
// CHECK:STDOUT: %x: @C.as.GenericInterface.impl.F.%T (%T) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %GenericInterface.impl_witness_table = impl_witness_table (), @C.as.GenericInterface.impl [concrete]
|
||||
// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_56.1: <witness> = impl_witness %GenericInterface.impl_witness_table, @C.as.GenericInterface.impl(constants.%T) [symbolic = %GenericInterface.impl_witness.loc24_56.2 (constants.%GenericInterface.impl_witness)]
|
||||
// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_55.1: <witness> = impl_witness %GenericInterface.impl_witness_table, @C.as.GenericInterface.impl(constants.%T) [symbolic = %GenericInterface.impl_witness.loc24_55.2 (constants.%GenericInterface.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .F = %C.as.GenericInterface.impl.F.decl
|
||||
// CHECK:STDOUT: extend %GenericInterface.type.loc24_54.2
|
||||
// CHECK:STDOUT: extend %GenericInterface.type.loc24_53.2
|
||||
// CHECK:STDOUT: witness = <error>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
@@ -144,10 +144,10 @@ class C {
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.26e = name_ref GenericInterface, file.%GenericInterface.decl [concrete = constants.%GenericInterface.generic]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc24_24.2 [symbolic = %T.loc24_24.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %GenericInterface.type.loc24_54.2: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc24_54.1 (constants.%GenericInterface.type.4e1)]
|
||||
// CHECK:STDOUT: %.loc24_27.1: type = splice_block %.loc24_27.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %GenericInterface.type.loc24_53.2: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc24_53.1 (constants.%GenericInterface.type.4e1)]
|
||||
// CHECK:STDOUT: %.loc24_26.1: type = splice_block %.loc24_26.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc24_27.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc24_26.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc24_24.2: type = symbolic_binding T, 0 [symbolic = %T.loc24_24.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -160,7 +160,7 @@ class C {
|
||||
// CHECK:STDOUT: has_error
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @GenericInterface.WithSelf.F(@GenericInterface.%T.loc15_29.2: type, @GenericInterface.%Self.loc15_38.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1)) {
|
||||
// CHECK:STDOUT: generic fn @GenericInterface.WithSelf.F(@GenericInterface.%T.loc15_29.2: type, @GenericInterface.%Self.loc15_37.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.4e1)) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc16_9.2: @GenericInterface.WithSelf.F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc16_9.2 (constants.%x.param_patt)]
|
||||
@@ -212,8 +212,8 @@ class C {
|
||||
// CHECK:STDOUT: specific @C.as.GenericInterface.impl(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc24_24.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc24_24.1 => constants.%T
|
||||
// CHECK:STDOUT: %GenericInterface.type.loc24_54.1 => constants.%GenericInterface.type.4e1
|
||||
// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_56.2 => constants.%GenericInterface.impl_witness
|
||||
// CHECK:STDOUT: %GenericInterface.type.loc24_53.1 => constants.%GenericInterface.type.4e1
|
||||
// CHECK:STDOUT: %GenericInterface.impl_witness.loc24_55.2 => constants.%GenericInterface.impl_witness
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %C.as.GenericInterface.impl.F.type => constants.%C.as.GenericInterface.impl.F.type
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon
|
||||
|
||||
interface I { let T:! type; }
|
||||
interface I { let T: type; }
|
||||
|
||||
// CHECK:STDERR: fail_impl_bad_assoc_const.carbon:[[@LINE+7]]:1: error: associated constant T not given a value in impl of interface I [ImplAssociatedConstantNeedsValue]
|
||||
// CHECK:STDERR: impl () as I {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_bad_assoc_const.carbon:[[@LINE-5]]:19: note: associated constant declared here [AssociatedConstantHere]
|
||||
// CHECK:STDERR: interface I { let T:! type; }
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: interface I { let T: type; }
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl () as I {}
|
||||
|
||||
|
||||
+20
-20
@@ -14,7 +14,7 @@
|
||||
// CHECK:STDERR: fail_self_type_mismatch.carbon: error: cannot implicitly convert expression of type `C(i32 as I)` to `C(i32)` [ConversionFailure]
|
||||
// CHECK:STDERR: fail_self_type_mismatch.carbon: note: type `C(i32 as I)` does not implement interface `Core.ImplicitAs(C(i32))` [MissingImplInMemberAccessInContext]
|
||||
|
||||
class C[T:! type](X:! T) {}
|
||||
class C[T: type](X: T) {}
|
||||
|
||||
interface I {
|
||||
// Uses of `Self` inside the definition of `I` have type `I`.
|
||||
@@ -138,18 +138,18 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc17_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_10.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %X.patt.loc17_20.1: @C.%pattern_type (%pattern_type.51d1c4.1) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc17_20.2 (constants.%X.patt.9f0)]
|
||||
// CHECK:STDOUT: %X.patt.loc17_19.1: @C.%pattern_type (%pattern_type.51d1c4.1) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc17_19.2 (constants.%X.patt.9f0)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc17_13.1: type = splice_block %.loc17_13.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc17_12.1: type = splice_block %.loc17_12.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc17_10: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc17_13.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc17_12.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc17_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc17_10.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc17_23: type = splice_block %T.ref [symbolic = %T.loc17_10.1 (constants.%T)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc17_20: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc17_21: type = splice_block %T.ref [symbolic = %T.loc17_10.1 (constants.%T)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc17_19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc17_10.2 [symbolic = %T.loc17_10.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %X.loc17_20.2: @C.%T.loc17_10.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc17_20.1 (constants.%X)]
|
||||
// CHECK:STDOUT: %X.loc17_19.2: @C.%T.loc17_10.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc17_19.1 (constants.%X)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
|
||||
// CHECK:STDOUT: impl_decl @bool.as.I.impl [concrete] {} {
|
||||
@@ -251,12 +251,12 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: witness = %I.impl_witness
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @C(%T.loc17_10.2: type, %X.loc17_20.2: @C.%T.loc17_10.1 (%T)) {
|
||||
// CHECK:STDOUT: generic class @C(%T.loc17_10.2: type, %X.loc17_19.2: @C.%T.loc17_10.1 (%T)) {
|
||||
// CHECK:STDOUT: %T.patt.loc17_10.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_10.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc17_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc17_10.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc17_10.1 [symbolic = %pattern_type (constants.%pattern_type.51d1c4.1)]
|
||||
// CHECK:STDOUT: %X.patt.loc17_20.2: @C.%pattern_type (%pattern_type.51d1c4.1) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc17_20.2 (constants.%X.patt.9f0)]
|
||||
// CHECK:STDOUT: %X.loc17_20.1: @C.%T.loc17_10.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc17_20.1 (constants.%X)]
|
||||
// CHECK:STDOUT: %X.patt.loc17_19.2: @C.%pattern_type (%pattern_type.51d1c4.1) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc17_19.2 (constants.%X.patt.9f0)]
|
||||
// CHECK:STDOUT: %X.loc17_19.1: @C.%T.loc17_10.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc17_19.1 (constants.%X)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
@@ -300,8 +300,8 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc17_10.1 => constants.%T
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1
|
||||
// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.9f0
|
||||
// CHECK:STDOUT: %X.loc17_20.1 => constants.%X
|
||||
// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.9f0
|
||||
// CHECK:STDOUT: %X.loc17_19.1 => constants.%X
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf(constants.%Self.37e) {
|
||||
@@ -315,8 +315,8 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc17_10.1 => constants.%I.type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6cb
|
||||
// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.3b7
|
||||
// CHECK:STDOUT: %X.loc17_20.1 => constants.%Self.37e
|
||||
// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.3b7
|
||||
// CHECK:STDOUT: %X.loc17_19.1 => constants.%Self.37e
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.37e) {
|
||||
@@ -331,8 +331,8 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc17_10.1 => constants.%I.type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6cb
|
||||
// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.3b7
|
||||
// CHECK:STDOUT: %X.loc17_20.1 => constants.%I.facet.11c
|
||||
// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.3b7
|
||||
// CHECK:STDOUT: %X.loc17_19.1 => constants.%I.facet.11c
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf(constants.%I.facet.11c) {
|
||||
@@ -354,8 +354,8 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc17_10.1 => type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98f
|
||||
// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.014
|
||||
// CHECK:STDOUT: %X.loc17_20.1 => constants.%i32
|
||||
// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.014
|
||||
// CHECK:STDOUT: %X.loc17_19.1 => constants.%i32
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
@@ -379,8 +379,8 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %T.patt.loc17_10.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc17_10.1 => constants.%I.type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.6cb
|
||||
// CHECK:STDOUT: %X.patt.loc17_20.2 => constants.%X.patt.3b7
|
||||
// CHECK:STDOUT: %X.loc17_20.1 => constants.%I.facet.858
|
||||
// CHECK:STDOUT: %X.patt.loc17_19.2 => constants.%X.patt.3b7
|
||||
// CHECK:STDOUT: %X.loc17_19.1 => constants.%I.facet.858
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+48
-48
@@ -47,7 +47,7 @@ impl {} as I & I {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
impl {} as I where .T = ();
|
||||
|
||||
@@ -57,7 +57,7 @@ impl {} as I where .T = () {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
class C {}
|
||||
impl C as I where .T = ();
|
||||
@@ -70,7 +70,7 @@ impl C as I where .T = () {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
class C {}
|
||||
impl C as I where .T = ();
|
||||
@@ -83,7 +83,7 @@ impl C as I where .T = () {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
class C {}
|
||||
impl C as I;
|
||||
@@ -98,8 +98,8 @@ let x: (C as I).T = ();
|
||||
// CHECK:STDERR: impl C as I {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_unset_associated_const.carbon:[[@LINE-14]]:7: note: associated constant declared here [AssociatedConstantHere]
|
||||
// CHECK:STDERR: let T:! type;
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: let T: type;
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl C as I {}
|
||||
|
||||
@@ -129,8 +129,8 @@ impl D as I where .T = C {}
|
||||
// --- associated_const_of_parameterized.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(U:! type) {
|
||||
let T:! type;
|
||||
interface I(U: type) {
|
||||
let T: type;
|
||||
}
|
||||
class C;
|
||||
class D {}
|
||||
@@ -145,13 +145,13 @@ library "[[@TEST_NAME]]";
|
||||
interface I;
|
||||
class D {}
|
||||
impl D as I;
|
||||
class C(T:! I);
|
||||
class C(T: I);
|
||||
|
||||
fn F(x: C(D));
|
||||
|
||||
interface I {}
|
||||
impl D as I {}
|
||||
class C(T:! I) {}
|
||||
class C(T: I) {}
|
||||
|
||||
fn F(unused x: C(D)) {}
|
||||
|
||||
@@ -174,8 +174,8 @@ interface J {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let U:! type;
|
||||
let T: type;
|
||||
let U: type;
|
||||
}
|
||||
class C {}
|
||||
|
||||
@@ -185,8 +185,8 @@ impl C as I where .T = ();
|
||||
// CHECK:STDERR: impl C as I where .T = () {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_never_assigned_associated_const.carbon:[[@LINE-9]]:7: note: associated constant declared here [AssociatedConstantHere]
|
||||
// CHECK:STDERR: let U:! type;
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: let U: type;
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl C as I where .T = () {}
|
||||
|
||||
@@ -196,8 +196,8 @@ library "[[@TEST_NAME]]";
|
||||
interface X;
|
||||
|
||||
// Allowed to use incomplete interfaces in function declarations.
|
||||
fn F(_:! X);
|
||||
fn G[U:! X](u: U);
|
||||
fn F(generic _: X);
|
||||
fn G[U: X](u: U);
|
||||
|
||||
class C;
|
||||
|
||||
@@ -224,8 +224,8 @@ fn H(c: C) {
|
||||
// The above declarations require that `interface Y`, `fn F` (since it is
|
||||
// generic), and `impl C as X` are defined in the same file.
|
||||
interface Y {}
|
||||
fn F(_:! X) {}
|
||||
fn G[U:! X](unused u: U) {}
|
||||
fn F(generic _: X) {}
|
||||
fn G[U: X](unused u: U) {}
|
||||
impl C as Y;
|
||||
impl C as X {}
|
||||
impl C as Y {}
|
||||
@@ -1204,9 +1204,9 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] {
|
||||
// CHECK:STDOUT: %U.patt.loc3_14.1: %pattern_type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc3_14.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc3_17.1: type = splice_block %.loc3_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc3_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc3_16.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc3_14.2: type = symbolic_binding U, 0 [symbolic = %U.loc3_14.1 (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -1265,10 +1265,10 @@ impl C as Y {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%U.loc3_14.1)> [symbolic = %I.type (constants.%I.type.3fe)]
|
||||
// CHECK:STDOUT: %Self.loc3_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.191)]
|
||||
// CHECK:STDOUT: %Self.loc3_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.191)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc3_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.191)]
|
||||
// CHECK:STDOUT: %Self.loc3_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_22.2 (constants.%Self.191)]
|
||||
// CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -1277,7 +1277,7 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc3_23.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc3_22.1
|
||||
// CHECK:STDOUT: .T = @T.%assoc0
|
||||
// CHECK:STDOUT: witness = (@I.WithSelf.%T)
|
||||
// CHECK:STDOUT:
|
||||
@@ -1326,7 +1326,7 @@ impl C as Y {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %I.type => constants.%I.type.c9e
|
||||
// CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.29c
|
||||
// CHECK:STDOUT: %Self.loc3_22.2 => constants.%Self.29c
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf(constants.%C, constants.%Self.191) {
|
||||
@@ -1816,25 +1816,25 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: %.Self.frozen.loc6: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %X.ref.loc6: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc6_7.2: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_7.1 (constants.%_)]
|
||||
// CHECK:STDOUT: %_.loc6_15.2: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_15.1 (constants.%_)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl.loc7: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %U.patt.loc35: %pattern_type.ffc = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %u.param_patt.loc35: @G.%pattern_type (%pattern_type.fa2) = value_param_pattern [symbolic = %u.param_patt.loc7 (constants.%u.param_patt.796)]
|
||||
// CHECK:STDOUT: %u.patt.loc35: @G.%pattern_type (%pattern_type.fa2) = at_binding_pattern u, %u.param_patt.loc35 [symbolic = %u.patt.loc7 (constants.%u.patt.dae)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc7_10: type = splice_block %X.ref.loc7 [concrete = constants.%X.type] {
|
||||
// CHECK:STDOUT: %.loc7_9: type = splice_block %X.ref.loc7 [concrete = constants.%X.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc7: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %X.ref.loc7: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc7_7.2: %X.type = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %u.param.loc7: @G.%U.as_type.loc7_16.1 (%U.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc7_16.1: type = splice_block %.loc7_16.2 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] {
|
||||
// CHECK:STDOUT: %u.param.loc7: @G.%U.as_type.loc7_15.1 (%U.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc7_15.1: type = splice_block %.loc7_15.2 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)] {
|
||||
// CHECK:STDOUT: %U.ref.loc7: %X.type = name_ref U, %U.loc7_7.2 [symbolic = %U.loc7_7.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.as_type.loc7_16.2: type = facet_access_type %U.ref.loc7 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: %.loc7_16.2: type = converted %U.ref.loc7, %U.as_type.loc7_16.2 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: %U.as_type.loc7_15.2: type = facet_access_type %U.ref.loc7 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: %.loc7_15.2: type = converted %U.ref.loc7, %U.as_type.loc7_15.2 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %u.loc7: @G.%U.as_type.loc7_16.1 (%U.as_type) = wrapper_binding u, %u.param.loc7
|
||||
// CHECK:STDOUT: %u.loc7: @G.%U.as_type.loc7_15.1 (%U.as_type) = wrapper_binding u, %u.param.loc7
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl.loc9: type = class_decl @C [concrete = constants.%C] {} {}
|
||||
// CHECK:STDOUT: impl_decl @C.as.X.impl [concrete] {} {
|
||||
@@ -1860,25 +1860,25 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: %.Self.frozen.loc34: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %X.ref.loc34: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc34: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_7.1 (constants.%_)]
|
||||
// CHECK:STDOUT: %_.loc34: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_15.1 (constants.%_)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl.loc35: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %U.patt.loc35: %pattern_type.ffc = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %u.param_patt.loc35: @G.%pattern_type (%pattern_type.fa2) = value_param_pattern [symbolic = %u.param_patt.loc7 (constants.%u.param_patt.796)]
|
||||
// CHECK:STDOUT: %u.patt.loc35: @G.%pattern_type (%pattern_type.fa2) = at_binding_pattern u, %u.param_patt.loc35 [symbolic = %u.patt.loc7 (constants.%u.patt.dae)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc35_10: type = splice_block %X.ref.loc35 [concrete = constants.%X.type] {
|
||||
// CHECK:STDOUT: %.loc35_9: type = splice_block %X.ref.loc35 [concrete = constants.%X.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc35: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %X.ref.loc35: type = name_ref X, file.%X.decl.loc3 [concrete = constants.%X.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc35: %X.type = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %u.param.loc35: @G.%U.as_type.loc7_16.1 (%U.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc35_23.1: type = splice_block %.loc35_23.2 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)] {
|
||||
// CHECK:STDOUT: %u.param.loc35: @G.%U.as_type.loc7_15.1 (%U.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc35_22.1: type = splice_block %.loc35_22.2 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)] {
|
||||
// CHECK:STDOUT: %U.ref.loc35: %X.type = name_ref U, %U.loc35 [symbolic = %U.loc7_7.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.as_type.loc35: type = facet_access_type %U.ref.loc35 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: %.loc35_23.2: type = converted %U.ref.loc35, %U.as_type.loc35 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: %U.as_type.loc35: type = facet_access_type %U.ref.loc35 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: %.loc35_22.2: type = converted %U.ref.loc35, %U.as_type.loc35 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %u.loc35: @G.%U.as_type.loc7_16.1 (%U.as_type) = wrapper_binding u, %u.param.loc35
|
||||
// CHECK:STDOUT: %u.loc35: @G.%U.as_type.loc7_15.1 (%U.as_type) = wrapper_binding u, %u.param.loc35
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: impl_decl @C.as.Y.impl [concrete] {} {
|
||||
// CHECK:STDOUT: %C.ref.loc36: type = name_ref C, file.%C.decl.loc9 [concrete = constants.%C]
|
||||
@@ -1946,9 +1946,9 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(%_.loc6_7.2: %X.type) {
|
||||
// CHECK:STDOUT: generic fn @F(%_.loc6_15.2: %X.type) {
|
||||
// CHECK:STDOUT: %_.patt.loc6: %pattern_type.ffc = symbolic_binding_pattern _, 0 [symbolic = %_.patt.loc6 (constants.%_.patt)]
|
||||
// CHECK:STDOUT: %_.loc6_7.1: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_7.1 (constants.%_)]
|
||||
// CHECK:STDOUT: %_.loc6_15.1: %X.type = symbolic_binding _, 0 [symbolic = %_.loc6_15.1 (constants.%_)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
@@ -1963,15 +1963,15 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: generic fn @G(%U.loc7_7.2: %X.type) {
|
||||
// CHECK:STDOUT: %U.patt.loc7: %pattern_type.ffc = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %U.loc7_7.1: %X.type = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.as_type.loc7_16.1: type = facet_access_type %U.loc7_7.1 [symbolic = %U.as_type.loc7_16.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_16.1 [symbolic = %pattern_type (constants.%pattern_type.fa2)]
|
||||
// CHECK:STDOUT: %U.as_type.loc7_15.1: type = facet_access_type %U.loc7_7.1 [symbolic = %U.as_type.loc7_15.1 (constants.%U.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc7_15.1 [symbolic = %pattern_type (constants.%pattern_type.fa2)]
|
||||
// CHECK:STDOUT: %u.param_patt.loc7: @G.%pattern_type (%pattern_type.fa2) = value_param_pattern [symbolic = %u.param_patt.loc7 (constants.%u.param_patt.796)]
|
||||
// CHECK:STDOUT: %u.patt.loc7: @G.%pattern_type (%pattern_type.fa2) = at_binding_pattern u, %u.param_patt.loc7 [symbolic = %u.patt.loc7 (constants.%u.patt.dae)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type.loc7_16.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type.loc7_15.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%u.param.loc35: @G.%U.as_type.loc7_16.1 (%U.as_type)) {
|
||||
// CHECK:STDOUT: fn(%u.param.loc35: @G.%U.as_type.loc7_15.1 (%U.as_type)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT:
|
||||
@@ -2002,13 +2002,13 @@ impl C as Y {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%_) {
|
||||
// CHECK:STDOUT: %_.patt.loc6 => constants.%_.patt
|
||||
// CHECK:STDOUT: %_.loc6_7.1 => constants.%_
|
||||
// CHECK:STDOUT: %_.loc6_15.1 => constants.%_
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G(constants.%U) {
|
||||
// CHECK:STDOUT: %U.patt.loc7 => constants.%U.patt
|
||||
// CHECK:STDOUT: %U.loc7_7.1 => constants.%U
|
||||
// CHECK:STDOUT: %U.as_type.loc7_16.1 => constants.%U.as_type
|
||||
// CHECK:STDOUT: %U.as_type.loc7_15.1 => constants.%U.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.fa2
|
||||
// CHECK:STDOUT: %u.param_patt.loc7 => constants.%u.param_patt.796
|
||||
// CHECK:STDOUT: %u.patt.loc7 => constants.%u.patt.dae
|
||||
@@ -2020,7 +2020,7 @@ impl C as Y {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%X.facet) {
|
||||
// CHECK:STDOUT: %_.patt.loc6 => constants.%_.patt
|
||||
// CHECK:STDOUT: %_.loc6_7.1 => constants.%X.facet
|
||||
// CHECK:STDOUT: %_.loc6_15.1 => constants.%X.facet
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
@@ -2028,7 +2028,7 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: specific @G(constants.%X.facet) {
|
||||
// CHECK:STDOUT: %U.patt.loc7 => constants.%U.patt
|
||||
// CHECK:STDOUT: %U.loc7_7.1 => constants.%X.facet
|
||||
// CHECK:STDOUT: %U.as_type.loc7_16.1 => constants.%C
|
||||
// CHECK:STDOUT: %U.as_type.loc7_15.1 => constants.%C
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b
|
||||
// CHECK:STDOUT: %u.param_patt.loc7 => constants.%u.param_patt.162
|
||||
// CHECK:STDOUT: %u.patt.loc7 => constants.%u.patt.0e4
|
||||
|
||||
+108
-108
@@ -24,38 +24,38 @@ interface K {}
|
||||
interface L {}
|
||||
|
||||
// TODO: Put these in a match_first so the test will pass again.
|
||||
impl forall [T:! I] T as Interface;
|
||||
impl forall [T:! J] T as Interface;
|
||||
impl forall [T:! K] T as Interface;
|
||||
impl forall [T:! L] T as Interface;
|
||||
impl forall [T: I] T as Interface;
|
||||
impl forall [T: J] T as Interface;
|
||||
impl forall [T: K] T as Interface;
|
||||
impl forall [T: L] T as Interface;
|
||||
|
||||
// These are different impls, so they are not redefinitions, even though the
|
||||
// self type and constraint type are the same.
|
||||
impl forall [T:! I] T as Interface {}
|
||||
impl forall [T: I] T as Interface {}
|
||||
// CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
|
||||
// CHECK:STDERR: impl forall [T:! J] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: J] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE-4]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
|
||||
// CHECK:STDERR: impl forall [T:! I] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: I] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! J] T as Interface {}
|
||||
impl forall [T: J] T as Interface {}
|
||||
// CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
|
||||
// CHECK:STDERR: impl forall [T:! K] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: K] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE-12]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
|
||||
// CHECK:STDERR: impl forall [T:! I] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: I] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! K] T as Interface {}
|
||||
impl forall [T: K] T as Interface {}
|
||||
// CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
|
||||
// CHECK:STDERR: impl forall [T:! L] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: L] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_same_self_and_interface.carbon:[[@LINE-20]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
|
||||
// CHECK:STDERR: impl forall [T:! I] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: I] T as Interface {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! L] T as Interface {}
|
||||
impl forall [T: L] T as Interface {}
|
||||
|
||||
// --- fail_same_self_and_interface_redefined.carbon
|
||||
|
||||
@@ -64,15 +64,15 @@ library "[[@TEST_NAME]]";
|
||||
interface I {}
|
||||
interface J {}
|
||||
|
||||
impl forall [T:! I] T as J {}
|
||||
impl forall [T: I] T as J {}
|
||||
// CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE+7]]:1: error: redefinition of `impl T as J` [ImplRedefinition]
|
||||
// CHECK:STDERR: impl forall [T:! I] T as J {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: I] T as J {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE-4]]:1: note: previous definition was here [ImplPreviousDefinition]
|
||||
// CHECK:STDERR: impl forall [T:! I] T as J {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: I] T as J {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! I] T as J {}
|
||||
impl forall [T: I] T as J {}
|
||||
|
||||
// --- fail_same_type_different_spelling.carbon
|
||||
|
||||
@@ -97,18 +97,18 @@ impl (C, C).0 as I {}
|
||||
|
||||
interface I {}
|
||||
|
||||
impl forall [T:! type] T as I {
|
||||
impl forall [T: type] T as I {
|
||||
fn A() {}
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_redefinition_generic_regions.carbon:[[@LINE+7]]:1: error: redefinition of `impl T as I` [ImplRedefinition]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as I {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as I {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_redefinition_generic_regions.carbon:[[@LINE-7]]:1: note: previous definition was here [ImplPreviousDefinition]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as I {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as I {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type] T as I {
|
||||
impl forall [T: type] T as I {
|
||||
// Although not referenced, B has the same generic region index of A, and
|
||||
// makes C a different index. We used to merge, and this was a crash.
|
||||
fn B() {}
|
||||
@@ -185,10 +185,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.1df)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc12: %I.type = name_ref T, %T.loc12_15.1 [symbolic = %T.loc12_15.2 (constants.%T.dda)]
|
||||
// CHECK:STDOUT: %T.as_type.loc12_21.1: type = facet_access_type %T.ref.loc12 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %.loc12_21: type = converted %T.ref.loc12, %T.as_type.loc12_21.1 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %T.as_type.loc12_20.1: type = facet_access_type %T.ref.loc12 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %.loc12_20: type = converted %T.ref.loc12, %T.as_type.loc12_20.1 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %Interface.ref.loc12: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
|
||||
// CHECK:STDOUT: %.loc12_18: type = splice_block %I.ref.loc12 [concrete = constants.%I.type] {
|
||||
// CHECK:STDOUT: %.loc12_17: type = splice_block %I.ref.loc12 [concrete = constants.%I.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc12: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -198,10 +198,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.ac1)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc13_15.1 [symbolic = %T.loc13_15.2 (constants.%T.e40)]
|
||||
// CHECK:STDOUT: %T.as_type.loc13_21.1: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %.loc13_21: type = converted %T.ref.loc13, %T.as_type.loc13_21.1 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %T.as_type.loc13_20.1: type = facet_access_type %T.ref.loc13 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %.loc13_20: type = converted %T.ref.loc13, %T.as_type.loc13_20.1 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %Interface.ref.loc13: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
|
||||
// CHECK:STDOUT: %.loc13_18: type = splice_block %J.ref.loc13 [concrete = constants.%J.type] {
|
||||
// CHECK:STDOUT: %.loc13_17: type = splice_block %J.ref.loc13 [concrete = constants.%J.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc13: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %J.ref.loc13: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -211,10 +211,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc14_15.1: %pattern_type.b64 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt.0ef)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc14: %K.type = name_ref T, %T.loc14_15.1 [symbolic = %T.loc14_15.2 (constants.%T.062)]
|
||||
// CHECK:STDOUT: %T.as_type.loc14_21.1: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %.loc14_21: type = converted %T.ref.loc14, %T.as_type.loc14_21.1 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %T.as_type.loc14_20.1: type = facet_access_type %T.ref.loc14 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %.loc14_20: type = converted %T.ref.loc14, %T.as_type.loc14_20.1 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %Interface.ref.loc14: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
|
||||
// CHECK:STDOUT: %.loc14_18: type = splice_block %K.ref.loc14 [concrete = constants.%K.type] {
|
||||
// CHECK:STDOUT: %.loc14_17: type = splice_block %K.ref.loc14 [concrete = constants.%K.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %K.ref.loc14: type = name_ref K, file.%K.decl [concrete = constants.%K.type]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -224,10 +224,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type.25e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.b11)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc15: %L.type = name_ref T, %T.loc15_15.1 [symbolic = %T.loc15_15.2 (constants.%T.709)]
|
||||
// CHECK:STDOUT: %T.as_type.loc15_21.1: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %.loc15_21: type = converted %T.ref.loc15, %T.as_type.loc15_21.1 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %T.as_type.loc15_20.1: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %.loc15_20: type = converted %T.ref.loc15, %T.as_type.loc15_20.1 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %Interface.ref.loc15: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
|
||||
// CHECK:STDOUT: %.loc15_18: type = splice_block %L.ref.loc15 [concrete = constants.%L.type] {
|
||||
// CHECK:STDOUT: %.loc15_17: type = splice_block %L.ref.loc15 [concrete = constants.%L.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %L.ref.loc15: type = name_ref L, file.%L.decl [concrete = constants.%L.type]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -237,10 +237,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.1df)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc19: %I.type = name_ref T, %T.loc19 [symbolic = %T.loc12_15.2 (constants.%T.dda)]
|
||||
// CHECK:STDOUT: %T.as_type.loc19: type = facet_access_type %T.ref.loc19 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %.loc19_21: type = converted %T.ref.loc19, %T.as_type.loc19 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %T.as_type.loc19: type = facet_access_type %T.ref.loc19 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %.loc19_20: type = converted %T.ref.loc19, %T.as_type.loc19 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %Interface.ref.loc19: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
|
||||
// CHECK:STDOUT: %.loc19_18: type = splice_block %I.ref.loc19 [concrete = constants.%I.type] {
|
||||
// CHECK:STDOUT: %.loc19_17: type = splice_block %I.ref.loc19 [concrete = constants.%I.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc19: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %I.ref.loc19: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -250,10 +250,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.1: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.ac1)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc27: %J.type = name_ref T, %T.loc27 [symbolic = %T.loc13_15.2 (constants.%T.e40)]
|
||||
// CHECK:STDOUT: %T.as_type.loc27: type = facet_access_type %T.ref.loc27 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %.loc27_21: type = converted %T.ref.loc27, %T.as_type.loc27 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %T.as_type.loc27: type = facet_access_type %T.ref.loc27 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %.loc27_20: type = converted %T.ref.loc27, %T.as_type.loc27 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %Interface.ref.loc27: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
|
||||
// CHECK:STDOUT: %.loc27_18: type = splice_block %J.ref.loc27 [concrete = constants.%J.type] {
|
||||
// CHECK:STDOUT: %.loc27_17: type = splice_block %J.ref.loc27 [concrete = constants.%J.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %J.ref.loc27: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -263,10 +263,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc14_15.1: %pattern_type.b64 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt.0ef)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc35: %K.type = name_ref T, %T.loc35 [symbolic = %T.loc14_15.2 (constants.%T.062)]
|
||||
// CHECK:STDOUT: %T.as_type.loc35: type = facet_access_type %T.ref.loc35 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %.loc35_21: type = converted %T.ref.loc35, %T.as_type.loc35 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %T.as_type.loc35: type = facet_access_type %T.ref.loc35 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %.loc35_20: type = converted %T.ref.loc35, %T.as_type.loc35 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %Interface.ref.loc35: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
|
||||
// CHECK:STDOUT: %.loc35_18: type = splice_block %K.ref.loc35 [concrete = constants.%K.type] {
|
||||
// CHECK:STDOUT: %.loc35_17: type = splice_block %K.ref.loc35 [concrete = constants.%K.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc35: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %K.ref.loc35: type = name_ref K, file.%K.decl [concrete = constants.%K.type]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -276,10 +276,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type.25e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.b11)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc43: %L.type = name_ref T, %T.loc43 [symbolic = %T.loc15_15.2 (constants.%T.709)]
|
||||
// CHECK:STDOUT: %T.as_type.loc43: type = facet_access_type %T.ref.loc43 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %.loc43_21: type = converted %T.ref.loc43, %T.as_type.loc43 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %T.as_type.loc43: type = facet_access_type %T.ref.loc43 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %.loc43_20: type = converted %T.ref.loc43, %T.as_type.loc43 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %Interface.ref.loc43: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type]
|
||||
// CHECK:STDOUT: %.loc43_18: type = splice_block %L.ref.loc43 [concrete = constants.%L.type] {
|
||||
// CHECK:STDOUT: %.loc43_17: type = splice_block %L.ref.loc43 [concrete = constants.%L.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc43: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %L.ref.loc43: type = name_ref L, file.%L.decl [concrete = constants.%L.type]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -355,72 +355,72 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: generic impl @T.as_type.as.Interface.impl.72f(%T.loc12_15.1: %I.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt.1df)]
|
||||
// CHECK:STDOUT: %T.loc12_15.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc12_15.2 (constants.%T.dda)]
|
||||
// CHECK:STDOUT: %T.as_type.loc12_21.2: type = facet_access_type %T.loc12_15.2 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc12_35.2: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.72f(%T.loc12_15.2) [symbolic = %Interface.impl_witness.loc12_35.2 (constants.%Interface.impl_witness.5b0)]
|
||||
// CHECK:STDOUT: %T.as_type.loc12_20.2: type = facet_access_type %T.loc12_15.2 [symbolic = %T.as_type.loc12_20.2 (constants.%T.as_type.b38)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc12_34.2: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.72f(%T.loc12_15.2) [symbolic = %Interface.impl_witness.loc12_34.2 (constants.%Interface.impl_witness.5b0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %.loc12_21 as %Interface.ref.loc12 {
|
||||
// CHECK:STDOUT: impl: %.loc12_20 as %Interface.ref.loc12 {
|
||||
// CHECK:STDOUT: %Interface.impl_witness_table = impl_witness_table (), @T.as_type.as.Interface.impl.72f [concrete]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc12_35.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.72f(constants.%T.dda) [symbolic = %Interface.impl_witness.loc12_35.2 (constants.%Interface.impl_witness.5b0)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc12_34.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.72f(constants.%T.dda) [symbolic = %Interface.impl_witness.loc12_34.2 (constants.%Interface.impl_witness.5b0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: extend %Interface.ref.loc12
|
||||
// CHECK:STDOUT: witness = %Interface.impl_witness.loc12_35.1
|
||||
// CHECK:STDOUT: witness = %Interface.impl_witness.loc12_34.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic impl @T.as_type.as.Interface.impl.24e(%T.loc13_15.1: %J.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.2: %pattern_type.2c5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt.ac1)]
|
||||
// CHECK:STDOUT: %T.loc13_15.2: %J.type = symbolic_binding T, 0 [symbolic = %T.loc13_15.2 (constants.%T.e40)]
|
||||
// CHECK:STDOUT: %T.as_type.loc13_21.2: type = facet_access_type %T.loc13_15.2 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc13_35.2: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.24e(%T.loc13_15.2) [symbolic = %Interface.impl_witness.loc13_35.2 (constants.%Interface.impl_witness.614)]
|
||||
// CHECK:STDOUT: %T.as_type.loc13_20.2: type = facet_access_type %T.loc13_15.2 [symbolic = %T.as_type.loc13_20.2 (constants.%T.as_type.d90)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc13_34.2: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.24e(%T.loc13_15.2) [symbolic = %Interface.impl_witness.loc13_34.2 (constants.%Interface.impl_witness.614)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %.loc13_21 as %Interface.ref.loc13 {
|
||||
// CHECK:STDOUT: impl: %.loc13_20 as %Interface.ref.loc13 {
|
||||
// CHECK:STDOUT: %Interface.impl_witness_table = impl_witness_table (), @T.as_type.as.Interface.impl.24e [concrete]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc13_35.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.24e(constants.%T.e40) [symbolic = %Interface.impl_witness.loc13_35.2 (constants.%Interface.impl_witness.614)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc13_34.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.24e(constants.%T.e40) [symbolic = %Interface.impl_witness.loc13_34.2 (constants.%Interface.impl_witness.614)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: extend %Interface.ref.loc13
|
||||
// CHECK:STDOUT: witness = %Interface.impl_witness.loc13_35.1
|
||||
// CHECK:STDOUT: witness = %Interface.impl_witness.loc13_34.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic impl @T.as_type.as.Interface.impl.b21(%T.loc14_15.1: %K.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc14_15.2: %pattern_type.b64 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_15.2 (constants.%T.patt.0ef)]
|
||||
// CHECK:STDOUT: %T.loc14_15.2: %K.type = symbolic_binding T, 0 [symbolic = %T.loc14_15.2 (constants.%T.062)]
|
||||
// CHECK:STDOUT: %T.as_type.loc14_21.2: type = facet_access_type %T.loc14_15.2 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc14_35.2: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.b21(%T.loc14_15.2) [symbolic = %Interface.impl_witness.loc14_35.2 (constants.%Interface.impl_witness.bda)]
|
||||
// CHECK:STDOUT: %T.as_type.loc14_20.2: type = facet_access_type %T.loc14_15.2 [symbolic = %T.as_type.loc14_20.2 (constants.%T.as_type.1ea)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc14_34.2: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.b21(%T.loc14_15.2) [symbolic = %Interface.impl_witness.loc14_34.2 (constants.%Interface.impl_witness.bda)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %.loc14_21 as %Interface.ref.loc14 {
|
||||
// CHECK:STDOUT: impl: %.loc14_20 as %Interface.ref.loc14 {
|
||||
// CHECK:STDOUT: %Interface.impl_witness_table = impl_witness_table (), @T.as_type.as.Interface.impl.b21 [concrete]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc14_35.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.b21(constants.%T.062) [symbolic = %Interface.impl_witness.loc14_35.2 (constants.%Interface.impl_witness.bda)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc14_34.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.b21(constants.%T.062) [symbolic = %Interface.impl_witness.loc14_34.2 (constants.%Interface.impl_witness.bda)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: extend %Interface.ref.loc14
|
||||
// CHECK:STDOUT: witness = %Interface.impl_witness.loc14_35.1
|
||||
// CHECK:STDOUT: witness = %Interface.impl_witness.loc14_34.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic impl @T.as_type.as.Interface.impl.2b4(%T.loc15_15.1: %L.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type.25e = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.b11)]
|
||||
// CHECK:STDOUT: %T.loc15_15.2: %L.type = symbolic_binding T, 0 [symbolic = %T.loc15_15.2 (constants.%T.709)]
|
||||
// CHECK:STDOUT: %T.as_type.loc15_21.2: type = facet_access_type %T.loc15_15.2 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc15_35.2: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.2b4(%T.loc15_15.2) [symbolic = %Interface.impl_witness.loc15_35.2 (constants.%Interface.impl_witness.9d3)]
|
||||
// CHECK:STDOUT: %T.as_type.loc15_20.2: type = facet_access_type %T.loc15_15.2 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type.56f)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc15_34.2: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.2b4(%T.loc15_15.2) [symbolic = %Interface.impl_witness.loc15_34.2 (constants.%Interface.impl_witness.9d3)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %.loc15_21 as %Interface.ref.loc15 {
|
||||
// CHECK:STDOUT: impl: %.loc15_20 as %Interface.ref.loc15 {
|
||||
// CHECK:STDOUT: %Interface.impl_witness_table = impl_witness_table (), @T.as_type.as.Interface.impl.2b4 [concrete]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc15_35.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.2b4(constants.%T.709) [symbolic = %Interface.impl_witness.loc15_35.2 (constants.%Interface.impl_witness.9d3)]
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc15_34.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.2b4(constants.%T.709) [symbolic = %Interface.impl_witness.loc15_34.2 (constants.%Interface.impl_witness.9d3)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: extend %Interface.ref.loc15
|
||||
// CHECK:STDOUT: witness = %Interface.impl_witness.loc15_35.1
|
||||
// CHECK:STDOUT: witness = %Interface.impl_witness.loc15_34.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -447,29 +447,29 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: specific @T.as_type.as.Interface.impl.72f(constants.%T.dda) {
|
||||
// CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt.1df
|
||||
// CHECK:STDOUT: %T.loc12_15.2 => constants.%T.dda
|
||||
// CHECK:STDOUT: %T.as_type.loc12_21.2 => constants.%T.as_type.b38
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc12_35.2 => constants.%Interface.impl_witness.5b0
|
||||
// CHECK:STDOUT: %T.as_type.loc12_20.2 => constants.%T.as_type.b38
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc12_34.2 => constants.%Interface.impl_witness.5b0
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @T.as_type.as.Interface.impl.24e(constants.%T.e40) {
|
||||
// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.ac1
|
||||
// CHECK:STDOUT: %T.loc13_15.2 => constants.%T.e40
|
||||
// CHECK:STDOUT: %T.as_type.loc13_21.2 => constants.%T.as_type.d90
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc13_35.2 => constants.%Interface.impl_witness.614
|
||||
// CHECK:STDOUT: %T.as_type.loc13_20.2 => constants.%T.as_type.d90
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc13_34.2 => constants.%Interface.impl_witness.614
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @T.as_type.as.Interface.impl.b21(constants.%T.062) {
|
||||
// CHECK:STDOUT: %T.patt.loc14_15.2 => constants.%T.patt.0ef
|
||||
// CHECK:STDOUT: %T.loc14_15.2 => constants.%T.062
|
||||
// CHECK:STDOUT: %T.as_type.loc14_21.2 => constants.%T.as_type.1ea
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc14_35.2 => constants.%Interface.impl_witness.bda
|
||||
// CHECK:STDOUT: %T.as_type.loc14_20.2 => constants.%T.as_type.1ea
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc14_34.2 => constants.%Interface.impl_witness.bda
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @T.as_type.as.Interface.impl.2b4(constants.%T.709) {
|
||||
// CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt.b11
|
||||
// CHECK:STDOUT: %T.loc15_15.2 => constants.%T.709
|
||||
// CHECK:STDOUT: %T.as_type.loc15_21.2 => constants.%T.as_type.56f
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc15_35.2 => constants.%Interface.impl_witness.9d3
|
||||
// CHECK:STDOUT: %T.as_type.loc15_20.2 => constants.%T.as_type.56f
|
||||
// CHECK:STDOUT: %Interface.impl_witness.loc15_34.2 => constants.%Interface.impl_witness.9d3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Interface.WithSelf(constants.%Interface.facet.8e9) {
|
||||
@@ -525,10 +525,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc7_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc7_15.1 [symbolic = %T.loc7_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.as_type.loc7_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc7_21: type = converted %T.ref, %T.as_type.loc7_21.1 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %T.as_type.loc7_20.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc7_20.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc7_20: type = converted %T.ref, %T.as_type.loc7_20.1 [symbolic = %T.as_type.loc7_20.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
||||
// CHECK:STDOUT: %.loc7_18: type = splice_block %I.ref [concrete = constants.%I.type] {
|
||||
// CHECK:STDOUT: %.loc7_17: 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: }
|
||||
@@ -538,10 +538,10 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc15_15.1 [symbolic = %T.loc15_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.as_type.loc15_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc15_21: type = converted %T.ref, %T.as_type.loc15_21.1 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %T.as_type.loc15_20.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc15_20: type = converted %T.ref, %T.as_type.loc15_20.1 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
||||
// CHECK:STDOUT: %.loc15_18: type = splice_block %I.ref [concrete = constants.%I.type] {
|
||||
// CHECK:STDOUT: %.loc15_17: 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: }
|
||||
@@ -578,29 +578,29 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: generic impl @T.as_type.as.J.impl.377648.1(%T.loc7_15.1: %I.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc7_15.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.as_type.loc7_21.2: type = facet_access_type %T.loc7_15.2 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %J.impl_witness.loc7_28.2: <witness> = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.377648.1(%T.loc7_15.2) [symbolic = %J.impl_witness.loc7_28.2 (constants.%J.impl_witness)]
|
||||
// CHECK:STDOUT: %T.as_type.loc7_20.2: type = facet_access_type %T.loc7_15.2 [symbolic = %T.as_type.loc7_20.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %J.impl_witness.loc7_27.2: <witness> = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.377648.1(%T.loc7_15.2) [symbolic = %J.impl_witness.loc7_27.2 (constants.%J.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %.loc7_21 as %J.ref {
|
||||
// CHECK:STDOUT: impl: %.loc7_20 as %J.ref {
|
||||
// CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (), @T.as_type.as.J.impl.377648.1 [concrete]
|
||||
// CHECK:STDOUT: %J.impl_witness.loc7_28.1: <witness> = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.377648.1(constants.%T) [symbolic = %J.impl_witness.loc7_28.2 (constants.%J.impl_witness)]
|
||||
// CHECK:STDOUT: %J.impl_witness.loc7_27.1: <witness> = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.377648.1(constants.%T) [symbolic = %J.impl_witness.loc7_27.2 (constants.%J.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: extend %J.ref
|
||||
// CHECK:STDOUT: witness = %J.impl_witness.loc7_28.1
|
||||
// CHECK:STDOUT: witness = %J.impl_witness.loc7_27.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic impl @T.as_type.as.J.impl.377648.2(%T.loc15_15.1: %I.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc15_15.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc15_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.as_type.loc15_21.2: type = facet_access_type %T.loc15_15.2 [symbolic = %T.as_type.loc15_21.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %T.as_type.loc15_20.2: type = facet_access_type %T.loc15_15.2 [symbolic = %T.as_type.loc15_20.2 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %.loc15_21 as %J.ref {
|
||||
// CHECK:STDOUT: impl: %.loc15_20 as %J.ref {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: extend %J.ref
|
||||
// CHECK:STDOUT: witness = <error>
|
||||
@@ -618,8 +618,8 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: specific @T.as_type.as.J.impl.377648.1(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc7_15.2 => constants.%T
|
||||
// CHECK:STDOUT: %T.as_type.loc7_21.2 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %J.impl_witness.loc7_28.2 => constants.%J.impl_witness
|
||||
// CHECK:STDOUT: %T.as_type.loc7_20.2 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %J.impl_witness.loc7_27.2 => constants.%J.impl_witness
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @J.WithSelf(constants.%J.facet) {
|
||||
@@ -629,7 +629,7 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: specific @T.as_type.as.J.impl.377648.2(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc15_15.2 => constants.%T
|
||||
// CHECK:STDOUT: %T.as_type.loc15_21.2 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %T.as_type.loc15_20.2 => constants.%T.as_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_same_type_different_spelling.carbon
|
||||
@@ -772,9 +772,9 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %.loc4_18.1: type = splice_block %.loc4_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -783,9 +783,9 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_15.2 [symbolic = %T.loc15_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %.loc15_18.1: type = splice_block %.loc15_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc15_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc15_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc15_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -807,7 +807,7 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: generic impl @T.as.I.impl.812d8b.1(%T.loc4_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc4_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc4_31.2: <witness> = impl_witness %I.impl_witness_table, @T.as.I.impl.812d8b.1(%T.loc4_15.1) [symbolic = %I.impl_witness.loc4_31.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc4_30.2: <witness> = impl_witness %I.impl_witness_table, @T.as.I.impl.812d8b.1(%T.loc4_15.1) [symbolic = %I.impl_witness.loc4_30.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.I.impl.A.type: type = fn_type @T.as.I.impl.A, @T.as.I.impl.812d8b.1(%T.loc4_15.1) [symbolic = %T.as.I.impl.A.type (constants.%T.as.I.impl.A.type)]
|
||||
@@ -816,12 +816,12 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: impl: %T.ref as %I.ref {
|
||||
// CHECK:STDOUT: %T.as.I.impl.A.decl: @T.as.I.impl.812d8b.1.%T.as.I.impl.A.type (%T.as.I.impl.A.type) = fn_decl @T.as.I.impl.A [symbolic = @T.as.I.impl.812d8b.1.%T.as.I.impl.A (constants.%T.as.I.impl.A)] {} {}
|
||||
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @T.as.I.impl.812d8b.1 [concrete]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc4_31.1: <witness> = impl_witness %I.impl_witness_table, @T.as.I.impl.812d8b.1(constants.%T) [symbolic = %I.impl_witness.loc4_31.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc4_30.1: <witness> = impl_witness %I.impl_witness_table, @T.as.I.impl.812d8b.1(constants.%T) [symbolic = %I.impl_witness.loc4_30.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .A = %T.as.I.impl.A.decl
|
||||
// CHECK:STDOUT: extend %I.ref
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc4_31.1
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc4_30.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -931,7 +931,7 @@ impl forall [T:! type] T as I {
|
||||
// CHECK:STDOUT: specific @T.as.I.impl.812d8b.1(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc4_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %I.impl_witness.loc4_31.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT: %I.impl_witness.loc4_30.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.I.impl.A.type => constants.%T.as.I.impl.A.type
|
||||
|
||||
+25
-25
@@ -131,9 +131,9 @@ impl () as C {}
|
||||
// --- fail_duplicate_through_generic_constraint.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface A(T:! type) {}
|
||||
interface A(T: type) {}
|
||||
|
||||
constraint B(X:! type, Y:! type) {
|
||||
constraint B(X: type, Y: type) {
|
||||
extend require impls A(Y);
|
||||
}
|
||||
|
||||
@@ -152,17 +152,17 @@ impl () as A({}) {}
|
||||
// --- fail_error_self_in_require.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface A(T:! type) {}
|
||||
interface A(T: type) {}
|
||||
|
||||
// This makes the type of `Self` into an ErrorInst. No `require` is added to
|
||||
// the constraint.
|
||||
//@dump-sem-ir-begin
|
||||
//
|
||||
// CHECK:STDERR: fail_error_self_in_require.carbon:[[@LINE+4]]:18: error: name `Undefined` not found [NameNotFound]
|
||||
// CHECK:STDERR: constraint B(X:! Undefined) {
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
// CHECK:STDERR: fail_error_self_in_require.carbon:[[@LINE+4]]:17: error: name `Undefined` not found [NameNotFound]
|
||||
// CHECK:STDERR: constraint B(X: Undefined) {
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
constraint B(X:! Undefined) {
|
||||
constraint B(X: Undefined) {
|
||||
extend require impls A(X);
|
||||
}
|
||||
//@dump-sem-ir-end
|
||||
@@ -173,7 +173,7 @@ impl () as B(1) {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let I1:! type;
|
||||
let I1: type;
|
||||
}
|
||||
|
||||
constraint N {
|
||||
@@ -183,7 +183,7 @@ constraint N {
|
||||
class C;
|
||||
impl C as N where .I1 = C {}
|
||||
|
||||
fn F(_:! I where .I1 = .Self) {}
|
||||
fn F(generic _: I where .I1 = .Self) {}
|
||||
fn G() {
|
||||
// TODO: This crashes.
|
||||
// F(C);
|
||||
@@ -192,8 +192,8 @@ fn G() {
|
||||
// --- impl_as_concrete_generic_constraint_where_rewrite.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(T:! type) {
|
||||
let I1:! type;
|
||||
interface I(T: type) {
|
||||
let I1: type;
|
||||
}
|
||||
|
||||
class C;
|
||||
@@ -204,7 +204,7 @@ constraint N {
|
||||
|
||||
impl C as N where .I1 = C {}
|
||||
|
||||
fn F(_:! I(.Self) where .I1 = .Self) {}
|
||||
fn F(generic _: I(.Self) where .I1 = .Self) {}
|
||||
fn G() {
|
||||
// TODO: This crashes.
|
||||
// F(C);
|
||||
@@ -213,8 +213,8 @@ fn G() {
|
||||
// --- todo_impl_as_symbolic_generic_constraint_where_rewrite.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(T:! type) {
|
||||
let I1:! type;
|
||||
interface I(T: type) {
|
||||
let I1: type;
|
||||
}
|
||||
|
||||
constraint N {
|
||||
@@ -224,7 +224,7 @@ constraint N {
|
||||
class C;
|
||||
impl C as N where .I1 = C {}
|
||||
|
||||
fn F(_:! I(.Self) where .I1 = .Self) {}
|
||||
fn F(generic _: I(.Self) where .I1 = .Self) {}
|
||||
fn G() {
|
||||
// TODO: This crashes.
|
||||
// F(C);
|
||||
@@ -234,7 +234,7 @@ fn G() {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let I1:! type;
|
||||
let I1: type;
|
||||
}
|
||||
|
||||
constraint N {
|
||||
@@ -246,12 +246,12 @@ class C;
|
||||
// CHECK:STDERR: impl C as N {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_impl_as_constraint_containing_rewrite_for_concrete_interface.carbon:[[@LINE-11]]:7: note: associated constant declared here [AssociatedConstantHere]
|
||||
// CHECK:STDERR: let I1:! type;
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
// CHECK:STDERR: let I1: type;
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl C as N {}
|
||||
|
||||
fn F(_:! I where .I1 = .Self) {}
|
||||
fn F(generic _: I where .I1 = .Self) {}
|
||||
fn G() {
|
||||
// TODO: This crashes.
|
||||
// F(C);
|
||||
@@ -260,8 +260,8 @@ fn G() {
|
||||
// --- fail_todo_impl_as_constraint_containing_rewrite_for_generic_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(T:! type) {
|
||||
let I1:! type;
|
||||
interface I(T: type) {
|
||||
let I1: type;
|
||||
}
|
||||
|
||||
constraint N {
|
||||
@@ -273,12 +273,12 @@ class C;
|
||||
// CHECK:STDERR: impl C as N {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_impl_as_constraint_containing_rewrite_for_generic_interface.carbon:[[@LINE-11]]:7: note: associated constant declared here [AssociatedConstantHere]
|
||||
// CHECK:STDERR: let I1:! type;
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
// CHECK:STDERR: let I1: type;
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl C as N {}
|
||||
|
||||
fn F(_:! I(.Self) where .I1 = .Self) {}
|
||||
fn F(generic _: I(.Self) where .I1 = .Self) {}
|
||||
fn G() {
|
||||
// TODO: This crashes.
|
||||
// F(C);
|
||||
@@ -287,7 +287,7 @@ fn G() {
|
||||
// --- fail_no_require_self.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
class C;
|
||||
|
||||
|
||||
+40
-40
@@ -13,21 +13,21 @@
|
||||
// --- success.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I { let T:! type; }
|
||||
interface I { let T: type; }
|
||||
|
||||
impl () as I where .T = {} {}
|
||||
|
||||
// --- success_associated.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I { let T:! type; let U:! type; }
|
||||
interface I { let T: type; let U: type; }
|
||||
|
||||
impl () as I where .T = .U and .U = {} {}
|
||||
|
||||
// --- redecl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I2 { let T2:! type; }
|
||||
interface I2 { let T2: type; }
|
||||
|
||||
impl () as I2 where .T2 = {};
|
||||
impl () as I2 where .T2 = {} {}
|
||||
@@ -35,7 +35,7 @@ impl () as I2 where .T2 = {} {}
|
||||
// --- fail_redecl_adds_rewrites.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I3 { let T3:! type; }
|
||||
interface I3 { let T3: type; }
|
||||
|
||||
// CHECK:STDERR: fail_redecl_adds_rewrites.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl () as I3;
|
||||
@@ -47,7 +47,7 @@ impl () as I3 where .T3 = {} {}
|
||||
// --- fail_mismatch.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J { let U:! type; }
|
||||
interface J { let U: type; }
|
||||
|
||||
// CHECK:STDERR: fail_mismatch.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl () as J where .U = {};
|
||||
@@ -60,9 +60,9 @@ impl () as J where .U = () {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I4 {
|
||||
let T4:! type;
|
||||
let T5:! type;
|
||||
let T6:! type;
|
||||
let T4: type;
|
||||
let T5: type;
|
||||
let T6: type;
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_mismatch_bad_value.carbon:[[@LINE+8]]:27: error: name `BAD1` not found [NameNotFound]
|
||||
@@ -88,15 +88,15 @@ impl () as I4 where .T4 = {.b: {}} and .T5 = BAD3 and .T6 = BAD4 {}
|
||||
// --- fail_missing_on_definition.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K { let V:! type; }
|
||||
interface K { let V: type; }
|
||||
|
||||
impl () as K where .V = {};
|
||||
// CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE+11]]:1: error: associated constant V not given a value in impl of interface K [ImplAssociatedConstantNeedsValue]
|
||||
// CHECK:STDERR: impl () as K {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-6]]:19: note: associated constant declared here [AssociatedConstantHere]
|
||||
// CHECK:STDERR: interface K { let V:! type; }
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: interface K { let V: type; }
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-8]]:1: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl () as K where .V = {};
|
||||
@@ -107,7 +107,7 @@ impl () as K {}
|
||||
// --- fail_two_different.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface L { let W:! type; }
|
||||
interface L { let W: type; }
|
||||
|
||||
// CHECK:STDERR: fail_two_different.carbon:[[@LINE+4]]:12: error: associated constant `.(L.W)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues]
|
||||
// CHECK:STDERR: impl () as L where .W = {} and .W = () {}
|
||||
@@ -118,7 +118,7 @@ impl () as L where .W = {} and .W = () {}
|
||||
// --- fail_two_different_first_associated.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface L2 { let W2:! type; let X2:! type; }
|
||||
interface L2 { let W2: type; let X2: type; }
|
||||
|
||||
// CHECK:STDERR: fail_two_different_first_associated.carbon:[[@LINE+4]]:12: error: associated constant `.(L2.W2)` given two different values `()` and `.(L2.X2)` [AssociatedConstantWithDifferentValues]
|
||||
// CHECK:STDERR: impl () as L2 where .W2 = .X2 and .W2 = () {}
|
||||
@@ -129,7 +129,7 @@ impl () as L2 where .W2 = .X2 and .W2 = () {}
|
||||
// --- fail_two_different_second_associated.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface L2 { let W2:! type; let X2:! type; }
|
||||
interface L2 { let W2: type; let X2: type; }
|
||||
|
||||
// CHECK:STDERR: fail_two_different_second_associated.carbon:[[@LINE+4]]:12: error: associated constant `.(L2.W2)` given two different values `()` and `.(L2.X2)` [AssociatedConstantWithDifferentValues]
|
||||
// CHECK:STDERR: impl () as L2 where .W2 = () and .W2 = .X2 {}
|
||||
@@ -140,7 +140,7 @@ impl () as L2 where .W2 = () and .W2 = .X2 {}
|
||||
// --- fail_two_different_first_bad.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface L2 { let W2:! type; }
|
||||
interface L2 { let W2: type; }
|
||||
|
||||
// CHECK:STDERR: fail_two_different_first_bad.carbon:[[@LINE+4]]:27: error: name `BAD5` not found [NameNotFound]
|
||||
// CHECK:STDERR: impl () as L2 where .W2 = BAD5 and .W2 = () {}
|
||||
@@ -151,7 +151,7 @@ impl () as L2 where .W2 = BAD5 and .W2 = () {}
|
||||
// --- fail_two_different_second_bad.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface L3 { let W3:! type; }
|
||||
interface L3 { let W3: type; }
|
||||
|
||||
// CHECK:STDERR: fail_two_different_second_bad.carbon:[[@LINE+4]]:40: error: name `BAD6` not found [NameNotFound]
|
||||
// CHECK:STDERR: impl () as L3 where .W3 = {} and .W3 = BAD6 {}
|
||||
@@ -162,7 +162,7 @@ impl () as L3 where .W3 = {} and .W3 = BAD6 {}
|
||||
// --- fail_two_different_both_bad.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface L4 { let W4:! type; }
|
||||
interface L4 { let W4: type; }
|
||||
|
||||
// CHECK:STDERR: fail_two_different_both_bad.carbon:[[@LINE+8]]:27: error: name `BAD7` not found [NameNotFound]
|
||||
// CHECK:STDERR: impl () as L4 where .W4 = BAD7 and .W4 = BAD8 {}
|
||||
@@ -177,7 +177,7 @@ impl () as L4 where .W4 = BAD7 and .W4 = BAD8 {}
|
||||
// --- fail_many_different.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface L { let W:! type; }
|
||||
interface L { let W: type; }
|
||||
|
||||
// The facet type should have a single rewrite with `<error>` in the RHS (they
|
||||
// are all errors, and they get deduped).
|
||||
@@ -193,21 +193,21 @@ impl () as L where .W = ((), (), ()) and .W = ({}, (), ()) and .W = ({}, {}, ())
|
||||
// --- repeated.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface M { let X:! type; }
|
||||
interface M { let X: type; }
|
||||
|
||||
impl () as M where .X = {} and .X = {} {}
|
||||
|
||||
// --- repeated_associated.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface M { let X:! type; let Y:! type; }
|
||||
interface M { let X: type; let Y: type; }
|
||||
|
||||
impl () as M where .X = .Y and .X = .Y and .Y = () {}
|
||||
|
||||
// --- repeated_concrete_value_and_associated.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface M { let X:! type; let Y:! type; }
|
||||
interface M { let X: type; let Y: type; }
|
||||
|
||||
impl () as M where .X = () and .Y = .X and .X = .Y {}
|
||||
|
||||
@@ -216,7 +216,7 @@ impl {} as M where .X = () and .X = .X and .Y = () {}
|
||||
// --- fail_repeated_and_different.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface M { let X:! type; }
|
||||
interface M { let X: type; }
|
||||
|
||||
// CHECK:STDERR: fail_repeated_and_different.carbon:[[@LINE+4]]:12: error: associated constant `.(M.X)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues]
|
||||
// CHECK:STDERR: impl () as M where .X = {} and .X = () and .X = {} {}
|
||||
@@ -227,7 +227,7 @@ impl () as M where .X = {} and .X = () and .X = {} {}
|
||||
// --- fail_cycle_single.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface M { let X:! type; }
|
||||
interface M { let X: type; }
|
||||
|
||||
// This fails because it resolves to `.X = .X` which is cyclical.
|
||||
//
|
||||
@@ -249,7 +249,7 @@ impl () as M where .X = .X and .X = () {}
|
||||
// --- fail_cycle.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface M { let X:! type; let Y:! type; let Z:! type; }
|
||||
interface M { let X: type; let Y: type; let Z: type; }
|
||||
|
||||
// This fails because it resolves to `.X = .X` which is cyclical.
|
||||
// The value of .X and .Y becomes <error> but .Z is still valid.
|
||||
@@ -266,11 +266,11 @@ impl () as M where .X = .Y and .Y = .X and .Z = () {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let X1:! type;
|
||||
let X2:! type;
|
||||
let X1: type;
|
||||
let X2: type;
|
||||
}
|
||||
interface J {
|
||||
let X3:! type;
|
||||
let X3: type;
|
||||
}
|
||||
|
||||
// TODO: This should fail due to a cyclic definition of each value. But right
|
||||
@@ -295,7 +295,7 @@ impl () as I where .Self impls J and .X1 = .(J.X3) and .X2 = .X1 and .(J.X3) = .
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface N {
|
||||
let Y:! {.a: {}};
|
||||
let Y: {.a: {}};
|
||||
}
|
||||
|
||||
impl () as N where .Y = {.a = {}} { }
|
||||
@@ -304,7 +304,7 @@ impl () as N where .Y = {.a = {}} { }
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface N {
|
||||
let Y:! {.a: {}};
|
||||
let Y: {.a: {}};
|
||||
}
|
||||
|
||||
impl () as N where .Y = {.a = {}} and .Y = {.a = {}} { }
|
||||
@@ -313,7 +313,7 @@ impl () as N where .Y = {.a = {}} and .Y = {.a = {}} { }
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface N {
|
||||
let Y:! {.a: type};
|
||||
let Y: {.a: type};
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_non-type_different.carbon:[[@LINE+4]]:12: error: associated constant `.(N.Y)` given two different values `{.a = {}}` and `{.a = ()}` [AssociatedConstantWithDifferentValues]
|
||||
@@ -340,7 +340,7 @@ impl CD as IF where .F = 0 {
|
||||
// --- facet_type_in_assoc_constant.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface M { let X:! type; }
|
||||
interface M { let X: type; }
|
||||
constraint N {
|
||||
extend require impls M where .X = {};
|
||||
}
|
||||
@@ -352,7 +352,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Y {}
|
||||
interface Z {
|
||||
let Z1:! Y;
|
||||
let Z1: Y;
|
||||
}
|
||||
|
||||
class C;
|
||||
@@ -372,7 +372,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Y {}
|
||||
interface Z {
|
||||
let Z1:! Y;
|
||||
let Z1: Y;
|
||||
}
|
||||
|
||||
class C;
|
||||
@@ -382,11 +382,11 @@ impl C as Z where .Z1 = C {}
|
||||
// Implied constraint: .Self impls Y. Should be verified against the type of the
|
||||
// facet value replacing T when calling F.
|
||||
//
|
||||
// CHECK:STDERR: fail_todo_period_self_compared_with_concrete_self.carbon:[[@LINE+4]]:31: error: cannot convert type `.Self` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet]
|
||||
// CHECK:STDERR: fn F(unused T:! Z where .Z1 = .Self) {}
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR: fail_todo_period_self_compared_with_concrete_self.carbon:[[@LINE+4]]:38: error: cannot convert type `.Self` that implements `Z` into type implementing `Y` [ConversionFailureFacetToFacet]
|
||||
// CHECK:STDERR: fn F(unused generic T: Z where .Z1 = .Self) {}
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(unused T:! Z where .Z1 = .Self) {}
|
||||
fn F(unused generic T: Z where .Z1 = .Self) {}
|
||||
fn G() {
|
||||
F(C);
|
||||
|
||||
@@ -403,7 +403,7 @@ fn G() {
|
||||
// --- assoc_const_impls_in_decl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I { let X:! type; }
|
||||
interface I { let X: type; }
|
||||
interface J {}
|
||||
|
||||
// Test that we avoid an infinite impl lookup cycle from an LookupImplWitness
|
||||
@@ -413,9 +413,9 @@ interface J {}
|
||||
// `.X`. If that lookup found this impl (since it's a final impl, eval can find
|
||||
// it), we would deduce and produce an infinite cycle. Instructions inside the
|
||||
// impl decl should not be able to find the impl.
|
||||
final impl forall [T:! type] T as I where .X impls J and .X = () {}
|
||||
final impl forall [T: type] T as I where .X impls J and .X = () {}
|
||||
|
||||
fn F(unused T:! I where .X = ()) {}
|
||||
fn F(unused generic T: I where .X = ()) {}
|
||||
fn G() {
|
||||
class C;
|
||||
F(C);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let X:! {.a: bool, .b: (i32, i32)};
|
||||
let X: {.a: bool, .b: (i32, i32)};
|
||||
}
|
||||
impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = not false, .b = (3 - 2, 4 / 2)} {}
|
||||
|
||||
@@ -24,7 +24,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = not false, .b =
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let X:! {.a: bool, .b: (i32, i32)};
|
||||
let X: {.a: bool, .b: (i32, i32)};
|
||||
}
|
||||
// CHECK:STDERR: fail_two_different_non_type.carbon:[[@LINE+4]]:12: error: associated constant `.(I.X)` given two different values `{.a = true, .b = (1, 2)}` and `{.a = false, .b = (3, 4)}` [AssociatedConstantWithDifferentValues]
|
||||
// CHECK:STDERR: impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, 4)} {}
|
||||
|
||||
+7
-7
@@ -16,7 +16,7 @@ interface Simple {
|
||||
fn F();
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as Simple {
|
||||
impl forall [T: type] T as Simple {
|
||||
fn F() {}
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ impl forall [T:! type] T as Simple {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_15.2 [symbolic = %T.loc19_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type]
|
||||
// CHECK:STDOUT: %.loc19_18.1: type = splice_block %.loc19_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc19_17.1: type = splice_block %.loc19_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc19_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc19_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc19_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc19_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -81,7 +81,7 @@ impl forall [T:! type] T as Simple {
|
||||
// CHECK:STDOUT: generic impl @T.as.Simple.impl(%T.loc19_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc19_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc19_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc19_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %Simple.impl_witness.loc19_36.2: <witness> = impl_witness %Simple.impl_witness_table, @T.as.Simple.impl(%T.loc19_15.1) [symbolic = %Simple.impl_witness.loc19_36.2 (constants.%Simple.impl_witness)]
|
||||
// CHECK:STDOUT: %Simple.impl_witness.loc19_35.2: <witness> = impl_witness %Simple.impl_witness_table, @T.as.Simple.impl(%T.loc19_15.1) [symbolic = %Simple.impl_witness.loc19_35.2 (constants.%Simple.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.Simple.impl.F.type: type = fn_type @T.as.Simple.impl.F, @T.as.Simple.impl(%T.loc19_15.1) [symbolic = %T.as.Simple.impl.F.type (constants.%T.as.Simple.impl.F.type)]
|
||||
@@ -90,12 +90,12 @@ impl forall [T:! type] T as Simple {
|
||||
// CHECK:STDOUT: impl: %T.ref as %Simple.ref {
|
||||
// CHECK:STDOUT: %T.as.Simple.impl.F.decl: @T.as.Simple.impl.%T.as.Simple.impl.F.type (%T.as.Simple.impl.F.type) = fn_decl @T.as.Simple.impl.F [symbolic = @T.as.Simple.impl.%T.as.Simple.impl.F (constants.%T.as.Simple.impl.F)] {} {}
|
||||
// CHECK:STDOUT: %Simple.impl_witness_table = impl_witness_table (%T.as.Simple.impl.F.decl), @T.as.Simple.impl [concrete]
|
||||
// CHECK:STDOUT: %Simple.impl_witness.loc19_36.1: <witness> = impl_witness %Simple.impl_witness_table, @T.as.Simple.impl(constants.%T) [symbolic = %Simple.impl_witness.loc19_36.2 (constants.%Simple.impl_witness)]
|
||||
// CHECK:STDOUT: %Simple.impl_witness.loc19_35.1: <witness> = impl_witness %Simple.impl_witness_table, @T.as.Simple.impl(constants.%T) [symbolic = %Simple.impl_witness.loc19_35.2 (constants.%Simple.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %T.as.Simple.impl.F.decl
|
||||
// CHECK:STDOUT: extend %Simple.ref
|
||||
// CHECK:STDOUT: witness = %Simple.impl_witness.loc19_36.1
|
||||
// CHECK:STDOUT: witness = %Simple.impl_witness.loc19_35.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -126,7 +126,7 @@ impl forall [T:! type] T as Simple {
|
||||
// CHECK:STDOUT: specific @T.as.Simple.impl(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc19_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc19_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %Simple.impl_witness.loc19_36.2 => constants.%Simple.impl_witness
|
||||
// CHECK:STDOUT: %Simple.impl_witness.loc19_35.2 => constants.%Simple.impl_witness
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.Simple.impl.F.type => constants.%T.as.Simple.impl.F.type
|
||||
|
||||
@@ -37,7 +37,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
// This test uses many unsupported features, and is expected to change.
|
||||
interface I {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
// CHECK:STDERR: fail_todo_impl_in_interface_definition_with_associated.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo]
|
||||
// CHECK:STDERR: default fn F() {
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
|
||||
+56
-56
@@ -15,8 +15,8 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface I1 {}
|
||||
interface I2 {}
|
||||
interface J1(T1:! type) {}
|
||||
interface J2(T2:! type) {}
|
||||
interface J1(T1: type) {}
|
||||
interface J2(T2: type) {}
|
||||
|
||||
// `impl Self as` should match `impl as`, so these should not trigger impl
|
||||
// declaration without definition diagnostics.
|
||||
@@ -28,25 +28,25 @@ class C1 {
|
||||
impl as I2;
|
||||
impl Self as I2 {}
|
||||
|
||||
impl forall [U:! type] Self as J1(U);
|
||||
impl forall [U:! type] as J1(U) {}
|
||||
impl forall [U: type] Self as J1(U);
|
||||
impl forall [U: type] as J1(U) {}
|
||||
|
||||
impl forall [V:! type] as J2(V);
|
||||
impl forall [V:! type] Self as J2(V) {}
|
||||
impl forall [V: type] as J2(V);
|
||||
impl forall [V: type] Self as J2(V) {}
|
||||
}
|
||||
|
||||
class C2(W:! type) {
|
||||
class C2(W: type) {
|
||||
impl Self as I1;
|
||||
impl as I1 {}
|
||||
|
||||
impl as I2;
|
||||
impl Self as I2 {}
|
||||
|
||||
impl forall [X:! type] Self as J1(X);
|
||||
impl forall [X:! type] as J1(X) {}
|
||||
impl forall [X: type] Self as J1(X);
|
||||
impl forall [X: type] as J1(X) {}
|
||||
|
||||
impl forall [Y:! type] as J2(Y);
|
||||
impl forall [Y:! type] Self as J2(Y) {}
|
||||
impl forall [Y: type] as J2(Y);
|
||||
impl forall [Y: type] Self as J2(Y) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,10 +57,10 @@ interface I3 {}
|
||||
interface I4 {}
|
||||
interface I5 {}
|
||||
interface I6 {}
|
||||
interface J3(T3:! type) {}
|
||||
interface J4(T4:! type) {}
|
||||
interface J5(T5:! type) {}
|
||||
interface J6(T6:! type) {}
|
||||
interface J3(T3: type) {}
|
||||
interface J4(T4: type) {}
|
||||
interface J5(T5: type) {}
|
||||
interface J6(T6: type) {}
|
||||
|
||||
// `impl C as` should not match `impl Self as` or `impl as`.
|
||||
|
||||
@@ -94,35 +94,35 @@ class C3 {
|
||||
impl C3 as I6 {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [Z3:! type] C3 as J3(Z3);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [Z3: type] C3 as J3(Z3);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [Z3:! type] C3 as J3(Z3);
|
||||
impl forall [Z3:! type] as J3(Z3) {}
|
||||
impl forall [Z3: type] C3 as J3(Z3);
|
||||
impl forall [Z3: type] as J3(Z3) {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [Z4:! type] C3 as J4(Z4);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [Z4: type] C3 as J4(Z4);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [Z4:! type] C3 as J4(Z4);
|
||||
impl forall [Z4:! type] Self as J4(Z4) {}
|
||||
impl forall [Z4: type] C3 as J4(Z4);
|
||||
impl forall [Z4: type] Self as J4(Z4) {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [Z5:! type] as J5(Z5);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [Z5: type] as J5(Z5);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [Z5:! type] as J5(Z5);
|
||||
impl forall [Z5:! type] C3 as J5(Z5) {}
|
||||
impl forall [Z5: type] as J5(Z5);
|
||||
impl forall [Z5: type] C3 as J5(Z5) {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [Z6:! type] Self as J6(Z6);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [Z6: type] Self as J6(Z6);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [Z6:! type] Self as J6(Z6);
|
||||
impl forall [Z6:! type] C3 as J6(Z6) {}
|
||||
impl forall [Z6: type] Self as J6(Z6);
|
||||
impl forall [Z6: type] C3 as J6(Z6) {}
|
||||
}
|
||||
|
||||
class C4(A:! type) {
|
||||
class C4(A: type) {
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl C4(A) as I3;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
||||
@@ -152,30 +152,30 @@ class C4(A:! type) {
|
||||
impl C4(A) as I6 {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [B3:! type] C4(A) as J3(B3);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [B3:! type] C4(A) as J3(B3);
|
||||
impl forall [B3:! type] as J3(B3) {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [B4:! type] C4(A) as J4(B4);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [B4:! type] C4(A) as J4(B4);
|
||||
impl forall [B4:! type] Self as J4(B4) {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [B5:! type] as J5(B5);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [B5:! type] as J5(B5);
|
||||
impl forall [B5:! type] C4(A) as J5(B5) {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [B6:! type] Self as J6(B6);
|
||||
// CHECK:STDERR: impl forall [B3: type] C4(A) as J3(B3);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [B6:! type] Self as J6(B6);
|
||||
impl forall [B6:! type] C4(A) as J6(B6) {}
|
||||
impl forall [B3: type] C4(A) as J3(B3);
|
||||
impl forall [B3: type] as J3(B3) {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [B4: type] C4(A) as J4(B4);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [B4: type] C4(A) as J4(B4);
|
||||
impl forall [B4: type] Self as J4(B4) {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [B5: type] as J5(B5);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [B5: type] as J5(B5);
|
||||
impl forall [B5: type] C4(A) as J5(B5) {}
|
||||
|
||||
// CHECK:STDERR: fail_no_match.carbon:[[@LINE+4]]:3: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl forall [B6: type] Self as J6(B6);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [B6: type] Self as J6(B6);
|
||||
impl forall [B6: type] C4(A) as J6(B6) {}
|
||||
}
|
||||
+162
-162
@@ -128,8 +128,8 @@ impl B as X {
|
||||
// --- form_parameter.carbon
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let Fm:! Core.Form;
|
||||
let T: type;
|
||||
let Fm: Core.Form;
|
||||
fn F(x:? Fm, y: {.a: (), .b: ()});
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ impl C as I {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(T:! type) {
|
||||
interface I(T: type) {
|
||||
fn F(a: T);
|
||||
}
|
||||
|
||||
@@ -309,12 +309,12 @@ class C {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
fn F[T:! type](x: T*) -> T*;
|
||||
fn F[T: type](x: T*) -> T*;
|
||||
}
|
||||
|
||||
impl () as I {
|
||||
//@dump-sem-ir-begin
|
||||
fn F[U:! Core.Copy](x: U) -> U { return x; }
|
||||
fn F[U: Core.Copy](x: U) -> U { return x; }
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
@@ -323,12 +323,12 @@ impl () as I {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
fn F[T:! type](self, x: T*) -> T*;
|
||||
fn F[T: type](self, x: T*) -> T*;
|
||||
}
|
||||
|
||||
impl () as I {
|
||||
//@dump-sem-ir-begin
|
||||
fn F[U:! Core.Copy](unused self: (), x: U) -> U { return x; }
|
||||
fn F[U: Core.Copy](unused self: (), x: U) -> U { return x; }
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ impl () as I {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(T:! type) {
|
||||
interface I(T: type) {
|
||||
fn F() -> {.a: T, .b: T};
|
||||
}
|
||||
|
||||
@@ -1078,7 +1078,7 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: %.1ce700.2: Core.Form = init_form %U.as_type.c1c [symbolic]
|
||||
// CHECK:STDOUT: %return.param_patt.bf4475.2: %pattern_type.2c66b4.2 = out_param_pattern [symbolic]
|
||||
// CHECK:STDOUT: %return.patt.f44: %pattern_type.2c66b4.2 = return_slot_pattern %return.param_patt.bf4475.2, %U.as_type.c1c [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_34.1 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_33.1 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete]
|
||||
// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
|
||||
@@ -1090,7 +1090,7 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: %return.param_patt.27f: %pattern_type.4f4 = out_param_pattern [symbolic]
|
||||
// CHECK:STDOUT: %return.patt.d67: %pattern_type.4f4 = return_slot_pattern %return.param_patt.27f, %ptr.e8f [symbolic]
|
||||
// CHECK:STDOUT: %T.patt.d47: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_34.2 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_33.2 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %require_complete.d83f06.1: <witness> = require_complete_type %U.as_type.c1c [symbolic]
|
||||
// CHECK:STDOUT: %require_complete.ef1: <witness> = require_complete_type %ptr.e8f [symbolic]
|
||||
@@ -1102,7 +1102,7 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness.1da: <witness> = lookup_impl_witness %ptr.e8f, @Copy [symbolic]
|
||||
// CHECK:STDOUT: %.0e9: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.1da) [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: <specific function> = specific_function %empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_34.1(%Copy.facet) [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: <specific function> = specific_function %empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_33.1(%Copy.facet) [symbolic]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type.884: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic]
|
||||
// CHECK:STDOUT: %.be5: type = fn_type_with_self_type %Copy.WithSelf.Op.type.884, %Copy.facet [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem0.484: %.be5 = impl_witness_access %Copy.lookup_impl_witness.1da, element0 [symbolic]
|
||||
@@ -1119,35 +1119,35 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc8_7.2 as %I.ref {
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_34.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_34.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] {
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_33.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_33.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] {
|
||||
// CHECK:STDOUT: %U.patt.loc10_9.1: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_9.2 (constants.%U.patt.fe6)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_24.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_24.2 (constants.%x.param_patt.1f4)]
|
||||
// CHECK:STDOUT: %x.patt.loc10_24.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_24.1 [symbolic = %x.patt.loc10_24.2 (constants.%x.patt.f93)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_32.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_32.2 (constants.%return.param_patt.bf4475.2)]
|
||||
// CHECK:STDOUT: %return.patt.loc10_29.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_32.1, %.loc10_32.3 [symbolic = %return.patt.loc10_29.2 (constants.%return.patt.f44)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_23.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_23.2 (constants.%x.param_patt.1f4)]
|
||||
// CHECK:STDOUT: %x.patt.loc10_23.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_23.1 [symbolic = %x.patt.loc10_23.2 (constants.%x.patt.f93)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_31.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_31.2 (constants.%return.param_patt.bf4475.2)]
|
||||
// CHECK:STDOUT: %return.patt.loc10_28.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_31.1, %.loc10_31.3 [symbolic = %return.patt.loc10_28.2 (constants.%return.patt.f44)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %U.ref.loc10_32: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_32: type = facet_access_type %U.ref.loc10_32 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_32.3: type = converted %U.ref.loc10_32, %U.as_type.loc10_32 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_32.4: Core.Form = init_form %.loc10_32.3 [symbolic = %.loc10_32.2 (constants.%.1ce700.2)]
|
||||
// CHECK:STDOUT: %.loc10_16: type = splice_block %Copy.ref [concrete = constants.%Copy.type] {
|
||||
// CHECK:STDOUT: %U.ref.loc10_31: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_31: type = facet_access_type %U.ref.loc10_31 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_31.3: type = converted %U.ref.loc10_31, %U.as_type.loc10_31 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_31.4: Core.Form = init_form %.loc10_31.3 [symbolic = %.loc10_31.2 (constants.%.1ce700.2)]
|
||||
// CHECK:STDOUT: %.loc10_15: type = splice_block %Copy.ref [concrete = constants.%Copy.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: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc10_9.2: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc10_26.1: type = splice_block %.loc10_26.2 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)] {
|
||||
// CHECK:STDOUT: %U.ref.loc10_26: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_26.2: type = facet_access_type %U.ref.loc10_26 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_26.2: type = converted %U.ref.loc10_26, %U.as_type.loc10_26.2 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc10_25.1: type = splice_block %.loc10_25.2 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)] {
|
||||
// CHECK:STDOUT: %U.ref.loc10_25: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_25.2: type = facet_access_type %U.ref.loc10_25 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_25.2: type = converted %U.ref.loc10_25, %U.as_type.loc10_25.2 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: %return.param: ref @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = return_slot %return.param
|
||||
// CHECK:STDOUT: %x: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: %return.param: ref @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_34.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_34.2 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.2] {
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_33.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_33.2 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.2] {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: <elided>
|
||||
@@ -1155,85 +1155,85 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_34.1
|
||||
// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_33.1
|
||||
// CHECK:STDOUT: extend %I.ref
|
||||
// CHECK:STDOUT: witness = %I.impl_witness
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_34.1(%U.loc10_9.2: %Copy.type) {
|
||||
// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_33.1(%U.loc10_9.2: %Copy.type) {
|
||||
// CHECK:STDOUT: %U.patt.loc10_9.2: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_9.2 (constants.%U.patt.fe6)]
|
||||
// CHECK:STDOUT: %U.loc10_9.1: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_26.1: type = facet_access_type %U.loc10_9.1 [symbolic = %U.as_type.loc10_26.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc10_26.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_24.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_24.2 (constants.%x.param_patt.1f4)]
|
||||
// CHECK:STDOUT: %x.patt.loc10_24.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_24.2 [symbolic = %x.patt.loc10_24.2 (constants.%x.patt.f93)]
|
||||
// CHECK:STDOUT: %.loc10_32.2: Core.Form = init_form %U.as_type.loc10_26.1 [symbolic = %.loc10_32.2 (constants.%.1ce700.2)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_32.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_32.2 (constants.%return.param_patt.bf4475.2)]
|
||||
// CHECK:STDOUT: %return.patt.loc10_29.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_32.2, %U.as_type.loc10_26.1 [symbolic = %return.patt.loc10_29.2 (constants.%return.patt.f44)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_25.1: type = facet_access_type %U.loc10_9.1 [symbolic = %U.as_type.loc10_25.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc10_25.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_23.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_23.2 (constants.%x.param_patt.1f4)]
|
||||
// CHECK:STDOUT: %x.patt.loc10_23.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_23.2 [symbolic = %x.patt.loc10_23.2 (constants.%x.patt.f93)]
|
||||
// CHECK:STDOUT: %.loc10_31.2: Core.Form = init_form %U.as_type.loc10_25.1 [symbolic = %.loc10_31.2 (constants.%.1ce700.2)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_31.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_31.2 (constants.%return.param_patt.bf4475.2)]
|
||||
// CHECK:STDOUT: %return.patt.loc10_28.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_31.2, %U.as_type.loc10_25.1 [symbolic = %return.patt.loc10_28.2 (constants.%return.patt.f44)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type.loc10_26.1 [symbolic = %require_complete (constants.%require_complete.d83f06.1)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type.loc10_25.1 [symbolic = %require_complete (constants.%require_complete.d83f06.1)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%U.loc10_9.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.3)]
|
||||
// CHECK:STDOUT: %.loc10_43.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_9.1 [symbolic = %.loc10_43.3 (constants.%.c29330.2)]
|
||||
// CHECK:STDOUT: %.loc10_42.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_9.1 [symbolic = %.loc10_42.3 (constants.%.c29330.2)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %U.loc10_9.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_43.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43.3 (%.c29330.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.bd2456.2)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_43.2: <specific function> = specific_impl_function %impl.elem0.loc10_43.2, @Copy.WithSelf.Op(%U.loc10_9.1) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.e2af7e.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_42.2: @empty_tuple.type.as.I.impl.F.loc10_33.1.%.loc10_42.3 (%.c29330.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_42.2 (constants.%impl.elem0.bd2456.2)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_42.2: <specific function> = specific_impl_function %impl.elem0.loc10_42.2, @Copy.WithSelf.Op(%U.loc10_9.1) [symbolic = %specific_impl_fn.loc10_42.2 (constants.%specific_impl_fn.e2af7e.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) {
|
||||
// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = name_ref x, %x
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_43.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43.3 (%.c29330.2) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.bd2456.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_43.1: <bound method> = bound_method %x.ref, %impl.elem0.loc10_43.1
|
||||
// CHECK:STDOUT: %.loc10_43.1: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %.loc10_43.2: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_43.1: <specific function> = specific_impl_function %impl.elem0.loc10_43.1, @Copy.WithSelf.Op(constants.%U.f84) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.e2af7e.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_43.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc10_43.1
|
||||
// CHECK:STDOUT: %.loc10_32.1: ref @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) = splice_block %return.param {}
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.as_type.loc10_26.1 (%U.as_type.c1c) to %.loc10_32.1 = call %bound_method.loc10_43.2(%x.ref)
|
||||
// CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = name_ref x, %x
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_42.1: @empty_tuple.type.as.I.impl.F.loc10_33.1.%.loc10_42.3 (%.c29330.2) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_42.2 (constants.%impl.elem0.bd2456.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_42.1: <bound method> = bound_method %x.ref, %impl.elem0.loc10_42.1
|
||||
// CHECK:STDOUT: %.loc10_42.1: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %.loc10_42.2: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_42.1: <specific function> = specific_impl_function %impl.elem0.loc10_42.1, @Copy.WithSelf.Op(constants.%U.f84) [symbolic = %specific_impl_fn.loc10_42.2 (constants.%specific_impl_fn.e2af7e.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_42.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc10_42.1
|
||||
// CHECK:STDOUT: %.loc10_31.1: ref @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) = splice_block %return.param {}
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_33.1.%U.as_type.loc10_25.1 (%U.as_type.c1c) to %.loc10_31.1 = call %bound_method.loc10_42.2(%x.ref)
|
||||
// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_34.2(%T.2: type) {
|
||||
// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_33.2(%T.2: type) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %.loc10_34.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.1) [symbolic = %.loc10_34.3 (constants.%.0e9)]
|
||||
// CHECK:STDOUT: %.loc10_33.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.1) [symbolic = %.loc10_33.3 (constants.%.0e9)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_34.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.2: <specific function> = specific_function constants.%empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_34.1(%Copy.facet.loc10_34.3) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_33.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.2: <specific function> = specific_function constants.%empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_33.1(%Copy.facet.loc10_33.3) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_34.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] {
|
||||
// CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_33.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_33.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_33.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_34.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_34.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %.loc10_34.1: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_34.1 [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_34.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %.loc10_34.2: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_34.2 [symbolic = %Copy.facet.loc10_34.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.1: <specific function> = specific_function %F.ref, @empty_tuple.type.as.I.impl.F.loc10_34.1(constants.%Copy.facet) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.call: init @empty_tuple.type.as.I.impl.F.loc10_34.2.%ptr (%ptr.e8f) = call %empty_tuple.type.as.I.impl.F.specific_fn.loc10_34.1(%x.param)
|
||||
// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_33.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_33.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %.loc10_33.1: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_33.1 [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_33.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %.loc10_33.2: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_33.2 [symbolic = %Copy.facet.loc10_33.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.1: <specific function> = specific_function %F.ref, @empty_tuple.type.as.I.impl.F.loc10_33.1(constants.%Copy.facet) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.call: init @empty_tuple.type.as.I.impl.F.loc10_33.2.%ptr (%ptr.e8f) = call %empty_tuple.type.as.I.impl.F.specific_fn.loc10_33.1(%x.param)
|
||||
// CHECK:STDOUT: return %empty_tuple.type.as.I.impl.F.call
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_34.1(constants.%U.f84) {
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_33.1(constants.%U.f84) {
|
||||
// CHECK:STDOUT: %U.patt.loc10_9.2 => constants.%U.patt.fe6
|
||||
// CHECK:STDOUT: %U.loc10_9.1 => constants.%U.f84
|
||||
// CHECK:STDOUT: %U.as_type.loc10_26.1 => constants.%U.as_type.c1c
|
||||
// CHECK:STDOUT: %U.as_type.loc10_25.1 => constants.%U.as_type.c1c
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_24.2 => constants.%x.param_patt.1f4
|
||||
// CHECK:STDOUT: %x.patt.loc10_24.2 => constants.%x.patt.f93
|
||||
// CHECK:STDOUT: %.loc10_32.2 => constants.%.1ce700.2
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_32.2 => constants.%return.param_patt.bf4475.2
|
||||
// CHECK:STDOUT: %return.patt.loc10_29.2 => constants.%return.patt.f44
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_23.2 => constants.%x.param_patt.1f4
|
||||
// CHECK:STDOUT: %x.patt.loc10_23.2 => constants.%x.patt.f93
|
||||
// CHECK:STDOUT: %.loc10_31.2 => constants.%.1ce700.2
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_31.2 => constants.%return.param_patt.bf4475.2
|
||||
// CHECK:STDOUT: %return.patt.loc10_28.2 => constants.%return.patt.f44
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_34.2(constants.%T.67d) {
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_33.2(constants.%T.67d) {
|
||||
// CHECK:STDOUT: %T.patt.2 => constants.%T.patt.d47
|
||||
// CHECK:STDOUT: %T.1 => constants.%T.67d
|
||||
// CHECK:STDOUT: %ptr => constants.%ptr.e8f
|
||||
@@ -1245,24 +1245,24 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: %.loc5 => constants.%.cb6
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_34.1(constants.%Copy.facet) {
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_33.1(constants.%Copy.facet) {
|
||||
// CHECK:STDOUT: %U.patt.loc10_9.2 => constants.%U.patt.fe6
|
||||
// CHECK:STDOUT: %U.loc10_9.1 => constants.%Copy.facet
|
||||
// CHECK:STDOUT: %U.as_type.loc10_26.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %U.as_type.loc10_25.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_24.2 => constants.%x.param_patt.b5c
|
||||
// CHECK:STDOUT: %x.patt.loc10_24.2 => constants.%x.patt.b28
|
||||
// CHECK:STDOUT: %.loc10_32.2 => constants.%.cb6
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_32.2 => constants.%return.param_patt.27f
|
||||
// CHECK:STDOUT: %return.patt.loc10_29.2 => constants.%return.patt.d67
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_23.2 => constants.%x.param_patt.b5c
|
||||
// CHECK:STDOUT: %x.patt.loc10_23.2 => constants.%x.patt.b28
|
||||
// CHECK:STDOUT: %.loc10_31.2 => constants.%.cb6
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_31.2 => constants.%return.param_patt.27f
|
||||
// CHECK:STDOUT: %return.patt.loc10_28.2 => constants.%return.patt.d67
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete.ef1
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.884
|
||||
// CHECK:STDOUT: %.loc10_43.3 => constants.%.be5
|
||||
// CHECK:STDOUT: %.loc10_42.3 => constants.%.be5
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.1da
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_43.2 => constants.%impl.elem0.484
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_43.2 => constants.%specific_impl_fn.a76
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_42.2 => constants.%impl.elem0.484
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_42.2 => constants.%specific_impl_fn.a76
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- generic_method.carbon
|
||||
@@ -1289,7 +1289,7 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: %.1ce700.2: Core.Form = init_form %U.as_type.c1c [symbolic]
|
||||
// CHECK:STDOUT: %return.param_patt.bf4475.2: %pattern_type.2c66b4.2 = out_param_pattern [symbolic]
|
||||
// CHECK:STDOUT: %return.patt.f44: %pattern_type.2c66b4.2 = return_slot_pattern %return.param_patt.bf4475.2, %U.as_type.c1c [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_51.1 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_50.1 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete]
|
||||
// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
|
||||
@@ -1301,7 +1301,7 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: %return.param_patt.27f: %pattern_type.4f4 = out_param_pattern [symbolic]
|
||||
// CHECK:STDOUT: %return.patt.d67: %pattern_type.4f4 = return_slot_pattern %return.param_patt.27f, %ptr.e8f [symbolic]
|
||||
// CHECK:STDOUT: %T.patt.d47: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_51.2 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_50.2 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %require_complete.d83f06.1: <witness> = require_complete_type %U.as_type.c1c [symbolic]
|
||||
// CHECK:STDOUT: %require_complete.ef1: <witness> = require_complete_type %ptr.e8f [symbolic]
|
||||
@@ -1313,7 +1313,7 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness.1da: <witness> = lookup_impl_witness %ptr.e8f, @Copy [symbolic]
|
||||
// CHECK:STDOUT: %.0e9: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.1da) [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: <specific function> = specific_function %empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_51.1(%Copy.facet) [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: <specific function> = specific_function %empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_50.1(%Copy.facet) [symbolic]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type.884: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic]
|
||||
// CHECK:STDOUT: %.be5: type = fn_type_with_self_type %Copy.WithSelf.Op.type.884, %Copy.facet [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem0.484: %.be5 = impl_witness_access %Copy.lookup_impl_witness.1da, element0 [symbolic]
|
||||
@@ -1330,43 +1330,43 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc8_7.2 as %I.ref {
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_51.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_51.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] {
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_50.1: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_50.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1] {
|
||||
// CHECK:STDOUT: %U.patt.loc10_9.1: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_9.2 (constants.%U.patt.fe6)]
|
||||
// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern [concrete = constants.%self.param_patt.154]
|
||||
// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = at_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8c1]
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_41.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_41.2 (constants.%x.param_patt.1f4)]
|
||||
// CHECK:STDOUT: %x.patt.loc10_41.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_41.1 [symbolic = %x.patt.loc10_41.2 (constants.%x.patt.f93)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_49.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_49.2 (constants.%return.param_patt.bf4475.2)]
|
||||
// CHECK:STDOUT: %return.patt.loc10_46.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_49.1, %.loc10_49.3 [symbolic = %return.patt.loc10_46.2 (constants.%return.patt.f44)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_40.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_40.2 (constants.%x.param_patt.1f4)]
|
||||
// CHECK:STDOUT: %x.patt.loc10_40.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_40.1 [symbolic = %x.patt.loc10_40.2 (constants.%x.patt.f93)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_48.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_48.2 (constants.%return.param_patt.bf4475.2)]
|
||||
// CHECK:STDOUT: %return.patt.loc10_45.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_48.1, %.loc10_48.3 [symbolic = %return.patt.loc10_45.2 (constants.%return.patt.f44)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %U.ref.loc10_49: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_49: type = facet_access_type %U.ref.loc10_49 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_49.3: type = converted %U.ref.loc10_49, %U.as_type.loc10_49 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_49.4: Core.Form = init_form %.loc10_49.3 [symbolic = %.loc10_49.2 (constants.%.1ce700.2)]
|
||||
// CHECK:STDOUT: %.loc10_16: type = splice_block %Copy.ref [concrete = constants.%Copy.type] {
|
||||
// CHECK:STDOUT: %U.ref.loc10_48: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_48: type = facet_access_type %U.ref.loc10_48 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_48.3: type = converted %U.ref.loc10_48, %U.as_type.loc10_48 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_48.4: Core.Form = init_form %.loc10_48.3 [symbolic = %.loc10_48.2 (constants.%.1ce700.2)]
|
||||
// CHECK:STDOUT: %.loc10_15: type = splice_block %Copy.ref [concrete = constants.%Copy.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: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc10_9.2: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc10_37.1: type = splice_block %.loc10_37.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc10_37.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc10_37.3: type = converted %.loc10_37.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc10_36.1: type = splice_block %.loc10_36.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc10_36.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc10_36.3: type = converted %.loc10_36.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: %empty_tuple.type = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = value_param call_param1
|
||||
// CHECK:STDOUT: %.loc10_43.1: type = splice_block %.loc10_43.2 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)] {
|
||||
// CHECK:STDOUT: %U.ref.loc10_43: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_43.2: type = facet_access_type %U.ref.loc10_43 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_43.2: type = converted %U.ref.loc10_43, %U.as_type.loc10_43.2 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %x.param: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = value_param call_param1
|
||||
// CHECK:STDOUT: %.loc10_42.1: type = splice_block %.loc10_42.2 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)] {
|
||||
// CHECK:STDOUT: %U.ref.loc10_42: %Copy.type = name_ref U, %U.loc10_9.2 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_42.2: type = facet_access_type %U.ref.loc10_42 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %.loc10_42.2: type = converted %U.ref.loc10_42, %U.as_type.loc10_42.2 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: %return.param: ref @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = out_param call_param2
|
||||
// CHECK:STDOUT: %return: ref @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = return_slot %return.param
|
||||
// CHECK:STDOUT: %x: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: %return.param: ref @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = out_param call_param2
|
||||
// CHECK:STDOUT: %return: ref @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_51.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_51.2 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.2] {
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_50.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_50.2 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.2] {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: <elided>
|
||||
@@ -1374,87 +1374,87 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_51.1
|
||||
// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_50.1
|
||||
// CHECK:STDOUT: extend %I.ref
|
||||
// CHECK:STDOUT: witness = %I.impl_witness
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_51.1(%U.loc10_9.2: %Copy.type) {
|
||||
// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_50.1(%U.loc10_9.2: %Copy.type) {
|
||||
// CHECK:STDOUT: %U.patt.loc10_9.2: %pattern_type.e81 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_9.2 (constants.%U.patt.fe6)]
|
||||
// CHECK:STDOUT: %U.loc10_9.1: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_43.1: type = facet_access_type %U.loc10_9.1 [symbolic = %U.as_type.loc10_43.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc10_43.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_41.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_41.2 (constants.%x.param_patt.1f4)]
|
||||
// CHECK:STDOUT: %x.patt.loc10_41.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_41.2 [symbolic = %x.patt.loc10_41.2 (constants.%x.patt.f93)]
|
||||
// CHECK:STDOUT: %.loc10_49.2: Core.Form = init_form %U.as_type.loc10_43.1 [symbolic = %.loc10_49.2 (constants.%.1ce700.2)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_49.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_49.2 (constants.%return.param_patt.bf4475.2)]
|
||||
// CHECK:STDOUT: %return.patt.loc10_46.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_49.2, %U.as_type.loc10_43.1 [symbolic = %return.patt.loc10_46.2 (constants.%return.patt.f44)]
|
||||
// CHECK:STDOUT: %U.as_type.loc10_42.1: type = facet_access_type %U.loc10_9.1 [symbolic = %U.as_type.loc10_42.1 (constants.%U.as_type.c1c)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %U.as_type.loc10_42.1 [symbolic = %pattern_type (constants.%pattern_type.2c66b4.2)]
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_40.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc10_40.2 (constants.%x.param_patt.1f4)]
|
||||
// CHECK:STDOUT: %x.patt.loc10_40.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = at_binding_pattern x, %x.param_patt.loc10_40.2 [symbolic = %x.patt.loc10_40.2 (constants.%x.patt.f93)]
|
||||
// CHECK:STDOUT: %.loc10_48.2: Core.Form = init_form %U.as_type.loc10_42.1 [symbolic = %.loc10_48.2 (constants.%.1ce700.2)]
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_48.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc10_48.2 (constants.%return.param_patt.bf4475.2)]
|
||||
// CHECK:STDOUT: %return.patt.loc10_45.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%pattern_type (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc10_48.2, %U.as_type.loc10_42.1 [symbolic = %return.patt.loc10_45.2 (constants.%return.patt.f44)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type.loc10_43.1 [symbolic = %require_complete (constants.%require_complete.d83f06.1)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %U.as_type.loc10_42.1 [symbolic = %require_complete (constants.%require_complete.d83f06.1)]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%U.loc10_9.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.c85f21.3)]
|
||||
// CHECK:STDOUT: %.loc10_60.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_9.1 [symbolic = %.loc10_60.3 (constants.%.c29330.2)]
|
||||
// CHECK:STDOUT: %.loc10_59.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_9.1 [symbolic = %.loc10_59.3 (constants.%.c29330.2)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %U.loc10_9.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_60.2: @empty_tuple.type.as.I.impl.F.loc10_51.1.%.loc10_60.3 (%.c29330.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.bd2456.2)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_60.2: <specific function> = specific_impl_function %impl.elem0.loc10_60.2, @Copy.WithSelf.Op(%U.loc10_9.1) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.e2af7e.2)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_59.2: @empty_tuple.type.as.I.impl.F.loc10_50.1.%.loc10_59.3 (%.c29330.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_59.2 (constants.%impl.elem0.bd2456.2)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_59.2: <specific function> = specific_impl_function %impl.elem0.loc10_59.2, @Copy.WithSelf.Op(%U.loc10_9.1) [symbolic = %specific_impl_fn.loc10_59.2 (constants.%specific_impl_fn.e2af7e.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) {
|
||||
// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = name_ref x, %x
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_60.1: @empty_tuple.type.as.I.impl.F.loc10_51.1.%.loc10_60.3 (%.c29330.2) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.bd2456.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_60.1: <bound method> = bound_method %x.ref, %impl.elem0.loc10_60.1
|
||||
// CHECK:STDOUT: %.loc10_60.1: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %.loc10_60.2: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_60.1: <specific function> = specific_impl_function %impl.elem0.loc10_60.1, @Copy.WithSelf.Op(constants.%U.f84) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.e2af7e.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_60.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc10_60.1
|
||||
// CHECK:STDOUT: %.loc10_49.1: ref @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) = splice_block %return.param {}
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_51.1.%U.as_type.loc10_43.1 (%U.as_type.c1c) to %.loc10_49.1 = call %bound_method.loc10_60.2(%x.ref)
|
||||
// CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = name_ref x, %x
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_59.1: @empty_tuple.type.as.I.impl.F.loc10_50.1.%.loc10_59.3 (%.c29330.2) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_59.2 (constants.%impl.elem0.bd2456.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_59.1: <bound method> = bound_method %x.ref, %impl.elem0.loc10_59.1
|
||||
// CHECK:STDOUT: %.loc10_59.1: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %.loc10_59.2: %Copy.type = converted constants.%U.as_type.c1c, constants.%U.f84 [symbolic = %U.loc10_9.1 (constants.%U.f84)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_59.1: <specific function> = specific_impl_function %impl.elem0.loc10_59.1, @Copy.WithSelf.Op(constants.%U.f84) [symbolic = %specific_impl_fn.loc10_59.2 (constants.%specific_impl_fn.e2af7e.2)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_59.2: <bound method> = bound_method %x.ref, %specific_impl_fn.loc10_59.1
|
||||
// CHECK:STDOUT: %.loc10_48.1: ref @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) = splice_block %return.param {}
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_50.1.%U.as_type.loc10_42.1 (%U.as_type.c1c) to %.loc10_48.1 = call %bound_method.loc10_59.2(%x.ref)
|
||||
// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_51.2(%T.2: type) {
|
||||
// CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_50.2(%T.2: type) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %.loc10_51.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.1) [symbolic = %.loc10_51.3 (constants.%.0e9)]
|
||||
// CHECK:STDOUT: %.loc10_50.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.1) [symbolic = %.loc10_50.3 (constants.%.0e9)]
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.1da)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_51.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.2: <specific function> = specific_function constants.%empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_51.1(%Copy.facet.loc10_51.3) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_50.3: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.2: <specific function> = specific_function constants.%empty_tuple.type.as.I.impl.F.bd5be1.1, @empty_tuple.type.as.I.impl.F.loc10_50.1(%Copy.facet.loc10_50.3) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_51.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] {
|
||||
// CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_50.2.%ptr (%ptr.e8f)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_50.2.%ptr (%ptr.e8f) [thunk @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_50.1 for @I.WithSelf.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet, constants.%T.67d)] {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_51.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1]
|
||||
// CHECK:STDOUT: %F.ref: %empty_tuple.type.as.I.impl.F.type.48cdab.1 = name_ref F, @empty_tuple.type.as.I.impl.%empty_tuple.type.as.I.impl.F.decl.loc10_50.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.bd5be1.1]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bound: <bound method> = bound_method %self.param, %F.ref
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_51.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %.loc10_51.1: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_51.1 [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_51.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %.loc10_51.2: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_51.2 [symbolic = %Copy.facet.loc10_51.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.1: <specific function> = specific_function %F.ref, @empty_tuple.type.as.I.impl.F.loc10_51.1(constants.%Copy.facet) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %self.param, %empty_tuple.type.as.I.impl.F.specific_fn.loc10_51.1
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.call: init @empty_tuple.type.as.I.impl.F.loc10_51.2.%ptr (%ptr.e8f) = call %bound_method(%self.param, %x.param)
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_50.1: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %.loc10_50.1: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_50.1 [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %Copy.facet.loc10_50.2: %Copy.type = facet_value constants.%ptr.e8f, (constants.%Copy.lookup_impl_witness.1da) [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %.loc10_50.2: %Copy.type = converted constants.%ptr.e8f, %Copy.facet.loc10_50.2 [symbolic = %Copy.facet.loc10_50.3 (constants.%Copy.facet)]
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.1: <specific function> = specific_function %F.ref, @empty_tuple.type.as.I.impl.F.loc10_50.1(constants.%Copy.facet) [symbolic = %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.2 (constants.%empty_tuple.type.as.I.impl.F.specific_fn)]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %self.param, %empty_tuple.type.as.I.impl.F.specific_fn.loc10_50.1
|
||||
// CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.call: init @empty_tuple.type.as.I.impl.F.loc10_50.2.%ptr (%ptr.e8f) = call %bound_method(%self.param, %x.param)
|
||||
// CHECK:STDOUT: return %empty_tuple.type.as.I.impl.F.call
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_51.1(constants.%U.f84) {
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_50.1(constants.%U.f84) {
|
||||
// CHECK:STDOUT: %U.patt.loc10_9.2 => constants.%U.patt.fe6
|
||||
// CHECK:STDOUT: %U.loc10_9.1 => constants.%U.f84
|
||||
// CHECK:STDOUT: %U.as_type.loc10_43.1 => constants.%U.as_type.c1c
|
||||
// CHECK:STDOUT: %U.as_type.loc10_42.1 => constants.%U.as_type.c1c
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2c66b4.2
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_41.2 => constants.%x.param_patt.1f4
|
||||
// CHECK:STDOUT: %x.patt.loc10_41.2 => constants.%x.patt.f93
|
||||
// CHECK:STDOUT: %.loc10_49.2 => constants.%.1ce700.2
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_49.2 => constants.%return.param_patt.bf4475.2
|
||||
// CHECK:STDOUT: %return.patt.loc10_46.2 => constants.%return.patt.f44
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_40.2 => constants.%x.param_patt.1f4
|
||||
// CHECK:STDOUT: %x.patt.loc10_40.2 => constants.%x.patt.f93
|
||||
// CHECK:STDOUT: %.loc10_48.2 => constants.%.1ce700.2
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_48.2 => constants.%return.param_patt.bf4475.2
|
||||
// CHECK:STDOUT: %return.patt.loc10_45.2 => constants.%return.patt.f44
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_51.2(constants.%T.67d) {
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_50.2(constants.%T.67d) {
|
||||
// CHECK:STDOUT: %T.patt.2 => constants.%T.patt.d47
|
||||
// CHECK:STDOUT: %T.1 => constants.%T.67d
|
||||
// CHECK:STDOUT: %ptr => constants.%ptr.e8f
|
||||
@@ -1466,24 +1466,24 @@ impl () as I({}) {
|
||||
// CHECK:STDOUT: %.loc5 => constants.%.cb6
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_51.1(constants.%Copy.facet) {
|
||||
// CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_50.1(constants.%Copy.facet) {
|
||||
// CHECK:STDOUT: %U.patt.loc10_9.2 => constants.%U.patt.fe6
|
||||
// CHECK:STDOUT: %U.loc10_9.1 => constants.%Copy.facet
|
||||
// CHECK:STDOUT: %U.as_type.loc10_43.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %U.as_type.loc10_42.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_41.2 => constants.%x.param_patt.b5c
|
||||
// CHECK:STDOUT: %x.patt.loc10_41.2 => constants.%x.patt.b28
|
||||
// CHECK:STDOUT: %.loc10_49.2 => constants.%.cb6
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_49.2 => constants.%return.param_patt.27f
|
||||
// CHECK:STDOUT: %return.patt.loc10_46.2 => constants.%return.patt.d67
|
||||
// CHECK:STDOUT: %x.param_patt.loc10_40.2 => constants.%x.param_patt.b5c
|
||||
// CHECK:STDOUT: %x.patt.loc10_40.2 => constants.%x.patt.b28
|
||||
// CHECK:STDOUT: %.loc10_48.2 => constants.%.cb6
|
||||
// CHECK:STDOUT: %return.param_patt.loc10_48.2 => constants.%return.param_patt.27f
|
||||
// CHECK:STDOUT: %return.patt.loc10_45.2 => constants.%return.patt.d67
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete.ef1
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.884
|
||||
// CHECK:STDOUT: %.loc10_60.3 => constants.%.be5
|
||||
// CHECK:STDOUT: %.loc10_59.3 => constants.%.be5
|
||||
// CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.1da
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_60.2 => constants.%impl.elem0.484
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_60.2 => constants.%specific_impl_fn.a76
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_59.2 => constants.%impl.elem0.484
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc10_59.2 => constants.%specific_impl_fn.a76
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- generic_interface.carbon
|
||||
|
||||
+10
-10
@@ -14,7 +14,7 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface X(T:! type, U:! type) {
|
||||
interface X(T: type, U: type) {
|
||||
fn F(t: T) -> U;
|
||||
}
|
||||
|
||||
@@ -44,13 +44,13 @@ class A {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class Wrap(T:! type) {}
|
||||
class Wrap(T: type) {}
|
||||
|
||||
interface OpWith(U:! type) {
|
||||
interface OpWith(U: type) {
|
||||
fn Op(self, u: U);
|
||||
}
|
||||
|
||||
impl forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) {
|
||||
impl forall [T: type, U: Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) {
|
||||
// CHECK:STDERR: fail_todo_out_of_line_thunk.carbon:[[@LINE+7]]:3: error: use of undefined generic function [MissingGenericFunctionDefinition]
|
||||
// CHECK:STDERR: fn Op(self, other: Self);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -63,19 +63,19 @@ impl forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) {
|
||||
|
||||
// TODO: Once we support the syntax for defining impl members out of line,
|
||||
// define the above function here.
|
||||
// fn (forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U)).Op(self, other: Self) {}
|
||||
// fn (forall [T: type, U: Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U)).Op(self, other: Self) {}
|
||||
|
||||
// --- builtin_thunk.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class Wrap(T:! type) {}
|
||||
class Wrap(T: type) {}
|
||||
|
||||
interface OpWith(U:! type) {
|
||||
interface OpWith(U: type) {
|
||||
fn Op(self, u: U);
|
||||
}
|
||||
|
||||
impl forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) {
|
||||
impl forall [T: type, U: Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) {
|
||||
fn Op(self, other: Self) = "no_op";
|
||||
}
|
||||
|
||||
@@ -83,10 +83,10 @@ impl forall [T:! type, U:! Core.ImplicitAs(Wrap(T))] Wrap(T) as OpWith(U) {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Add(T:! type) {
|
||||
interface Add(T: type) {
|
||||
fn Op(a: Self, b: T) -> Self;
|
||||
}
|
||||
impl forall [T:! Core.ImplicitAs(i32)] i32 as Add(T) {
|
||||
impl forall [T: Core.ImplicitAs(i32)] i32 as Add(T) {
|
||||
fn Op(a: Self, b: Self) -> Self = "int.sadd";
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@
|
||||
// --- fail_match_with_associated_type.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I { let T:! type; }
|
||||
constraint N(U:! type) {}
|
||||
interface I { let T: type; }
|
||||
constraint N(U: type) {}
|
||||
|
||||
// CHECK:STDERR: fail_match_with_associated_type.carbon:[[@LINE+4]]:1: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl () as I where .T = {};
|
||||
|
||||
@@ -29,15 +29,15 @@ interface Add {
|
||||
|
||||
fn Int(n: IntLiteral) -> type = "int.make_type_signed";
|
||||
|
||||
class MyInt(N:! IntLiteral) {
|
||||
class MyInt(N: IntLiteral) {
|
||||
adapt Int(N);
|
||||
}
|
||||
|
||||
impl forall [N:! IntLiteral] MyInt(N) as Add {
|
||||
impl forall [N: IntLiteral] MyInt(N) as Add {
|
||||
fn Op(self, other: Self) -> Self = "int.sadd";
|
||||
}
|
||||
|
||||
fn Double[N:! IntLiteral](x: MyInt(N)) -> MyInt(N) {
|
||||
fn Double[N: IntLiteral](x: MyInt(N)) -> MyInt(N) {
|
||||
return x.(Add.Op)(x);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ fn Int(n: IntLiteral) -> type = "int.make_type_signed";
|
||||
fn ToLiteral(n: Int(32)) -> IntLiteral = "int.convert_checked";
|
||||
fn FromLiteral(n: IntLiteral) -> Int(32) = "int.convert_checked";
|
||||
|
||||
fn Make(N:! Int(32)) -> Int(ToLiteral(N)) { return Make(N); }
|
||||
fn Make(generic N: Int(32)) -> Int(ToLiteral(N)) { return Make(N); }
|
||||
|
||||
class OtherInt {
|
||||
adapt Int(32);
|
||||
@@ -72,7 +72,7 @@ class OtherInt {
|
||||
|
||||
fn OtherInt.ToLiteral(self) -> IntLiteral = "int.convert_checked";
|
||||
|
||||
fn MakeFromClass(N:! OtherInt) -> Int(N.ToLiteral()) { return MakeFromClass(N); }
|
||||
fn MakeFromClass(generic N: OtherInt) -> Int(N.ToLiteral()) { return MakeFromClass(N); }
|
||||
|
||||
// --- use_convert_symbolic.carbon
|
||||
|
||||
|
||||
@@ -39,17 +39,17 @@ interface SimpleOp {
|
||||
fn Op(self);
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as SimpleOp {
|
||||
impl forall [T: type] T as SimpleOp {
|
||||
fn Op(unused self) {}
|
||||
}
|
||||
|
||||
// An empty interface with blanket impl for pointers.
|
||||
interface Empty {}
|
||||
impl forall [T:! type] T as Empty {}
|
||||
impl forall [T: type] T as Empty {}
|
||||
|
||||
// Class with a use of `SimpleOp.Op`.
|
||||
class InterfaceWrap(T:! SimpleOp & Empty) {
|
||||
fn UseSimpleOp(unused self, value:! T) {
|
||||
class InterfaceWrap(T: SimpleOp & Empty) {
|
||||
fn UseSimpleOp(unused self, generic value: T) {
|
||||
value.(SimpleOp.Op)();
|
||||
}
|
||||
}
|
||||
@@ -57,12 +57,12 @@ class InterfaceWrap(T:! SimpleOp & Empty) {
|
||||
// Interface combining the above for an indirect `SimpleOp` use through `C`,
|
||||
// particularly use an associated constant.
|
||||
interface CombinedFacet {
|
||||
let T:! SimpleOp & Empty;
|
||||
let T: SimpleOp & Empty;
|
||||
fn GetInterfaceWrap(self) -> InterfaceWrap(T);
|
||||
}
|
||||
|
||||
// A wrapper providing `CombinedFacet`.
|
||||
class TypeWrap(T:! type) {
|
||||
class TypeWrap(T: type) {
|
||||
impl as CombinedFacet where .T = T {
|
||||
fn GetInterfaceWrap(unused self) -> InterfaceWrap(T) {
|
||||
return {};
|
||||
@@ -77,6 +77,6 @@ import library "interfaces";
|
||||
|
||||
class C {}
|
||||
|
||||
fn F(t: TypeWrap(C), c:! C) {
|
||||
fn F(t: TypeWrap(C), generic c: C) {
|
||||
t.(CombinedFacet.GetInterfaceWrap)().UseSimpleOp(c);
|
||||
}
|
||||
+357
-357
File diff suppressed because it is too large.
Load diff
@@ -15,16 +15,16 @@
|
||||
// --- interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I { let T:! type; }
|
||||
interface I { let T: type; }
|
||||
|
||||
interface I3 {
|
||||
let T1:! type;
|
||||
let T2:! type;
|
||||
let T3:! type;
|
||||
let T1: type;
|
||||
let T2: type;
|
||||
let T3: type;
|
||||
}
|
||||
|
||||
interface NonType {
|
||||
let Y:! {.a: {}};
|
||||
let Y: {.a: {}};
|
||||
}
|
||||
|
||||
// --- basic.carbon
|
||||
@@ -106,8 +106,8 @@ impl C6 as I where .T = {};
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-7]]:1: in import [InImport]
|
||||
// CHECK:STDERR: interface.carbon:3:19: note: associated constant declared here [AssociatedConstantHere]
|
||||
// CHECK:STDERR: interface I { let T:! type; }
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: interface I { let T: type; }
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_missing_on_definition.carbon:[[@LINE-9]]:1: error: impl declared but not defined [ImplMissingDefinition]
|
||||
// CHECK:STDERR: impl C6 as I where .T = {};
|
||||
|
||||
+46
-46
@@ -16,18 +16,18 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
// The I.Assoc will be a facet of type Y.
|
||||
interface Y {}
|
||||
impl forall [T:! type] T as Y {}
|
||||
impl forall [T: type] T as Y {}
|
||||
|
||||
// C takes a facet of type Z.
|
||||
interface Z {}
|
||||
impl forall [U:! type] U as Z {}
|
||||
impl forall [U: type] U as Z {}
|
||||
|
||||
class C(V:! Z) {
|
||||
class C(V: Z) {
|
||||
adapt ();
|
||||
}
|
||||
|
||||
interface I {
|
||||
let Assoc:! Y;
|
||||
let Assoc: Y;
|
||||
|
||||
// This is a generic function with a specific that contains a reference `Self`
|
||||
// in it (in the ImplWitnessAccess for `Self.Assoc`). The `Self.Assoc` is
|
||||
@@ -45,7 +45,7 @@ import library "impl_def";
|
||||
|
||||
class E {}
|
||||
|
||||
class D(N:! E) {}
|
||||
class D(N: E) {}
|
||||
|
||||
// The eval block for this generic `impl` must not include any instructions
|
||||
// derived from the import of `I.F`.
|
||||
@@ -58,7 +58,7 @@ class D(N:! E) {}
|
||||
// that evaluation (such as inside impl lookup deduction against the U in the
|
||||
// impl for Z) should not be inappropriately added to this impl's generic eval
|
||||
// block.
|
||||
impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
impl forall [N: E] D(N) as I where .Assoc = () {
|
||||
fn F(unused c: C(())) {}
|
||||
}
|
||||
|
||||
@@ -122,9 +122,9 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_15.1 [symbolic = %T.loc5_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
|
||||
// CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc5_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc5_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -134,9 +134,9 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc9_15.1 [symbolic = %U.loc9_15.2 (constants.%U)]
|
||||
// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
|
||||
// CHECK:STDOUT: %.loc9_18.1: type = splice_block %.loc9_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc9_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc9_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc9_15.1: type = symbolic_binding U, 0 [symbolic = %U.loc9_15.2 (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -222,34 +222,34 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: generic impl @T.as.Y.impl(%T.loc5_15.1: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc5_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc5_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_15.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %Y.impl_witness.loc5_31.2: <witness> = impl_witness %Y.impl_witness_table, @T.as.Y.impl(%T.loc5_15.2) [symbolic = %Y.impl_witness.loc5_31.2 (constants.%Y.impl_witness)]
|
||||
// CHECK:STDOUT: %Y.impl_witness.loc5_30.2: <witness> = impl_witness %Y.impl_witness_table, @T.as.Y.impl(%T.loc5_15.2) [symbolic = %Y.impl_witness.loc5_30.2 (constants.%Y.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %T.ref as %Y.ref {
|
||||
// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (), @T.as.Y.impl [concrete]
|
||||
// CHECK:STDOUT: %Y.impl_witness.loc5_31.1: <witness> = impl_witness %Y.impl_witness_table, @T.as.Y.impl(constants.%T) [symbolic = %Y.impl_witness.loc5_31.2 (constants.%Y.impl_witness)]
|
||||
// CHECK:STDOUT: %Y.impl_witness.loc5_30.1: <witness> = impl_witness %Y.impl_witness_table, @T.as.Y.impl(constants.%T) [symbolic = %Y.impl_witness.loc5_30.2 (constants.%Y.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: extend %Y.ref
|
||||
// CHECK:STDOUT: witness = %Y.impl_witness.loc5_31.1
|
||||
// CHECK:STDOUT: witness = %Y.impl_witness.loc5_30.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic impl @U.as.Z.impl(%U.loc9_15.1: type) {
|
||||
// CHECK:STDOUT: %U.patt.loc9_15.2: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc9_15.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %U.loc9_15.2: type = symbolic_binding U, 0 [symbolic = %U.loc9_15.2 (constants.%U)]
|
||||
// CHECK:STDOUT: %Z.impl_witness.loc9_31.2: <witness> = impl_witness %Z.impl_witness_table, @U.as.Z.impl(%U.loc9_15.2) [symbolic = %Z.impl_witness.loc9_31.2 (constants.%Z.impl_witness.4e2)]
|
||||
// CHECK:STDOUT: %Z.impl_witness.loc9_30.2: <witness> = impl_witness %Z.impl_witness_table, @U.as.Z.impl(%U.loc9_15.2) [symbolic = %Z.impl_witness.loc9_30.2 (constants.%Z.impl_witness.4e2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %U.ref as %Z.ref {
|
||||
// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @U.as.Z.impl [concrete]
|
||||
// CHECK:STDOUT: %Z.impl_witness.loc9_31.1: <witness> = impl_witness %Z.impl_witness_table, @U.as.Z.impl(constants.%U) [symbolic = %Z.impl_witness.loc9_31.2 (constants.%Z.impl_witness.4e2)]
|
||||
// CHECK:STDOUT: %Z.impl_witness.loc9_30.1: <witness> = impl_witness %Z.impl_witness_table, @U.as.Z.impl(constants.%U) [symbolic = %Z.impl_witness.loc9_30.2 (constants.%Z.impl_witness.4e2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: extend %Z.ref
|
||||
// CHECK:STDOUT: witness = %Z.impl_witness.loc9_31.1
|
||||
// CHECK:STDOUT: witness = %Z.impl_witness.loc9_30.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -294,7 +294,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: specific @T.as.Y.impl(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc5_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc5_15.2 => constants.%T
|
||||
// CHECK:STDOUT: %Y.impl_witness.loc5_31.2 => constants.%Y.impl_witness
|
||||
// CHECK:STDOUT: %Y.impl_witness.loc5_30.2 => constants.%Y.impl_witness
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Y.WithSelf(constants.%Y.facet) {
|
||||
@@ -308,7 +308,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: specific @U.as.Z.impl(constants.%U) {
|
||||
// CHECK:STDOUT: %U.patt.loc9_15.2 => constants.%U.patt
|
||||
// CHECK:STDOUT: %U.loc9_15.2 => constants.%U
|
||||
// CHECK:STDOUT: %Z.impl_witness.loc9_31.2 => constants.%Z.impl_witness.4e2
|
||||
// CHECK:STDOUT: %Z.impl_witness.loc9_30.2 => constants.%Z.impl_witness.4e2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Z.WithSelf(constants.%Z.facet.156) {
|
||||
@@ -325,7 +325,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: specific @U.as.Z.impl(constants.%as_type) {
|
||||
// CHECK:STDOUT: %U.patt.loc9_15.2 => constants.%U.patt
|
||||
// CHECK:STDOUT: %U.loc9_15.2 => constants.%as_type
|
||||
// CHECK:STDOUT: %Z.impl_witness.loc9_31.2 => constants.%Z.impl_witness.5d1
|
||||
// CHECK:STDOUT: %Z.impl_witness.loc9_30.2 => constants.%Z.impl_witness.5d1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
@@ -440,19 +440,19 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: %Main.import_ref.3fc: <witness> = import_ref Main//impl_def, loc13_1, loaded [concrete = constants.%complete_type.782]
|
||||
// CHECK:STDOUT: %Main.import_ref.b5a = import_ref Main//impl_def, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.65b: %Z.type = import_ref Main//impl_def, loc11_10, loaded [symbolic = @C.%V (constants.%V)]
|
||||
// CHECK:STDOUT: %Main.import_ref.f68: <witness> = import_ref Main//impl_def, loc9_31, loaded [symbolic = @U.as.Z.impl.%Z.impl_witness (constants.%Z.impl_witness.824)]
|
||||
// CHECK:STDOUT: %Main.import_ref.f68: <witness> = import_ref Main//impl_def, loc9_30, loaded [symbolic = @U.as.Z.impl.%Z.impl_witness (constants.%Z.impl_witness.824)]
|
||||
// CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @U.as.Z.impl [concrete]
|
||||
// CHECK:STDOUT: %Main.import_ref.b7a: type = import_ref Main//impl_def, loc9_24, loaded [symbolic = @U.as.Z.impl.%U (constants.%U)]
|
||||
// CHECK:STDOUT: %Main.import_ref.fbe: type = import_ref Main//impl_def, loc9_29, loaded [concrete = constants.%Z.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.b7a: type = import_ref Main//impl_def, loc9_23, loaded [symbolic = @U.as.Z.impl.%U (constants.%U)]
|
||||
// CHECK:STDOUT: %Main.import_ref.fbe: type = import_ref Main//impl_def, loc9_28, loaded [concrete = constants.%Z.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//impl_def, loc9_15, loaded [symbolic = @U.as.Z.impl.%U (constants.%U)]
|
||||
// CHECK:STDOUT: %Main.import_ref.e59c42.2: %I.type = import_ref Main//impl_def, loc15_13, loaded [symbolic = constants.%Self.dda]
|
||||
// CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//impl_def, loc15_13, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.d73: %Y.type = import_ref Main//impl_def, loc16_12, loaded [concrete = %Assoc]
|
||||
// CHECK:STDOUT: %Assoc: %Y.type = assoc_const_decl @Assoc [concrete] {}
|
||||
// CHECK:STDOUT: %Main.import_ref.201: <witness> = import_ref Main//impl_def, loc5_31, loaded [symbolic = @T.as.Y.impl.%Y.impl_witness (constants.%Y.impl_witness.3d4)]
|
||||
// CHECK:STDOUT: %Main.import_ref.201: <witness> = import_ref Main//impl_def, loc5_30, loaded [symbolic = @T.as.Y.impl.%Y.impl_witness (constants.%Y.impl_witness.3d4)]
|
||||
// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (), @T.as.Y.impl [concrete]
|
||||
// CHECK:STDOUT: %Main.import_ref.68d: type = import_ref Main//impl_def, loc5_24, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.81e: type = import_ref Main//impl_def, loc5_29, loaded [concrete = constants.%Y.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.68d: type = import_ref Main//impl_def, loc5_23, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.81e: type = import_ref Main//impl_def, loc5_28, loaded [concrete = constants.%Y.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//impl_def, loc5_15, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -481,26 +481,26 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [concrete = constants.%D.generic]
|
||||
// CHECK:STDOUT: %N.ref: %E = name_ref N, %N.loc20_15.2 [symbolic = %N.loc20_15.1 (constants.%N)]
|
||||
// CHECK:STDOUT: %D.loc20_24.2: type = class_type @D, @D(constants.%N) [symbolic = %D.loc20_24.1 (constants.%D)]
|
||||
// CHECK:STDOUT: %D.loc20_23.2: type = class_type @D, @D(constants.%N) [symbolic = %D.loc20_23.1 (constants.%D)]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc20_31: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc20_30: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.frozen.loc20_31 [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.frozen.loc20_30 [symbolic_self = constants.%.Self.frozen.3a0]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %.loc20_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %.loc20_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %Assoc.ref: %I.assoc_type = name_ref Assoc, imports.%Main.import_ref.f32 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %impl.elem0.loc20_37.1: %Y.type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.f7a]
|
||||
// CHECK:STDOUT: %.loc20_47.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %impl.elem0.loc20_36.1: %Y.type = impl_witness_access constants.%I.lookup_impl_witness.ced, element0 [symbolic_self = constants.%impl.elem0.f7a]
|
||||
// CHECK:STDOUT: %.loc20_46.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %Y.facet: %Y.type = facet_value constants.%empty_tuple.type, (constants.%Y.impl_witness.2e8) [concrete = constants.%Y.facet]
|
||||
// CHECK:STDOUT: %.loc20_47.2: %Y.type = converted %.loc20_47.1, %Y.facet [concrete = constants.%Y.facet]
|
||||
// CHECK:STDOUT: %rewrite.loc20_44.1 = requirement_rewrite %impl.elem0.loc20_37.1, %.loc20_47.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc20_37.2: %Y.type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.aef]
|
||||
// CHECK:STDOUT: %rewrite.loc20_44.2 = requirement_rewrite %impl.elem0.loc20_37.2, %.loc20_47.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc20_31: type = where_expr [concrete = constants.%I_where.type] {
|
||||
// CHECK:STDOUT: %.loc20_46.2: %Y.type = converted %.loc20_46.1, %Y.facet [concrete = constants.%Y.facet]
|
||||
// CHECK:STDOUT: %rewrite.loc20_43.1 = requirement_rewrite %impl.elem0.loc20_36.1, %.loc20_46.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc20_36.2: %Y.type = impl_witness_access constants.%I.lookup_impl_witness.78b, element0 [symbolic_self = constants.%impl.elem0.aef]
|
||||
// CHECK:STDOUT: %rewrite.loc20_43.2 = requirement_rewrite %impl.elem0.loc20_36.2, %.loc20_46.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc20_30: type = where_expr [concrete = constants.%I_where.type] {
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %I.ref [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc20_44.2 = requirement_rewrite %impl.elem0.loc20_37.2, %.loc20_47.2 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc20_43.2 = requirement_rewrite %impl.elem0.loc20_36.2, %.loc20_46.2 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc20_18: type = splice_block %E.ref [concrete = constants.%E] {
|
||||
// CHECK:STDOUT: %.loc20_17: type = splice_block %E.ref [concrete = constants.%E] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc20_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [concrete = constants.%E]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -570,14 +570,14 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: generic impl @D.as.I.impl(%N.loc20_15.2: %E) {
|
||||
// CHECK:STDOUT: %N.patt.loc20_15.2: %pattern_type.849 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc20_15.2 (constants.%N.patt)]
|
||||
// CHECK:STDOUT: %N.loc20_15.1: %E = symbolic_binding N, 0 [symbolic = %N.loc20_15.1 (constants.%N)]
|
||||
// CHECK:STDOUT: %D.loc20_24.1: type = class_type @D, @D(%N.loc20_15.1) [symbolic = %D.loc20_24.1 (constants.%D)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc20_49.2: <witness> = impl_witness %I.impl_witness_table, @D.as.I.impl(%N.loc20_15.1) [symbolic = %I.impl_witness.loc20_49.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT: %D.loc20_23.1: type = class_type @D, @D(%N.loc20_15.1) [symbolic = %D.loc20_23.1 (constants.%D)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc20_48.2: <witness> = impl_witness %I.impl_witness_table, @D.as.I.impl(%N.loc20_15.1) [symbolic = %I.impl_witness.loc20_48.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %D.as.I.impl.F.type: type = fn_type @D.as.I.impl.F, @D.as.I.impl(%N.loc20_15.1) [symbolic = %D.as.I.impl.F.type (constants.%D.as.I.impl.F.type)]
|
||||
// CHECK:STDOUT: %D.as.I.impl.F: @D.as.I.impl.%D.as.I.impl.F.type (%D.as.I.impl.F.type) = struct_value () [symbolic = %D.as.I.impl.F (constants.%D.as.I.impl.F)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %D.loc20_24.2 as %.loc20_31 {
|
||||
// CHECK:STDOUT: impl: %D.loc20_23.2 as %.loc20_30 {
|
||||
// CHECK:STDOUT: %D.as.I.impl.F.decl: @D.as.I.impl.%D.as.I.impl.F.type (%D.as.I.impl.F.type) = fn_decl @D.as.I.impl.F [symbolic = @D.as.I.impl.%D.as.I.impl.F (constants.%D.as.I.impl.F)] {
|
||||
// CHECK:STDOUT: %c.param_patt: %pattern_type.78f = value_param_pattern [concrete = constants.%c.param_patt.d23]
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.78f = at_binding_pattern c, %c.param_patt [concrete = constants.%c.patt.152]
|
||||
@@ -593,14 +593,14 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: %c: %C.00e = wrapper_binding c, %c.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, %D.as.I.impl.F.decl), @D.as.I.impl [concrete]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc20_49.1: <witness> = impl_witness %I.impl_witness_table, @D.as.I.impl(constants.%N) [symbolic = %I.impl_witness.loc20_49.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc20_48.1: <witness> = impl_witness %I.impl_witness_table, @D.as.I.impl(constants.%N) [symbolic = %I.impl_witness.loc20_48.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT: %impl_witness_assoc_constant: %Y.type = impl_witness_assoc_constant constants.%Y.facet [concrete = constants.%Y.facet]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .C = <poisoned>
|
||||
// CHECK:STDOUT: .F = %D.as.I.impl.F.decl
|
||||
// CHECK:STDOUT: extend %.loc20_31
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc20_49.1
|
||||
// CHECK:STDOUT: extend %.loc20_30
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc20_48.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -750,8 +750,8 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
|
||||
// CHECK:STDOUT: specific @D.as.I.impl(constants.%N) {
|
||||
// CHECK:STDOUT: %N.patt.loc20_15.2 => constants.%N.patt
|
||||
// CHECK:STDOUT: %N.loc20_15.1 => constants.%N
|
||||
// CHECK:STDOUT: %D.loc20_24.1 => constants.%D
|
||||
// CHECK:STDOUT: %I.impl_witness.loc20_49.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT: %D.loc20_23.1 => constants.%D
|
||||
// CHECK:STDOUT: %I.impl_witness.loc20_48.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %D.as.I.impl.F.type => constants.%D.as.I.impl.F.type
|
||||
|
||||
+20
-20
@@ -25,9 +25,9 @@ interface I {
|
||||
library "[[@TEST_NAME]]";
|
||||
import library "a";
|
||||
|
||||
class C(X:! ()) {}
|
||||
class C(X: ()) {}
|
||||
|
||||
impl forall [Y:! ()] C(Y) as I {
|
||||
impl forall [Y: ()] C(Y) as I {
|
||||
fn F(unused x: C(Y)) {}
|
||||
}
|
||||
|
||||
@@ -194,10 +194,10 @@ fn G() {
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %X.patt.loc5_10.1: %pattern_type.cb1 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc5_10.2 (constants.%X.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_13.1: type = splice_block %.loc5_13.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc5_14.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_14.3: type = converted %.loc5_14.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc5_13.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_13.3: type = converted %.loc5_13.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %X.loc5_10.2: %empty_tuple.type = symbolic_binding X, 0 [symbolic = %X.loc5_10.1 (constants.%X)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -206,12 +206,12 @@ fn G() {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %Y.ref: %empty_tuple.type = name_ref Y, %Y.loc7_15.2 [symbolic = %Y.loc7_15.1 (constants.%Y)]
|
||||
// CHECK:STDOUT: %C.loc7_25.2: type = class_type @C, @C(constants.%Y) [symbolic = %C.loc7_25.1 (constants.%C.6b1ed7.2)]
|
||||
// CHECK:STDOUT: %C.loc7_24.2: type = class_type @C, @C(constants.%Y) [symbolic = %C.loc7_24.1 (constants.%C.6b1ed7.2)]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc7_18.1: type = splice_block %.loc7_18.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc7_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc7_18.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_18.3: type = converted %.loc7_18.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Y.loc7_15.2: %empty_tuple.type = symbolic_binding Y, 0 [symbolic = %Y.loc7_15.1 (constants.%Y)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -233,8 +233,8 @@ fn G() {
|
||||
// CHECK:STDOUT: generic impl @C.as.I.impl(%Y.loc7_15.2: %empty_tuple.type) {
|
||||
// CHECK:STDOUT: %Y.patt.loc7_15.2: %pattern_type.cb1 = symbolic_binding_pattern Y, 0 [symbolic = %Y.patt.loc7_15.2 (constants.%Y.patt)]
|
||||
// CHECK:STDOUT: %Y.loc7_15.1: %empty_tuple.type = symbolic_binding Y, 0 [symbolic = %Y.loc7_15.1 (constants.%Y)]
|
||||
// CHECK:STDOUT: %C.loc7_25.1: type = class_type @C, @C(%Y.loc7_15.1) [symbolic = %C.loc7_25.1 (constants.%C.6b1ed7.2)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc7_32.2: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(%Y.loc7_15.1) [symbolic = %I.impl_witness.loc7_32.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT: %C.loc7_24.1: type = class_type @C, @C(%Y.loc7_15.1) [symbolic = %C.loc7_24.1 (constants.%C.6b1ed7.2)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc7_31.2: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(%Y.loc7_15.1) [symbolic = %I.impl_witness.loc7_31.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %C.as.I.impl.F.type.loc8_24.1: type = fn_type @C.as.I.impl.F.loc8_24.1, @C.as.I.impl(%Y.loc7_15.1) [symbolic = %C.as.I.impl.F.type.loc8_24.1 (constants.%C.as.I.impl.F.type.9a27ec.1)]
|
||||
@@ -242,7 +242,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %C.as.I.impl.F.type.loc8_24.2: type = fn_type @C.as.I.impl.F.loc8_24.2, @C.as.I.impl(%Y.loc7_15.1) [symbolic = %C.as.I.impl.F.type.loc8_24.2 (constants.%C.as.I.impl.F.type.9a27ec.2)]
|
||||
// CHECK:STDOUT: %C.as.I.impl.F.loc8_24.2: @C.as.I.impl.%C.as.I.impl.F.type.loc8_24.2 (%C.as.I.impl.F.type.9a27ec.2) = struct_value () [symbolic = %C.as.I.impl.F.loc8_24.2 (constants.%C.as.I.impl.F.84dd70.2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %C.loc7_25.2 as %I.ref {
|
||||
// CHECK:STDOUT: impl: %C.loc7_24.2 as %I.ref {
|
||||
// CHECK:STDOUT: %C.as.I.impl.F.decl.loc8_24.1: @C.as.I.impl.%C.as.I.impl.F.type.loc8_24.1 (%C.as.I.impl.F.type.9a27ec.1) = fn_decl @C.as.I.impl.F.loc8_24.1 [symbolic = @C.as.I.impl.%C.as.I.impl.F.loc8_24.1 (constants.%C.as.I.impl.F.84dd70.1)] {
|
||||
// CHECK:STDOUT: %x.param_patt.loc8_16.1: @C.as.I.impl.F.loc8_24.1.%pattern_type (%pattern_type.d0f) = value_param_pattern [symbolic = %x.param_patt.loc8_16.2 (constants.%x.param_patt.bc9)]
|
||||
// CHECK:STDOUT: %x.patt.loc8_16.1: @C.as.I.impl.F.loc8_24.1.%pattern_type (%pattern_type.d0f) = at_binding_pattern x, %x.param_patt.loc8_16.1 [symbolic = %x.patt.loc8_16.2 (constants.%x.patt.cc8)]
|
||||
@@ -263,14 +263,14 @@ fn G() {
|
||||
// CHECK:STDOUT: %x: %empty_struct_type = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%C.as.I.impl.F.decl.loc8_24.2), @C.as.I.impl [concrete]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc7_32.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%Y) [symbolic = %I.impl_witness.loc7_32.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc7_31.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%Y) [symbolic = %I.impl_witness.loc7_31.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .C = <poisoned>
|
||||
// CHECK:STDOUT: .Y = <poisoned>
|
||||
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl.loc8_24.1
|
||||
// CHECK:STDOUT: extend %I.ref
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc7_32.1
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc7_31.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -383,8 +383,8 @@ fn G() {
|
||||
// CHECK:STDOUT: specific @C.as.I.impl(constants.%Y) {
|
||||
// CHECK:STDOUT: %Y.patt.loc7_15.2 => constants.%Y.patt
|
||||
// CHECK:STDOUT: %Y.loc7_15.1 => constants.%Y
|
||||
// CHECK:STDOUT: %C.loc7_25.1 => constants.%C.6b1ed7.2
|
||||
// CHECK:STDOUT: %I.impl_witness.loc7_32.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT: %C.loc7_24.1 => constants.%C.6b1ed7.2
|
||||
// CHECK:STDOUT: %I.impl_witness.loc7_31.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %C.as.I.impl.F.type.loc8_24.1 => constants.%C.as.I.impl.F.type.9a27ec.1
|
||||
@@ -495,7 +495,7 @@ fn G() {
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//b, loc5_18, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//b, loc5_17, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.3fc = import_ref Main//b, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.c90e1a.1: %empty_tuple.type = import_ref Main//b, loc5_10, loaded [symbolic = @C.%X (constants.%X)]
|
||||
// CHECK:STDOUT: %Main.import_ref.1b3: %I.assoc_type = import_ref Main//a, loc5_14, loaded [concrete = constants.%assoc0.232]
|
||||
@@ -504,14 +504,14 @@ fn G() {
|
||||
// CHECK:STDOUT: %Main.import_ref.e59c42.2: %I.type = import_ref Main//a, loc4_13, loaded [symbolic = constants.%Self.dda]
|
||||
// CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//a, loc4_13, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.9f7: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.418) = import_ref Main//a, loc5_14, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.ca5)]
|
||||
// CHECK:STDOUT: %Main.import_ref.9c4: <witness> = import_ref Main//b, loc7_32, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.95e)]
|
||||
// CHECK:STDOUT: %Main.import_ref.9c4: <witness> = import_ref Main//b, loc7_31, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.95e)]
|
||||
// CHECK:STDOUT: %Main.import_ref.718: @C.as.I.impl.%C.as.I.impl.F.type.2 (%C.as.I.impl.F.type.c7d3b5.1) = import_ref Main//b, loc8_24, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.2 (constants.%C.as.I.impl.F.c1d971.1)]
|
||||
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.718), @C.as.I.impl [concrete]
|
||||
// CHECK:STDOUT: %Main.import_ref.c90e1a.2: %empty_tuple.type = import_ref Main//b, loc7_15, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)]
|
||||
// CHECK:STDOUT: %Main.F.b80: @C.as.I.impl.%C.as.I.impl.F.type.1 (%C.as.I.impl.F.type.c7d3b5.2) = import_ref Main//b, F, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.1 (constants.%C.as.I.impl.F.c1d971.2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.c90e1a.3: %empty_tuple.type = import_ref Main//b, loc7_15, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)]
|
||||
// CHECK:STDOUT: %Main.import_ref.ff4: type = import_ref Main//b, loc7_25, loaded [symbolic = @C.as.I.impl.%C (constants.%C.6b1ed7.2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.e90: type = import_ref Main//b, loc7_30, loaded [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.ff4: type = import_ref Main//b, loc7_24, loaded [symbolic = @C.as.I.impl.%C (constants.%C.6b1ed7.2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.e90: type = import_ref Main//b, loc7_29, loaded [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.c90e1a.4: %empty_tuple.type = import_ref Main//b, loc7_15, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)]
|
||||
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+18
-18
@@ -16,13 +16,13 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
interface I {
|
||||
fn F();
|
||||
}
|
||||
|
||||
impl forall [T:! type] C(T) as I {
|
||||
impl forall [T: type] C(T) as I {
|
||||
fn F() {}
|
||||
}
|
||||
|
||||
@@ -88,9 +88,9 @@ fn H() -> C({}).(I.F)() {}
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_10.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_10.2 (constants.%T.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: %T.loc4_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_10.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -100,11 +100,11 @@ fn H() -> C({}).(I.F)() {}
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_15.2 [symbolic = %T.loc10_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.1 (constants.%C)]
|
||||
// CHECK:STDOUT: %C.loc10_26.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_26.1 (constants.%C)]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %.loc10_18.1: type = splice_block %.loc10_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc10_17.1: type = splice_block %.loc10_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc10_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc10_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc10_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -131,22 +131,22 @@ fn H() -> C({}).(I.F)() {}
|
||||
// CHECK:STDOUT: generic impl @C.as.I.impl(%T.loc10_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc10_15.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc10_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(%T.loc10_15.1) [symbolic = %C.loc10_27.1 (constants.%C)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc10_34.2: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc10_15.1) [symbolic = %I.impl_witness.loc10_34.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT: %C.loc10_26.1: type = class_type @C, @C(%T.loc10_15.1) [symbolic = %C.loc10_26.1 (constants.%C)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc10_33.2: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(%T.loc10_15.1) [symbolic = %I.impl_witness.loc10_33.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F, @C.as.I.impl(%T.loc10_15.1) [symbolic = %C.as.I.impl.F.type (constants.%C.as.I.impl.F.type)]
|
||||
// CHECK:STDOUT: %C.as.I.impl.F: @C.as.I.impl.%C.as.I.impl.F.type (%C.as.I.impl.F.type) = struct_value () [symbolic = %C.as.I.impl.F (constants.%C.as.I.impl.F)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %C.loc10_27.2 as %I.ref {
|
||||
// CHECK:STDOUT: impl: %C.loc10_26.2 as %I.ref {
|
||||
// CHECK:STDOUT: %C.as.I.impl.F.decl: @C.as.I.impl.%C.as.I.impl.F.type (%C.as.I.impl.F.type) = fn_decl @C.as.I.impl.F [symbolic = @C.as.I.impl.%C.as.I.impl.F (constants.%C.as.I.impl.F)] {} {}
|
||||
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%C.as.I.impl.F.decl), @C.as.I.impl [concrete]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc10_34.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T) [symbolic = %I.impl_witness.loc10_34.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc10_33.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T) [symbolic = %I.impl_witness.loc10_33.2 (constants.%I.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
|
||||
// CHECK:STDOUT: extend %I.ref
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc10_34.1
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc10_33.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -197,8 +197,8 @@ fn H() -> C({}).(I.F)() {}
|
||||
// CHECK:STDOUT: specific @C.as.I.impl(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc10_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %C.loc10_27.1 => constants.%C
|
||||
// CHECK:STDOUT: %I.impl_witness.loc10_34.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT: %C.loc10_26.1 => constants.%C
|
||||
// CHECK:STDOUT: %I.impl_witness.loc10_33.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %C.as.I.impl.F.type => constants.%C.as.I.impl.F.type
|
||||
@@ -260,7 +260,7 @@ fn H() -> C({}).(I.F)() {}
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Main.C: %C.type = import_ref Main//import_generic, C, loaded [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %Main.I: type = import_ref Main//import_generic, I, loaded [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic, loc4_20, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//import_generic, loc4_19, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.189 = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//import_generic, loc4_10, loaded [symbolic = @C.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.1b3: %I.assoc_type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%assoc0]
|
||||
@@ -268,12 +268,12 @@ fn H() -> C({}).(I.F)() {}
|
||||
// CHECK:STDOUT: %Main.import_ref.e59c42.2: %I.type = import_ref Main//import_generic, loc6_13, loaded [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//import_generic, loc6_13, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.9f7: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.418) = import_ref Main//import_generic, loc7_9, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.ca5)]
|
||||
// CHECK:STDOUT: %Main.import_ref.57e: <witness> = import_ref Main//import_generic, loc10_34, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.5b2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.57e: <witness> = import_ref Main//import_generic, loc10_33, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.5b2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.bec: @C.as.I.impl.%C.as.I.impl.F.type (%C.as.I.impl.F.type.86f) = import_ref Main//import_generic, loc11_10, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F (constants.%C.as.I.impl.F.45f)]
|
||||
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.bec), @C.as.I.impl [concrete]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic, loc10_15, loaded [symbolic = @C.as.I.impl.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.4aa: type = import_ref Main//import_generic, loc10_27, loaded [symbolic = @C.as.I.impl.%C (constants.%C.1d0)]
|
||||
// CHECK:STDOUT: %Main.import_ref.c3f: type = import_ref Main//import_generic, loc10_32, loaded [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.4aa: type = import_ref Main//import_generic, loc10_26, loaded [symbolic = @C.as.I.impl.%C (constants.%C.1d0)]
|
||||
// CHECK:STDOUT: %Main.import_ref.c3f: type = import_ref Main//import_generic, loc10_31, loaded [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic, loc10_15, loaded [symbolic = @C.as.I.impl.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+23
-23
@@ -105,7 +105,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
class C {}
|
||||
|
||||
interface J { let T:! type; }
|
||||
interface J { let T: type; }
|
||||
interface Incomplete;
|
||||
|
||||
impl C as J where .Self impls Incomplete and .T = ();
|
||||
@@ -156,14 +156,14 @@ constraint Y {
|
||||
require impls Z;
|
||||
}
|
||||
interface X {
|
||||
let X1:! type;
|
||||
let X1: type;
|
||||
|
||||
// Not extend, so only required to be identified.
|
||||
require impls Y;
|
||||
}
|
||||
|
||||
// Requires `X` to be complete, doesn't require Z to be complete.
|
||||
fn F(unused T:! X where .X1 = {}) {}
|
||||
fn F(unused generic T: X where .X1 = {}) {}
|
||||
|
||||
// --- fail_incomplete_constraint.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -798,29 +798,29 @@ interface B {
|
||||
// CHECK:STDOUT: %Y.decl: type = constraint_decl @Y [concrete = constants.%Y.type] {} {}
|
||||
// CHECK:STDOUT: %X.decl: type = interface_decl @X [concrete = constants.%X.type] {} {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc16_14.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_14.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.patt.loc16_22.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_22.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc16_19.1: type = splice_block %.loc16_19.2 [concrete = constants.%X_where.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc16_14: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc16_26.1: type = splice_block %.loc16_26.2 [concrete = constants.%X_where.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc16_22: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X.type]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc16_19: %X.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.5e5]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc16_26: %X.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.5e5]
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %X.ref [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref: %X.type = name_ref .Self, %.Self.frozen.loc16_19 [symbolic_self = constants.%.Self.frozen.5e5]
|
||||
// CHECK:STDOUT: %.Self.ref: %X.type = name_ref .Self, %.Self.frozen.loc16_26 [symbolic_self = constants.%.Self.frozen.5e5]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %.loc16_25: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %.loc16_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type]
|
||||
// CHECK:STDOUT: %X1.ref: %X.assoc_type = name_ref X1, @X1.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_25.1: type = impl_witness_access constants.%X.lookup_impl_witness.de0, element0 [symbolic_self = constants.%impl.elem0.2f1]
|
||||
// CHECK:STDOUT: %.loc16_32.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc16_32.2: type = converted %.loc16_32.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %rewrite.loc16_29.1 = requirement_rewrite %impl.elem0.loc16_25.1, %.loc16_32.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_25.2: type = impl_witness_access constants.%X.lookup_impl_witness.f28, element0 [symbolic_self = constants.%impl.elem0.061]
|
||||
// CHECK:STDOUT: %rewrite.loc16_29.2 = requirement_rewrite %impl.elem0.loc16_25.2, %.loc16_32.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc16_19.2: type = where_expr [concrete = constants.%X_where.type] {
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_32.1: type = impl_witness_access constants.%X.lookup_impl_witness.de0, element0 [symbolic_self = constants.%impl.elem0.2f1]
|
||||
// CHECK:STDOUT: %.loc16_39.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc16_39.2: type = converted %.loc16_39.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %rewrite.loc16_36.1 = requirement_rewrite %impl.elem0.loc16_32.1, %.loc16_39.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16_32.2: type = impl_witness_access constants.%X.lookup_impl_witness.f28, element0 [symbolic_self = constants.%impl.elem0.061]
|
||||
// CHECK:STDOUT: %rewrite.loc16_36.2 = requirement_rewrite %impl.elem0.loc16_32.2, %.loc16_39.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc16_26.2: type = where_expr [concrete = constants.%X_where.type] {
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %X.ref [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc16_29.2 = requirement_rewrite %impl.elem0.loc16_25.2, %.loc16_32.2 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc16_36.2 = requirement_rewrite %impl.elem0.loc16_32.2, %.loc16_39.2 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc16_14.2: %X_where.type = symbolic_binding T, 0 [symbolic = %T.loc16_14.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.loc16_22.2: %X_where.type = symbolic_binding T, 0 [symbolic = %T.loc16_22.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -889,9 +889,9 @@ interface B {
|
||||
// CHECK:STDOUT: %Self.as_type.loc12_11.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_11.2 (constants.%Self.as_type.ace)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc16_14.2: %X_where.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc16_14.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_14.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc16_14.1: %X_where.type = symbolic_binding T, 0 [symbolic = %T.loc16_14.1 (constants.%T)]
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc16_22.2: %X_where.type) {
|
||||
// CHECK:STDOUT: %T.patt.loc16_22.2: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_22.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc16_22.1: %X_where.type = symbolic_binding T, 0 [symbolic = %T.loc16_22.1 (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
@@ -933,8 +933,8 @@ interface B {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc16_14.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc16_14.1 => constants.%T
|
||||
// CHECK:STDOUT: %T.patt.loc16_22.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc16_22.1 => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_incomplete_constraint.carbon
|
||||
|
||||
+37
-37
@@ -15,7 +15,7 @@
|
||||
// --- core.carbon
|
||||
package Core;
|
||||
|
||||
interface ImplicitAs(Dest:! type) {
|
||||
interface ImplicitAs(Dest: type) {
|
||||
fn Convert(self) -> Dest;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ interface ImplicitAs(Dest:! type) {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Action(T:! type) {
|
||||
interface Action(T: type) {
|
||||
fn Op(self);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ fn G(a: A) { a.(Action(C).Op)(); }
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Factory(T:! type) {
|
||||
interface Factory(T: type) {
|
||||
// Non-instance class function
|
||||
fn Make() -> T;
|
||||
// Instance method
|
||||
@@ -141,9 +141,9 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.0ff = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] {
|
||||
// CHECK:STDOUT: %Dest.patt.loc3_26.1: %pattern_type.98f = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_26.2 (constants.%Dest.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc3_29.1: type = splice_block %.loc3_29.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc3_28.1: type = splice_block %.loc3_28.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc3_29.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc3_28.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Dest.loc3_26.2: type = symbolic_binding Dest, 0 [symbolic = %Dest.loc3_26.1 (constants.%Dest)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -155,10 +155,10 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_26.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)]
|
||||
// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.loc3_34.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %ImplicitAs.WithSelf.decl = interface_with_self_decl @ImplicitAs [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -172,7 +172,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %.loc4_23.2: Core.Form = init_form %Dest.ref [symbolic = %.loc4_23.1 (constants.%.184)]
|
||||
// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc4_14.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.3 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = specific_constant @ImplicitAs.%Self.loc3_34.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = name_ref Self, %.loc4_14.2 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc4_14.3: type = converted %Self.ref, %Self.as_type.loc4_14.2 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)]
|
||||
@@ -184,7 +184,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %assoc0.loc4_27.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc4_27.2 (constants.%assoc0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc3_35.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc3_34.1
|
||||
// CHECK:STDOUT: .Dest = <poisoned>
|
||||
// CHECK:STDOUT: .Dest = <poisoned>
|
||||
// CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc4_27.1
|
||||
@@ -196,7 +196,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_26.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) {
|
||||
// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_26.2: type, @ImplicitAs.%Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.3aa)) {
|
||||
// CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.3aa)]
|
||||
// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.3aa) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)]
|
||||
@@ -301,9 +301,9 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Action.decl: %Action.type.538 = interface_decl @Action [concrete = constants.%Action.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_19.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_19.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_21.1: type = splice_block %.loc4_21.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_21.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_19.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_19.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -332,10 +332,10 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T.loc4_19.1)> [symbolic = %Action.type (constants.%Action.type.cbf)]
|
||||
// CHECK:STDOUT: %Self.loc4_28.2: @Action.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.67c)]
|
||||
// CHECK:STDOUT: %Self.loc4_27.2: @Action.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_27.2 (constants.%Self.67c)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc4_28.1: @Action.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.67c)]
|
||||
// CHECK:STDOUT: %Self.loc4_27.1: @Action.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_27.2 (constants.%Self.67c)]
|
||||
// CHECK:STDOUT: %Action.WithSelf.decl = interface_with_self_decl @Action [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -345,7 +345,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @Action.WithSelf.Op.%Self.as_type.loc5_9.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_9.1: type = splice_block %.loc5_9.3 [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc5_9.2: @Action.WithSelf.Op.%Action.type (%Action.type.cbf) = specific_constant @Action.%Self.loc4_28.1, @Action(constants.%T) [symbolic = %Self (constants.%Self.67c)]
|
||||
// CHECK:STDOUT: %.loc5_9.2: @Action.WithSelf.Op.%Action.type (%Action.type.cbf) = specific_constant @Action.%Self.loc4_27.1, @Action(constants.%T) [symbolic = %Self (constants.%Self.67c)]
|
||||
// CHECK:STDOUT: %Self.ref: @Action.WithSelf.Op.%Action.type (%Action.type.cbf) = name_ref Self, %.loc5_9.2 [symbolic = %Self (constants.%Self.67c)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_9.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_9.3: type = converted %Self.ref, %Self.as_type.loc5_9.2 [symbolic = %Self.as_type.loc5_9.1 (constants.%Self.as_type)]
|
||||
@@ -355,7 +355,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %assoc0.loc5_14.1: @Action.WithSelf.%Action.assoc_type (%Action.assoc_type.1c3) = assoc_entity element0, %Action.WithSelf.Op.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.26f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_28.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_27.1
|
||||
// CHECK:STDOUT: .Op = @Action.WithSelf.%assoc0.loc5_14.1
|
||||
// CHECK:STDOUT: witness = (@Action.WithSelf.%Action.WithSelf.Op.decl)
|
||||
// CHECK:STDOUT:
|
||||
@@ -407,7 +407,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Action.WithSelf.Op(@Action.%T.loc4_19.2: type, @Action.%Self.loc4_28.1: @Action.%Action.type (%Action.type.cbf)) {
|
||||
// CHECK:STDOUT: generic fn @Action.WithSelf.Op(@Action.%T.loc4_19.2: type, @Action.%Self.loc4_27.1: @Action.%Action.type (%Action.type.cbf)) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T)> [symbolic = %Action.type (constants.%Action.type.cbf)]
|
||||
// CHECK:STDOUT: %Self: @Action.WithSelf.Op.%Action.type (%Action.type.cbf) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.67c)]
|
||||
@@ -465,7 +465,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Action.type => constants.%Action.type.5d2
|
||||
// CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.7ff
|
||||
// CHECK:STDOUT: %Self.loc4_27.2 => constants.%Self.7ff
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Action.WithSelf(constants.%B, constants.%Self.67c) {
|
||||
@@ -559,8 +559,8 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.c56: @Action.WithSelf.%Action.WithSelf.Op.type (%Action.WithSelf.Op.type.a98) = import_ref Main//action, loc5_14, loaded [symbolic = @Action.WithSelf.%Action.WithSelf.Op (constants.%Action.WithSelf.Op.876)]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//action, loc4_19, loaded [symbolic = @Action.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.7dfc68.2: @Action.%Action.type (%Action.type.cbf) = import_ref Main//action, loc4_28, loaded [symbolic = @Action.%Self (constants.%Self.ea2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.422 = import_ref Main//action, loc4_28, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.7dfc68.2: @Action.%Action.type (%Action.type.cbf) = import_ref Main//action, loc4_27, loaded [symbolic = @Action.%Self (constants.%Self.ea2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.422 = import_ref Main//action, loc4_27, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//action, loc4_19, loaded [symbolic = @Action.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.371: <witness> = import_ref Main//action, loc12_21, loaded [concrete = constants.%Action.impl_witness]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type]
|
||||
@@ -770,8 +770,8 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.c56: @Action.WithSelf.%Action.WithSelf.Op.type (%Action.WithSelf.Op.type.a98) = import_ref Main//action, loc5_14, loaded [symbolic = @Action.WithSelf.%Action.WithSelf.Op (constants.%Action.WithSelf.Op.876)]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//action, loc4_19, loaded [symbolic = @Action.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.7dfc68.2: @Action.%Action.type (%Action.type.cbf) = import_ref Main//action, loc4_28, loaded [symbolic = @Action.%Self (constants.%Self.ea2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.422 = import_ref Main//action, loc4_28, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.7dfc68.2: @Action.%Action.type (%Action.type.cbf) = import_ref Main//action, loc4_27, loaded [symbolic = @Action.%Self (constants.%Self.ea2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.422 = import_ref Main//action, loc4_27, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//action, loc4_19, loaded [symbolic = @Action.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.640 = import_ref Main//action, loc12_21, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type]
|
||||
@@ -1004,9 +1004,9 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Factory.decl: %Factory.type.9da = interface_decl @Factory [concrete = constants.%Factory.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_20.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_20.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_23.1: type = splice_block %.loc4_23.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_22.1: type = splice_block %.loc4_22.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_23.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_22.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_20.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_20.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -1026,10 +1026,10 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T.loc4_20.1)> [symbolic = %Factory.type (constants.%Factory.type.711)]
|
||||
// CHECK:STDOUT: %Self.loc4_29.2: @Factory.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.9c2)]
|
||||
// CHECK:STDOUT: %Self.loc4_28.2: @Factory.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.9c2)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc4_29.1: @Factory.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.9c2)]
|
||||
// CHECK:STDOUT: %Self.loc4_28.1: @Factory.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.9c2)]
|
||||
// CHECK:STDOUT: %Factory.WithSelf.decl = interface_with_self_decl @Factory [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -1053,7 +1053,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %.loc8_22.2: Core.Form = init_form %T.ref [symbolic = %.loc8_22.1 (constants.%.184)]
|
||||
// CHECK:STDOUT: %self.param: @Factory.WithSelf.Method.%Self.as_type.loc8_13.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.3 [symbolic = %Self.as_type.loc8_13.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc8_13.2: @Factory.WithSelf.Method.%Factory.type (%Factory.type.711) = specific_constant @Factory.%Self.loc4_29.1, @Factory(constants.%T) [symbolic = %Self (constants.%Self.9c2)]
|
||||
// CHECK:STDOUT: %.loc8_13.2: @Factory.WithSelf.Method.%Factory.type (%Factory.type.711) = specific_constant @Factory.%Self.loc4_28.1, @Factory(constants.%T) [symbolic = %Self (constants.%Self.9c2)]
|
||||
// CHECK:STDOUT: %Self.ref: @Factory.WithSelf.Method.%Factory.type (%Factory.type.711) = name_ref Self, %.loc8_13.2 [symbolic = %Self (constants.%Self.9c2)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc8_13.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_13.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc8_13.3: type = converted %Self.ref, %Self.as_type.loc8_13.2 [symbolic = %Self.as_type.loc8_13.1 (constants.%Self.as_type)]
|
||||
@@ -1065,7 +1065,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %assoc1.loc8_23.1: @Factory.WithSelf.%Factory.assoc_type (%Factory.assoc_type.0ed) = assoc_entity element1, %Factory.WithSelf.Method.decl [symbolic = %assoc1.loc8_23.2 (constants.%assoc1.b7b)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_29.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_28.1
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .Make = @Factory.WithSelf.%assoc0.loc6_17.1
|
||||
@@ -1130,7 +1130,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: .Self = constants.%B
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Factory.WithSelf.Make(@Factory.%T.loc4_20.2: type, @Factory.%Self.loc4_29.1: @Factory.%Factory.type (%Factory.type.711)) {
|
||||
// CHECK:STDOUT: generic fn @Factory.WithSelf.Make(@Factory.%T.loc4_20.2: type, @Factory.%Self.loc4_28.1: @Factory.%Factory.type (%Factory.type.711)) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc6_16.1: Core.Form = init_form %T [symbolic = %.loc6_16.1 (constants.%.184)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)]
|
||||
@@ -1140,7 +1140,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: fn() -> out %return.param: @Factory.WithSelf.Make.%T (%T);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Factory.WithSelf.Method(@Factory.%T.loc4_20.2: type, @Factory.%Self.loc4_29.1: @Factory.%Factory.type (%Factory.type.711)) {
|
||||
// CHECK:STDOUT: generic fn @Factory.WithSelf.Method(@Factory.%T.loc4_20.2: type, @Factory.%Self.loc4_28.1: @Factory.%Factory.type (%Factory.type.711)) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T)> [symbolic = %Factory.type (constants.%Factory.type.711)]
|
||||
// CHECK:STDOUT: %Self: @Factory.WithSelf.Method.%Factory.type (%Factory.type.711) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.9c2)]
|
||||
@@ -1195,7 +1195,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Factory.type => constants.%Factory.type.5e3
|
||||
// CHECK:STDOUT: %Self.loc4_29.2 => constants.%Self.f44
|
||||
// CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.f44
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Factory.WithSelf(constants.%B, constants.%Self.9c2) {
|
||||
@@ -1327,11 +1327,11 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.ad0: @Factory.WithSelf.%Factory.WithSelf.Method.type (%Factory.WithSelf.Method.type.d40) = import_ref Main//factory, loc8_23, loaded [symbolic = @Factory.WithSelf.%Factory.WithSelf.Method (constants.%Factory.WithSelf.Method.459)]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.0f8e01.2: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)]
|
||||
// CHECK:STDOUT: %Main.import_ref.0f8e01.2: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_28, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)]
|
||||
// CHECK:STDOUT: %Main.import_ref.0a8: @Factory.WithSelf.%Factory.WithSelf.Make.type (%Factory.WithSelf.Make.type.cf7) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.WithSelf.%Factory.WithSelf.Make (constants.%Factory.WithSelf.Make.86c)]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.0f8e01.3: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a45 = import_ref Main//factory, loc4_29, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.0f8e01.3: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_28, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a45 = import_ref Main//factory, loc4_28, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.8c3: <witness> = import_ref Main//factory, loc14_22, loaded [concrete = constants.%Factory.impl_witness]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type]
|
||||
@@ -1630,11 +1630,11 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.ad0: @Factory.WithSelf.%Factory.WithSelf.Method.type (%Factory.WithSelf.Method.type.d40) = import_ref Main//factory, loc8_23, loaded [symbolic = @Factory.WithSelf.%Factory.WithSelf.Method (constants.%Factory.WithSelf.Method.459)]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.0f8e01.2: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)]
|
||||
// CHECK:STDOUT: %Main.import_ref.0f8e01.2: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_28, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)]
|
||||
// CHECK:STDOUT: %Main.import_ref.0a8: @Factory.WithSelf.%Factory.WithSelf.Make.type (%Factory.WithSelf.Make.type.cf7) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.WithSelf.%Factory.WithSelf.Make (constants.%Factory.WithSelf.Make.86c)]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.0f8e01.3: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a45 = import_ref Main//factory, loc4_29, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.0f8e01.3: @Factory.%Factory.type (%Factory.type.711) = import_ref Main//factory, loc4_28, loaded [symbolic = @Factory.%Self (constants.%Self.3e3)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a45 = import_ref Main//factory, loc4_28, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//factory, loc4_20, loaded [symbolic = @Factory.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.97f = import_ref Main//factory, loc14_22, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type]
|
||||
|
||||
+8
-8
@@ -13,23 +13,23 @@
|
||||
// --- fail_todo_impl_witness_access_in_impl_type_structure.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface X(T:! type) {}
|
||||
interface X(T: type) {}
|
||||
interface Y {
|
||||
let Y1:! type;
|
||||
let Y1: type;
|
||||
}
|
||||
interface Z {
|
||||
let Z1:! type;
|
||||
let Z1: type;
|
||||
}
|
||||
|
||||
// There's 2 ImplWitnessAccess instructions in the type, but they together
|
||||
// resolve to a symbolic type value, so the type structure is: `? as X(?)`
|
||||
impl forall [T:! Z where .Z1 impls Y] T as X(T.Z1.(Y.Y1)) {}
|
||||
impl forall [T: Z where .Z1 impls Y] T as X(T.Z1.(Y.Y1)) {}
|
||||
|
||||
class C(W:! type) {
|
||||
class C(W: type) {
|
||||
impl as Y where .Y1 = W {}
|
||||
}
|
||||
|
||||
fn F(V:! Z where .Z1 = C({})) {
|
||||
fn F(generic V: Z where .Z1 = C({})) {
|
||||
// The type stucture is `? as X({})` which will match the impl's less specific
|
||||
// `? as X(?)`, then the impl will deduce the parameter of `X` to be `{}` from
|
||||
// the type of `V`. This would fail if ImplWitnessAccess instructions were
|
||||
@@ -39,13 +39,13 @@ fn F(V:! Z where .Z1 = C({})) {
|
||||
V as X({});
|
||||
}
|
||||
|
||||
fn G(V:! Z where .Z1 impls Y) {
|
||||
fn G(generic V: Z where .Z1 impls Y) {
|
||||
// The type structure is `? as X(?)`, also built from ImplWitnessAccess insts,
|
||||
// which will match the impl's `? as X(?)`.
|
||||
V as X(V.(Z.Z1).(Y.Y1));
|
||||
}
|
||||
|
||||
fn H(U:! type, V:! Z where .Z1 = C(U)) {
|
||||
fn H(generic U: type, generic V: Z where .Z1 = C(U)) {
|
||||
// The type structure is `? as X(?)`, without using an ImplWitnessAccess,
|
||||
// which will match the impl's `? as X(?)`. This would fail if
|
||||
// ImplWitnessAccess instructions were treated as Concrete in the type
|
||||
|
||||
@@ -19,7 +19,7 @@ interface J {
|
||||
fn JJ(self);
|
||||
}
|
||||
|
||||
fn F(T:! I & J, t: T) {
|
||||
fn F(generic T: I & J, t: T) {
|
||||
// Nesting FacetValue and FacetAccessTypes, the `lookup_impl_witness`
|
||||
// instructions should remain canonical, pointing symbolically to `T`, and not
|
||||
// include these conversions.
|
||||
@@ -174,28 +174,28 @@ fn G() {
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
|
||||
// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %T.patt.loc22_7.1: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %t.param_patt.loc22_18.1: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_18.2 (constants.%t.param_patt.ed4)]
|
||||
// CHECK:STDOUT: %t.patt.loc22_18.1: @F.%pattern_type (%pattern_type.936) = at_binding_pattern t, %t.param_patt.loc22_18.1 [symbolic = %t.patt.loc22_18.2 (constants.%t.patt.088)]
|
||||
// CHECK:STDOUT: %T.patt.loc22_15.1: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %t.param_patt.loc22_25.1: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_25.2 (constants.%t.param_patt.ed4)]
|
||||
// CHECK:STDOUT: %t.patt.loc22_25.1: @F.%pattern_type (%pattern_type.936) = at_binding_pattern t, %t.param_patt.loc22_25.1 [symbolic = %t.patt.loc22_25.2 (constants.%t.patt.088)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc22_12.1: type = splice_block %.loc22_12.3 [concrete = constants.%facet_type] {
|
||||
// CHECK:STDOUT: %.loc22_19.1: type = splice_block %.loc22_19.3 [concrete = constants.%facet_type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %I.ref.loc22: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %J.ref.loc22: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22: %.d56 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
|
||||
// CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %I.ref.loc22, %impl.elem0.loc22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
|
||||
// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc22(%I.ref.loc22, %J.ref.loc22) [concrete = constants.%facet_type]
|
||||
// CHECK:STDOUT: %.loc22_12.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type]
|
||||
// CHECK:STDOUT: %.loc22_12.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc22_12.2 [concrete = constants.%facet_type]
|
||||
// CHECK:STDOUT: %.loc22_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type]
|
||||
// CHECK:STDOUT: %.loc22_19.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc22_19.2 [concrete = constants.%facet_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc22_7.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %t.param: @F.%T.as_type.loc22_20.1 (%T.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc22_20.1: type = splice_block %.loc22_20.2 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)] {
|
||||
// CHECK:STDOUT: %T.ref.loc22: %facet_type = name_ref T, %T.loc22_7.2 [symbolic = %T.loc22_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.as_type.loc22_20.2: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc22_20.2: type = converted %T.ref.loc22, %T.as_type.loc22_20.2 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %T.loc22_15.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %t.param: @F.%T.as_type.loc22_27.1 (%T.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc22_27.1: type = splice_block %.loc22_27.2 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] {
|
||||
// CHECK:STDOUT: %T.ref.loc22: %facet_type = name_ref T, %T.loc22_15.2 [symbolic = %T.loc22_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.as_type.loc22_27.2: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc22_27.2: type = converted %T.ref.loc22, %T.as_type.loc22_27.2 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %t: @F.%T.as_type.loc22_20.1 (%T.as_type) = wrapper_binding t, %t.param
|
||||
// CHECK:STDOUT: %t: @F.%T.as_type.loc22_27.1 (%T.as_type) = wrapper_binding t, %t.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
@@ -337,53 +337,53 @@ fn G() {
|
||||
// CHECK:STDOUT: fn(%self.param: @J.WithSelf.JJ.%Self.as_type.loc19_9.1 (%Self.as_type.976));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc22_7.2: %facet_type) {
|
||||
// CHECK:STDOUT: %T.patt.loc22_7.2: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_7.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc22_7.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.as_type.loc22_20.1: type = facet_access_type %T.loc22_7.1 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_20.1 [symbolic = %pattern_type (constants.%pattern_type.936)]
|
||||
// CHECK:STDOUT: %t.param_patt.loc22_18.2: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_18.2 (constants.%t.param_patt.ed4)]
|
||||
// CHECK:STDOUT: %t.patt.loc22_18.2: @F.%pattern_type (%pattern_type.936) = at_binding_pattern t, %t.param_patt.loc22_18.2 [symbolic = %t.patt.loc22_18.2 (constants.%t.patt.088)]
|
||||
// CHECK:STDOUT: generic fn @F(%T.loc22_15.2: %facet_type) {
|
||||
// CHECK:STDOUT: %T.patt.loc22_15.2: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc22_15.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.as_type.loc22_27.1: type = facet_access_type %T.loc22_15.1 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_27.1 [symbolic = %pattern_type (constants.%pattern_type.936)]
|
||||
// CHECK:STDOUT: %t.param_patt.loc22_25.2: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_25.2 (constants.%t.param_patt.ed4)]
|
||||
// CHECK:STDOUT: %t.patt.loc22_25.2: @F.%pattern_type (%pattern_type.936) = at_binding_pattern t, %t.param_patt.loc22_25.2 [symbolic = %t.patt.loc22_25.2 (constants.%t.patt.088)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc22_20.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc22_7.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %I.facet.loc26_18.2: %I.type = facet_value %T.as_type.loc22_20.1, (%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)]
|
||||
// CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc22_7.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %J.facet.loc26_33.2: %J.type = facet_value %T.as_type.loc22_20.1, (%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc22_27.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc22_15.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %I.facet.loc26_18.2: %I.type = facet_value %T.as_type.loc22_27.1, (%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)]
|
||||
// CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc22_15.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %J.facet.loc26_33.2: %J.type = facet_value %T.as_type.loc22_27.1, (%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)]
|
||||
// CHECK:STDOUT: %J.WithSelf.JJ.type: type = fn_type @J.WithSelf.JJ, @J.WithSelf(%J.facet.loc26_33.2) [symbolic = %J.WithSelf.JJ.type (constants.%J.WithSelf.JJ.type.2d7)]
|
||||
// CHECK:STDOUT: %.loc26_69: type = fn_type_with_self_type %J.WithSelf.JJ.type, %J.facet.loc26_33.2 [symbolic = %.loc26_69 (constants.%.443)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc26_69.2: @F.%.loc26_69 (%.443) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc26_69.2: <specific function> = specific_impl_function %impl.elem0.loc26_69.2, @J.WithSelf.JJ(%J.facet.loc26_33.2) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc22_20.1 (%T.as_type)) {
|
||||
// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc22_27.1 (%T.as_type)) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc22_20.1 (%T.as_type) = name_ref t, %t
|
||||
// CHECK:STDOUT: %T.ref.loc26: %facet_type = name_ref T, %T.loc22_7.2 [symbolic = %T.loc22_7.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc22_27.1 (%T.as_type) = name_ref t, %t
|
||||
// CHECK:STDOUT: %T.ref.loc26: %facet_type = name_ref T, %T.loc22_15.2 [symbolic = %T.loc22_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %I.ref.loc26_21: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %I.facet.loc26_18.1: %I.type = facet_value %T.as_type.loc26, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)]
|
||||
// CHECK:STDOUT: %.loc26_18: %I.type = converted %T.ref.loc26, %I.facet.loc26_18.1 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)]
|
||||
// CHECK:STDOUT: %.loc26_27: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %as_type.loc26_24: type = facet_access_type %.loc26_18 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc26_24: type = converted %.loc26_18, %as_type.loc26_24 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %as_type.loc26_24: type = facet_access_type %.loc26_18 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc26_24: type = converted %.loc26_18, %as_type.loc26_24 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %J.ref.loc26_36: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
||||
// CHECK:STDOUT: %J.facet.loc26_33.1: %J.type = facet_value %.loc26_24, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)]
|
||||
// CHECK:STDOUT: %.loc26_33: %J.type = converted %.loc26_24, %J.facet.loc26_33.1 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)]
|
||||
// CHECK:STDOUT: %.loc26_42: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %as_type.loc26_39: type = facet_access_type %.loc26_33 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc26_39: type = converted %.loc26_33, %as_type.loc26_39 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %as_type.loc26_39: type = facet_access_type %.loc26_33 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc26_39: type = converted %.loc26_33, %as_type.loc26_39 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %I.ref.loc26_51: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %I.facet.loc26_48: %I.type = facet_value %.loc26_39, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)]
|
||||
// CHECK:STDOUT: %.loc26_48: %I.type = converted %.loc26_39, %I.facet.loc26_48 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)]
|
||||
// CHECK:STDOUT: %.loc26_57: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %as_type.loc26_54: type = facet_access_type %.loc26_48 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc26_54: type = converted %.loc26_48, %as_type.loc26_54 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %as_type.loc26_54: type = facet_access_type %.loc26_48 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc26_54: type = converted %.loc26_48, %as_type.loc26_54 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %J.ref.loc26_66: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
||||
// CHECK:STDOUT: %J.facet.loc26_63: %J.type = facet_value %.loc26_54, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)]
|
||||
// CHECK:STDOUT: %.loc26_63: %J.type = converted %.loc26_54, %J.facet.loc26_63 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)]
|
||||
// CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)]
|
||||
// CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.WithSelf.%assoc0 [concrete = constants.%assoc0.7d8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc26_69.1: @F.%.loc26_69 (%.443) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %bound_method.loc26_69: <bound method> = bound_method %t.ref, %impl.elem0.loc26_69.1
|
||||
@@ -516,12 +516,12 @@ fn G() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc22_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc22_7.1 => constants.%T
|
||||
// CHECK:STDOUT: %T.as_type.loc22_20.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %T.patt.loc22_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc22_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %T.as_type.loc22_27.1 => constants.%T.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.936
|
||||
// CHECK:STDOUT: %t.param_patt.loc22_18.2 => constants.%t.param_patt.ed4
|
||||
// CHECK:STDOUT: %t.patt.loc22_18.2 => constants.%t.patt.088
|
||||
// CHECK:STDOUT: %t.param_patt.loc22_25.2 => constants.%t.param_patt.ed4
|
||||
// CHECK:STDOUT: %t.patt.loc22_25.2 => constants.%t.patt.088
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I.WithSelf(constants.%T) {
|
||||
@@ -598,12 +598,12 @@ fn G() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%facet_value) {
|
||||
// CHECK:STDOUT: %T.patt.loc22_7.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc22_7.1 => constants.%facet_value
|
||||
// CHECK:STDOUT: %T.as_type.loc22_20.1 => constants.%C
|
||||
// CHECK:STDOUT: %T.patt.loc22_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc22_15.1 => constants.%facet_value
|
||||
// CHECK:STDOUT: %T.as_type.loc22_27.1 => constants.%C
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.f79
|
||||
// CHECK:STDOUT: %t.param_patt.loc22_18.2 => constants.%t.param_patt.5f8
|
||||
// CHECK:STDOUT: %t.patt.loc22_18.2 => constants.%t.patt.b06
|
||||
// CHECK:STDOUT: %t.param_patt.loc22_25.2 => constants.%t.param_patt.5f8
|
||||
// CHECK:STDOUT: %t.patt.loc22_25.2 => constants.%t.patt.b06
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type
|
||||
|
||||
@@ -17,7 +17,7 @@ interface Z {
|
||||
fn G();
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as Z {
|
||||
impl forall [T: type] T as Z {
|
||||
fn G() {}
|
||||
}
|
||||
|
||||
|
||||
+24
-24
@@ -13,12 +13,12 @@
|
||||
// --- final_impl_precedence_over_facet.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
|
||||
final impl forall [U:! type] U as I where .T = () {}
|
||||
final impl forall [U: type] U as I where .T = () {}
|
||||
|
||||
fn F(V:! I) -> V.T {
|
||||
fn F(generic V: I) -> V.T {
|
||||
// Even though we have a witness that `V impls I` from the constraint on `I`,
|
||||
// we should do an impl lookup to see if any effectively final impl applies
|
||||
// when we find an unknown value in that witness. In this case, that lookup
|
||||
@@ -31,13 +31,13 @@ fn F(V:! I) -> V.T {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let Y:! type;
|
||||
let X: type;
|
||||
let Y: type;
|
||||
}
|
||||
|
||||
final impl forall [T:! type] T as Z where .X = () and .Y = () {}
|
||||
final impl forall [T: type] T as Z where .X = () and .Y = () {}
|
||||
|
||||
fn F(ZZ:! Z where .X = ()) {
|
||||
fn F(generic ZZ: Z where .X = ()) {
|
||||
// Z.Y is unspecified on `ZZ` so it's found on the final impl where it's known
|
||||
// to be the concrete type (), which can then be used in this generic
|
||||
// function.
|
||||
@@ -48,13 +48,13 @@ fn F(ZZ:! Z where .X = ()) {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let Y:! type;
|
||||
let X: type;
|
||||
let Y: type;
|
||||
}
|
||||
|
||||
final impl forall [T:! type] T as Z where .X = () and .Y = () {}
|
||||
final impl forall [T: type] T as Z where .X = () and .Y = () {}
|
||||
|
||||
fn F[T:! Z where .X = ()](z: T) {
|
||||
fn F[T: Z where .X = ()](z: T) {
|
||||
// z.Y is unspecified on `ZZ` so it's found on the final impl where it's known
|
||||
// to be the concrete type (), which can then be used in this generic
|
||||
// function.
|
||||
@@ -64,20 +64,20 @@ fn F[T:! Z where .X = ()](z: T) {
|
||||
// --- final_impl_makes_compatible_facet_values.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I { let X:! type; }
|
||||
interface I { let X: type; }
|
||||
interface J {}
|
||||
|
||||
final impl forall [T:! J] T as I where .X = () {}
|
||||
final impl forall [T: J] T as I where .X = () {}
|
||||
|
||||
class C(T:! I) {
|
||||
class C(T: I) {
|
||||
var b: T.X;
|
||||
}
|
||||
|
||||
class D(T:! J) {
|
||||
class D(T: J) {
|
||||
var c: C(T)*;
|
||||
}
|
||||
|
||||
fn F(T:! I & J) -> () {
|
||||
fn F(generic T: I & J) -> () {
|
||||
// The witness for `I` found here directly, and inside `D` from a FacetValue
|
||||
// come from the same facet, the `T` binding in the params of F, so they
|
||||
// should be compatible.
|
||||
@@ -90,20 +90,20 @@ fn F(T:! I & J) -> () {
|
||||
// --- non_final_impl_makes_compatible_facet_values.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I { let X:! Core.Destroy; }
|
||||
interface I { let X: Core.Destroy; }
|
||||
interface J {}
|
||||
|
||||
impl forall [T:! J] T as I where .X = () {}
|
||||
impl forall [T: J] T as I where .X = () {}
|
||||
|
||||
class C(T:! I) {
|
||||
class C(T: I) {
|
||||
var b: T.X;
|
||||
}
|
||||
|
||||
class D(T:! J) {
|
||||
class D(T: J) {
|
||||
var c: C(T)*;
|
||||
}
|
||||
|
||||
fn F(T:! I & J) -> T.(I.X)* {
|
||||
fn F(generic T: I & J) -> T.(I.X)* {
|
||||
var x: C(T);
|
||||
var y: D(T);
|
||||
// The witness for `I` found here directly, and inside `D` from a FacetValue
|
||||
@@ -117,12 +117,12 @@ fn F(T:! I & J) -> T.(I.X)* {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
final impl forall [T:! type] T as Z where .X = () {}
|
||||
final impl forall [T: type] T as Z where .X = () {}
|
||||
|
||||
// TODO: This should be diagnosed as there is a final impl defining `.X = ()`,
|
||||
// which makes the LHS of this rewrite constraint concrete. And since the RHS is
|
||||
// not the same (or convertible from), the rewrite is impossible.
|
||||
fn F(unused ZZ:! Z where .X = {.r: ()}) {}
|
||||
fn F(unused generic ZZ: Z where .X = {.r: ()}) {}
|
||||
+113
-113
@@ -20,7 +20,7 @@ interface HasF {
|
||||
fn F(self);
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as HasF {
|
||||
impl forall [T: type] T as HasF {
|
||||
fn F(unused self) {}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ interface HasF {
|
||||
fn F(self) -> Self;
|
||||
}
|
||||
|
||||
impl forall [T:! type] T* as HasF {
|
||||
impl forall [T: type] T* as HasF {
|
||||
fn F(self) -> T* { return self; }
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ interface HasF {
|
||||
fn F(self);
|
||||
}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
impl forall [T:! type] C(T) as HasF {
|
||||
impl forall [T: type] C(T) as HasF {
|
||||
fn F(unused self) {}
|
||||
}
|
||||
|
||||
@@ -66,11 +66,11 @@ fn G(x: C({})) {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface HasF(T:! type) {
|
||||
interface HasF(T: type) {
|
||||
fn F(self);
|
||||
}
|
||||
|
||||
impl forall [T:! type] {} as HasF(T) {
|
||||
impl forall [T: type] {} as HasF(T) {
|
||||
fn F(unused self) {}
|
||||
}
|
||||
|
||||
@@ -87,10 +87,10 @@ interface HasF {
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_incomplete_deduction.carbon:[[@LINE+4]]:13: error: `impl` with unused generic binding [ImplUnusedBinding]
|
||||
// CHECK:STDERR: impl forall [T:! type, U:! type] T as HasF {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type, U: type] T as HasF {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type, U:! type] T as HasF {
|
||||
impl forall [T: type, U: type] T as HasF {
|
||||
fn F(unused self) {}
|
||||
}
|
||||
|
||||
@@ -106,11 +106,11 @@ fn G(x: {}) {
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface HasF(T:! type) {
|
||||
interface HasF(T: type) {
|
||||
fn F(self);
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as HasF(T) {
|
||||
impl forall [T: type] T as HasF(T) {
|
||||
fn F(unused self) {}
|
||||
}
|
||||
|
||||
@@ -197,9 +197,9 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
|
||||
// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -248,7 +248,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.ebe)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_33.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_33.2 (constants.%HasF.impl_witness.ebe)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type.195)]
|
||||
@@ -264,12 +264,12 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_34.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.ebe)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_33.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_33.2 (constants.%HasF.impl_witness.ebe)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
|
||||
// CHECK:STDOUT: extend %HasF.ref
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_34.1
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_33.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -333,7 +333,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc8_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.ebe
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_33.2 => constants.%HasF.impl_witness.ebe
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.195
|
||||
@@ -365,7 +365,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @T.as.HasF.impl(constants.%empty_struct_type) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc8_15.1 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.aaf
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_33.2 => constants.%HasF.impl_witness.aaf
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.d06
|
||||
@@ -489,11 +489,11 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.d47)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T.67d)]
|
||||
// CHECK:STDOUT: %ptr.loc8_25.2: type = ptr_type %T.ref [symbolic = %ptr.loc8_25.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %ptr.loc8_24.2: type = ptr_type %T.ref [symbolic = %ptr.loc8_24.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
|
||||
// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T.67d)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -560,14 +560,14 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: generic impl @ptr.as.HasF.impl(%T.loc8_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt.d47)]
|
||||
// CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T.67d)]
|
||||
// CHECK:STDOUT: %ptr.loc8_25.1: type = ptr_type %T.loc8_15.1 [symbolic = %ptr.loc8_25.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_35.2: <witness> = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_35.2 (constants.%HasF.impl_witness.672)]
|
||||
// CHECK:STDOUT: %ptr.loc8_24.1: type = ptr_type %T.loc8_15.1 [symbolic = %ptr.loc8_24.1 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2: <witness> = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.672)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ptr.as.HasF.impl.F.type: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%T.loc8_15.1) [symbolic = %ptr.as.HasF.impl.F.type (constants.%ptr.as.HasF.impl.F.type.d5f)]
|
||||
// CHECK:STDOUT: %ptr.as.HasF.impl.F: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.d5f) = struct_value () [symbolic = %ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.be3)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %ptr.loc8_25.2 as %HasF.ref {
|
||||
// CHECK:STDOUT: impl: %ptr.loc8_24.2 as %HasF.ref {
|
||||
// CHECK:STDOUT: %ptr.as.HasF.impl.F.decl: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.d5f) = fn_decl @ptr.as.HasF.impl.F [symbolic = @ptr.as.HasF.impl.%ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.be3)] {
|
||||
// CHECK:STDOUT: %self.param_patt.loc9_8.1: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = value_param_pattern [symbolic = %self.param_patt.loc9_8.2 (constants.%self.param_patt.921)]
|
||||
// CHECK:STDOUT: %self.patt.loc9_8.1: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = at_binding_pattern self, %self.param_patt.loc9_8.1 [symbolic = %self.patt.loc9_8.2 (constants.%self.patt.99b)]
|
||||
@@ -578,19 +578,19 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %ptr.loc9_18: type = ptr_type %T.ref [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %.loc9_18.2: Core.Form = init_form %ptr.loc9_18 [symbolic = %.loc9_18.1 (constants.%.cb6)]
|
||||
// CHECK:STDOUT: %self.param: @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = value_param call_param0
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @ptr.as.HasF.impl.%ptr.loc8_25.2 [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @ptr.as.HasF.impl.%ptr.loc8_24.2 [symbolic = %ptr.loc9_8 (constants.%ptr.e8f)]
|
||||
// CHECK:STDOUT: %self: @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: %return.param: ref @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref @ptr.as.HasF.impl.F.%ptr.loc9_8 (%ptr.e8f) = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%ptr.as.HasF.impl.F.decl), @ptr.as.HasF.impl [concrete]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_35.1: <witness> = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(constants.%T.67d) [symbolic = %HasF.impl_witness.loc8_35.2 (constants.%HasF.impl_witness.672)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_34.1: <witness> = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(constants.%T.67d) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.672)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .T = <poisoned>
|
||||
// CHECK:STDOUT: .F = %ptr.as.HasF.impl.F.decl
|
||||
// CHECK:STDOUT: extend %HasF.ref
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_35.1
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_34.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -681,8 +681,8 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%T.67d) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt.d47
|
||||
// CHECK:STDOUT: %T.loc8_15.1 => constants.%T.67d
|
||||
// CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_35.2 => constants.%HasF.impl_witness.672
|
||||
// CHECK:STDOUT: %ptr.loc8_24.1 => constants.%ptr.e8f
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.672
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.d5f
|
||||
@@ -721,8 +721,8 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%empty_struct_type) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt.d47
|
||||
// CHECK:STDOUT: %T.loc8_15.1 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.c28
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_35.2 => constants.%HasF.impl_witness.e43
|
||||
// CHECK:STDOUT: %ptr.loc8_24.1 => constants.%ptr.c28
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.e43
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.03e
|
||||
@@ -829,9 +829,9 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc8_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_10.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc8_12.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc8_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_10.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -840,11 +840,11 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_15.2 [symbolic = %T.loc10_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.1 (constants.%C.1d0)]
|
||||
// CHECK:STDOUT: %C.loc10_26.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_26.1 (constants.%C.1d0)]
|
||||
// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
|
||||
// CHECK:STDOUT: %.loc10_18.1: type = splice_block %.loc10_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc10_17.1: type = splice_block %.loc10_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc10_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc10_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc10_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -895,29 +895,29 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: generic impl @C.as.HasF.impl(%T.loc10_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc10_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc10_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(%T.loc10_15.1) [symbolic = %C.loc10_27.1 (constants.%C.1d0)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc10_37.2: <witness> = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(%T.loc10_15.1) [symbolic = %HasF.impl_witness.loc10_37.2 (constants.%HasF.impl_witness.4e6)]
|
||||
// CHECK:STDOUT: %C.loc10_26.1: type = class_type @C, @C(%T.loc10_15.1) [symbolic = %C.loc10_26.1 (constants.%C.1d0)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc10_36.2: <witness> = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(%T.loc10_15.1) [symbolic = %HasF.impl_witness.loc10_36.2 (constants.%HasF.impl_witness.4e6)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%T.loc10_15.1) [symbolic = %C.as.HasF.impl.F.type (constants.%C.as.HasF.impl.F.type.67f)]
|
||||
// CHECK:STDOUT: %C.as.HasF.impl.F: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.67f) = struct_value () [symbolic = %C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.7ba)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %C.loc10_27.2 as %HasF.ref {
|
||||
// CHECK:STDOUT: impl: %C.loc10_26.2 as %HasF.ref {
|
||||
// CHECK:STDOUT: %C.as.HasF.impl.F.decl: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.67f) = fn_decl @C.as.HasF.impl.F [symbolic = @C.as.HasF.impl.%C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.7ba)] {
|
||||
// CHECK:STDOUT: %self.param_patt.loc11_15.1: @C.as.HasF.impl.F.%pattern_type (%pattern_type.ebe) = value_param_pattern [symbolic = %self.param_patt.loc11_15.2 (constants.%self.param_patt.5bc)]
|
||||
// CHECK:STDOUT: %self.patt.loc11_15.1: @C.as.HasF.impl.F.%pattern_type (%pattern_type.ebe) = at_binding_pattern self, %self.param_patt.loc11_15.1 [symbolic = %self.patt.loc11_15.2 (constants.%self.patt.6f1)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @C.as.HasF.impl.F.%C (%C.1d0) = value_param call_param0
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.HasF.impl.%C.loc10_27.2 [symbolic = %C (constants.%C.1d0)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.HasF.impl.%C.loc10_26.2 [symbolic = %C (constants.%C.1d0)]
|
||||
// CHECK:STDOUT: %self: @C.as.HasF.impl.F.%C (%C.1d0) = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%C.as.HasF.impl.F.decl), @C.as.HasF.impl [concrete]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc10_37.1: <witness> = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc10_37.2 (constants.%HasF.impl_witness.4e6)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc10_36.1: <witness> = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc10_36.2 (constants.%HasF.impl_witness.4e6)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
|
||||
// CHECK:STDOUT: extend %HasF.ref
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc10_37.1
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc10_36.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1004,8 +1004,8 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @C.as.HasF.impl(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc10_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %C.loc10_27.1 => constants.%C.1d0
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc10_37.2 => constants.%HasF.impl_witness.4e6
|
||||
// CHECK:STDOUT: %C.loc10_26.1 => constants.%C.1d0
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc10_36.2 => constants.%HasF.impl_witness.4e6
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.67f
|
||||
@@ -1045,8 +1045,8 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @C.as.HasF.impl(constants.%empty_struct_type) {
|
||||
// CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc10_15.1 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT: %C.loc10_27.1 => constants.%C.d8e
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc10_37.2 => constants.%HasF.impl_witness.f0d
|
||||
// CHECK:STDOUT: %C.loc10_26.1 => constants.%C.d8e
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc10_36.2 => constants.%HasF.impl_witness.f0d
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.edc
|
||||
@@ -1142,23 +1142,23 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %HasF.decl: %HasF.type.c96 = interface_decl @HasF [concrete = constants.%HasF.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: impl_decl @empty_struct_type.as.HasF.impl [concrete] {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %.loc8_24.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_24.2: type = converted %.loc8_24.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %HasF.ref: %HasF.type.c96 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.type.loc8_36.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -1181,10 +1181,10 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_17.1)> [symbolic = %HasF.type (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.loc4_25.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -1194,7 +1194,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_8.1: type = splice_block %.loc5_8.3 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc5_8.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %.loc5_8.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = specific_constant @HasF.%Self.loc4_25.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.ref: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = name_ref Self, %.loc5_8.2 [symbolic = %Self (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_8.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_8.3: type = converted %Self.ref, %Self.as_type.loc5_8.2 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)]
|
||||
@@ -1204,7 +1204,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %assoc0.loc5_13.1: @HasF.WithSelf.%HasF.assoc_type (%HasF.assoc_type.ddf) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_13.2 (constants.%assoc0.e9a)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_26.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_25.1
|
||||
// CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0.loc5_13.1
|
||||
// CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl)
|
||||
// CHECK:STDOUT:
|
||||
@@ -1217,34 +1217,34 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: generic impl @empty_struct_type.as.HasF.impl(%T.loc8_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.type.loc8_36.1: type = facet_type <@HasF, @HasF(%T.loc8_15.1)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_38.2: <witness> = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_38.2 (constants.%HasF.impl_witness.932)]
|
||||
// CHECK:STDOUT: %HasF.type.loc8_35.1: type = facet_type <@HasF, @HasF(%T.loc8_15.1)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2: <witness> = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness.932)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_36.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_35.1 [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%T.loc8_15.1) [symbolic = %empty_struct_type.as.HasF.impl.F.type (constants.%empty_struct_type.as.HasF.impl.F.type.5ee)]
|
||||
// CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F: @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.type (%empty_struct_type.as.HasF.impl.F.type.5ee) = struct_value () [symbolic = %empty_struct_type.as.HasF.impl.F (constants.%empty_struct_type.as.HasF.impl.F.b79)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_36.2 {
|
||||
// CHECK:STDOUT: impl: %.loc8_24.2 as %HasF.type.loc8_35.2 {
|
||||
// CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.decl: @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.type (%empty_struct_type.as.HasF.impl.F.type.5ee) = fn_decl @empty_struct_type.as.HasF.impl.F [symbolic = @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F (constants.%empty_struct_type.as.HasF.impl.F.b79)] {
|
||||
// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = value_param_pattern [concrete = constants.%self.param_patt.482]
|
||||
// CHECK:STDOUT: %self.patt: %pattern_type.a96 = at_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b63]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: %empty_struct_type = value_param call_param0
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_struct_type.as.HasF.impl.%.loc8_25.2 [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_struct_type.as.HasF.impl.%.loc8_24.2 [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %self: %empty_struct_type = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%empty_struct_type.as.HasF.impl.F.decl), @empty_struct_type.as.HasF.impl [concrete]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_38.1: <witness> = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_38.2 (constants.%HasF.impl_witness.932)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_37.1: <witness> = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness.932)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %empty_struct_type.as.HasF.impl.F.decl
|
||||
// CHECK:STDOUT: extend %HasF.type.loc8_36.2
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_38.1
|
||||
// CHECK:STDOUT: extend %HasF.type.loc8_35.2
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_37.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf)) {
|
||||
// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf)) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %Self: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.822)]
|
||||
@@ -1292,7 +1292,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %HasF.type => constants.%HasF.type.daf
|
||||
// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.822
|
||||
// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.822
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @HasF.WithSelf(constants.%T, constants.%Self.822) {
|
||||
@@ -1319,8 +1319,8 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc8_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.daf
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_38.2 => constants.%HasF.impl_witness.932
|
||||
// CHECK:STDOUT: %HasF.type.loc8_35.1 => constants.%HasF.type.daf
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2 => constants.%HasF.impl_witness.932
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete
|
||||
@@ -1357,7 +1357,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %HasF.type => constants.%HasF.type.b91
|
||||
// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.aa9
|
||||
// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.aa9
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @HasF.WithSelf(constants.%empty_struct_type, constants.%Self.822) {
|
||||
@@ -1374,8 +1374,8 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%empty_struct_type) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc8_15.1 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.b91
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_38.2 => constants.%HasF.impl_witness.7f1
|
||||
// CHECK:STDOUT: %HasF.type.loc8_35.1 => constants.%HasF.type.b91
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2 => constants.%HasF.impl_witness.7f1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type
|
||||
@@ -1451,20 +1451,20 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
|
||||
// CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
|
||||
// CHECK:STDOUT: %T.patt.loc12_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %U.patt.loc12_25.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_25.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %U.patt.loc12_24.1: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_24.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_15.2 [symbolic = %T.loc12_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
|
||||
// CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc12_15: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc12_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc12_28.1: type = splice_block %.loc12_28.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc12_25: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc12_28.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc12_26.1: type = splice_block %.loc12_26.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc12_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc12_26.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc12_25.2: type = symbolic_binding U, 1 [symbolic = %U.loc12_25.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %U.loc12_24.2: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern [concrete = constants.%x.param_patt]
|
||||
@@ -1508,15 +1508,15 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc12_15.2: type, %U.loc12_25.2: type) {
|
||||
// CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc12_15.2: type, %U.loc12_24.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc12_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc12_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %U.patt.loc12_25.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_25.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %U.loc12_25.1: type = symbolic_binding U, 1 [symbolic = %U.loc12_25.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc12_44.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc12_15.1, %U.loc12_25.1) [symbolic = %HasF.impl_witness.loc12_44.2 (constants.%HasF.impl_witness)]
|
||||
// CHECK:STDOUT: %U.patt.loc12_24.2: %pattern_type.98f = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_24.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: %U.loc12_24.1: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc12_42.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc12_15.1, %U.loc12_24.1) [symbolic = %HasF.impl_witness.loc12_42.2 (constants.%HasF.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc12_15.1, %U.loc12_25.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)]
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc12_15.1, %U.loc12_24.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)]
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %T.ref as %HasF.ref {
|
||||
@@ -1529,7 +1529,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (), @T.as.HasF.impl [concrete]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc12_44.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T, constants.%U) [symbolic = %HasF.impl_witness.loc12_44.2 (constants.%HasF.impl_witness)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc12_42.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T, constants.%U) [symbolic = %HasF.impl_witness.loc12_42.2 (constants.%HasF.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
|
||||
@@ -1548,7 +1548,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc12_15.2: type, @T.as.HasF.impl.%U.loc12_25.2: type) {
|
||||
// CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc12_15.2: type, @T.as.HasF.impl.%U.loc12_24.2: type) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)]
|
||||
// CHECK:STDOUT: %self.param_patt.loc13_15.2: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %self.param_patt.loc13_15.2 (constants.%self.param_patt.b7c)]
|
||||
@@ -1593,9 +1593,9 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T, constants.%U) {
|
||||
// CHECK:STDOUT: %T.patt.loc12_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc12_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %U.patt.loc12_25.2 => constants.%U.patt
|
||||
// CHECK:STDOUT: %U.loc12_25.1 => constants.%U
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc12_44.2 => constants.%HasF.impl_witness
|
||||
// CHECK:STDOUT: %U.patt.loc12_24.2 => constants.%U.patt
|
||||
// CHECK:STDOUT: %U.loc12_24.1 => constants.%U
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc12_42.2 => constants.%HasF.impl_witness
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type
|
||||
@@ -1676,22 +1676,22 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %HasF.decl: %HasF.type.c96 = interface_decl @HasF [concrete = constants.%HasF.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref.loc8_24: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.ref.loc8_23: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.ref: %HasF.type.c96 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
|
||||
// CHECK:STDOUT: %T.ref.loc8_34: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %T.ref.loc8_33: type = name_ref T, %T.loc8_15.2 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.type.loc8_34.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_34.1 (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc8_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc8_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -1713,10 +1713,10 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_17.1)> [symbolic = %HasF.type (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.loc4_25.2: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self.loc4_25.2 (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
@@ -1726,7 +1726,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.as_type.loc5_8.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc5_8.1: type = splice_block %.loc5_8.3 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc5_8.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %.loc5_8.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = specific_constant @HasF.%Self.loc4_25.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.ref: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = name_ref Self, %.loc5_8.2 [symbolic = %Self (constants.%Self.822)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc5_8.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc5_8.3: type = converted %Self.ref, %Self.as_type.loc5_8.2 [symbolic = %Self.as_type.loc5_8.1 (constants.%Self.as_type)]
|
||||
@@ -1736,7 +1736,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: %assoc0.loc5_13.1: @HasF.WithSelf.%HasF.assoc_type (%HasF.assoc_type.ddf) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_13.2 (constants.%assoc0.e9a)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_26.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_25.1
|
||||
// CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0.loc5_13.1
|
||||
// CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl)
|
||||
// CHECK:STDOUT:
|
||||
@@ -1749,30 +1749,30 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_15.2: type) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc8_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_15.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.type.loc8_35.1: type = facet_type <@HasF, @HasF(%T.loc8_15.1)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness)]
|
||||
// CHECK:STDOUT: %HasF.type.loc8_34.1: type = facet_type <@HasF, @HasF(%T.loc8_15.1)> [symbolic = %HasF.type.loc8_34.1 (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_36.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %HasF.impl_witness.loc8_36.2 (constants.%HasF.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_35.1 [symbolic = %require_complete (constants.%require_complete.513)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_34.1 [symbolic = %require_complete (constants.%require_complete.513)]
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc8_15.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)]
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_35.2 {
|
||||
// CHECK:STDOUT: impl: %T.ref.loc8_23 as %HasF.type.loc8_34.2 {
|
||||
// CHECK:STDOUT: %T.as.HasF.impl.F.decl: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = fn_decl @T.as.HasF.impl.F [symbolic = @T.as.HasF.impl.%T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)] {
|
||||
// CHECK:STDOUT: %self.param_patt.loc9_15.1: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %self.param_patt.loc9_15.2 (constants.%self.param_patt.b7c)]
|
||||
// CHECK:STDOUT: %self.patt.loc9_15.1: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = at_binding_pattern self, %self.param_patt.loc9_15.1 [symbolic = %self.patt.loc9_15.2 (constants.%self.patt.7e4)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref.loc8_24 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref.loc8_23 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_37.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness)]
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_36.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_36.2 (constants.%HasF.impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
|
||||
// CHECK:STDOUT: extend %HasF.type.loc8_35.2
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_37.1
|
||||
// CHECK:STDOUT: extend %HasF.type.loc8_34.2
|
||||
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_36.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1792,7 +1792,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: .Self = constants.%B
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.daf)) {
|
||||
// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_17.2: type, @HasF.%Self.loc4_25.1: @HasF.%HasF.type (%HasF.type.daf)) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.daf)]
|
||||
// CHECK:STDOUT: %Self: @HasF.WithSelf.F.%HasF.type (%HasF.type.daf) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.822)]
|
||||
@@ -1840,7 +1840,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %HasF.type => constants.%HasF.type.daf
|
||||
// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.822
|
||||
// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.822
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @HasF.WithSelf(constants.%T, constants.%Self.822) {
|
||||
@@ -1867,8 +1867,8 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc8_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %HasF.type.loc8_35.1 => constants.%HasF.type.daf
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_37.2 => constants.%HasF.impl_witness
|
||||
// CHECK:STDOUT: %HasF.type.loc8_34.1 => constants.%HasF.type.daf
|
||||
// CHECK:STDOUT: %HasF.impl_witness.loc8_36.2 => constants.%HasF.impl_witness
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete.513
|
||||
@@ -1910,7 +1910,7 @@ fn G(x: A) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %HasF.type => constants.%HasF.type.5a7
|
||||
// CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.ad0
|
||||
// CHECK:STDOUT: %Self.loc4_25.2 => constants.%Self.ad0
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @HasF.WithSelf(constants.%B, constants.%Self.822) {
|
||||
|
||||
+68
-68
@@ -16,7 +16,7 @@ library "[[@TEST_NAME]]";
|
||||
interface Z {}
|
||||
|
||||
// This creates a dependency cycle with itself.
|
||||
impl forall [T:! Z] T as Z {}
|
||||
impl forall [T: Z] T as Z {}
|
||||
|
||||
class Point {}
|
||||
|
||||
@@ -29,8 +29,8 @@ fn F() {
|
||||
// CHECK:STDERR: Point as Z;
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_simple_cycle.carbon:[[@LINE-12]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [T:! Z] T as Z {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: Z] T as Z {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_impl_simple_cycle.carbon:[[@LINE+4]]:3: error: cannot convert type `Point` into type implementing `Z` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Point as Z;
|
||||
@@ -46,7 +46,7 @@ interface Y {}
|
||||
interface Z {}
|
||||
|
||||
// This creates a dependency cycle with itself.
|
||||
impl forall [T:! type where .Self impls Z] T as Z {}
|
||||
impl forall [T: type where .Self impls Z] T as Z {}
|
||||
|
||||
class Point {}
|
||||
|
||||
@@ -55,8 +55,8 @@ fn F() {
|
||||
// CHECK:STDERR: Point as Z;
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_simple_where_cycle.carbon:[[@LINE-8]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [T:! type where .Self impls Z] T as Z {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type where .Self impls Z] T as Z {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_impl_simple_where_cycle.carbon:[[@LINE+4]]:3: error: cannot convert type `Point` into type implementing `Z` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Point as Z;
|
||||
@@ -72,7 +72,7 @@ interface Z {}
|
||||
interface Y {}
|
||||
|
||||
// This creates a dependency cycle with itself.
|
||||
impl forall [T:! Z & Y] T as Z {}
|
||||
impl forall [T: Z & Y] T as Z {}
|
||||
|
||||
class Point {}
|
||||
|
||||
@@ -81,8 +81,8 @@ fn F() {
|
||||
// CHECK:STDERR: Point as Z;
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_simple_two_interfaces.carbon:[[@LINE-8]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [T:! Z & Y] T as Z {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: Z & Y] T as Z {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_impl_simple_two_interfaces.carbon:[[@LINE+4]]:3: error: cannot convert type `Point` into type implementing `Z` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Point as Z;
|
||||
@@ -99,9 +99,9 @@ interface Y {}
|
||||
interface Z {}
|
||||
|
||||
// This creates a dependency cycle with itself.
|
||||
impl forall [T:! X] T as Y {}
|
||||
impl forall [T:! Y] T as Z {}
|
||||
impl forall [T:! Z] T as X {}
|
||||
impl forall [T: X] T as Y {}
|
||||
impl forall [T: Y] T as Z {}
|
||||
impl forall [T: Z] T as X {}
|
||||
|
||||
class C {}
|
||||
|
||||
@@ -110,14 +110,14 @@ fn F() {
|
||||
// CHECK:STDERR: C as Z;
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_impl_long_cycle.carbon:[[@LINE-9]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [T:! Y] T as Z {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: Y] T as Z {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_long_cycle.carbon:[[@LINE-13]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [T:! X] T as Y {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: X] T as Y {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_long_cycle.carbon:[[@LINE-14]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [T:! Z] T as X {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: Z] T as X {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_impl_long_cycle.carbon:[[@LINE+4]]:3: error: cannot convert type `C` into type implementing `Z` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: C as Z;
|
||||
@@ -129,34 +129,34 @@ fn F() {
|
||||
// --- fail_impl_cycle_one_generic_param.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface ComparableWith(T:! type) {}
|
||||
interface ComparableWith(T: type) {}
|
||||
|
||||
// This creates a dependency cycle with itself.
|
||||
impl forall [U:! type, T:! ComparableWith(U)]
|
||||
impl forall [U: type, T: ComparableWith(U)]
|
||||
U as ComparableWith(T) {}
|
||||
|
||||
class C {}
|
||||
class D {}
|
||||
|
||||
fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+17]]:3: error: cycle found in search for impl of `ComparableWith(C)` for type `C` [ImplLookupCycle]
|
||||
// CHECK:STDERR: Compare({} as C, {} as C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-12]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `ComparableWith(C)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Compare({} as C, {} as C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-16]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Compare({} as C, {} as C);
|
||||
|
||||
@@ -164,21 +164,21 @@ fn F() {
|
||||
// CHECK:STDERR: Compare({} as C, {} as D);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-31]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-34]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-31]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+7]]:3: error: cannot convert type `D` into type implementing `ComparableWith(C)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Compare({} as C, {} as D);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-38]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Compare({} as C, {} as D);
|
||||
|
||||
@@ -186,21 +186,21 @@ fn F() {
|
||||
// CHECK:STDERR: Compare({} as D, {} as C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-53]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-56]]:1: note: determining if this impl clause matches [ImplLookupCycleNote]
|
||||
// CHECK:STDERR: impl forall [U:! type, T:! ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [U: type, T: ComparableWith(U)]
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-53]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+7]]:3: error: cannot convert type `C` into type implementing `ComparableWith(D)` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: Compare({} as D, {} as C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-60]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
Compare({} as D, {} as C);
|
||||
}
|
||||
@@ -208,12 +208,12 @@ fn F() {
|
||||
// --- impl_recurse_with_simpler_type_no_cycle.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class Wraps(T:! type) {}
|
||||
class Wraps(T: type) {}
|
||||
|
||||
interface Printable {}
|
||||
|
||||
// If T is printable, so is Wraps(T).
|
||||
impl forall [T:! Printable] Wraps(T) as Printable {}
|
||||
impl forall [T: Printable] Wraps(T) as Printable {}
|
||||
|
||||
class C {}
|
||||
impl C as Printable {}
|
||||
@@ -226,14 +226,14 @@ fn F() {
|
||||
// --- impl_recurse_with_simpler_type_in_generic_param_no_cycle.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class Wraps(T:! type) {}
|
||||
class Wraps(T: type) {}
|
||||
|
||||
interface ComparableTo(T:! type) {}
|
||||
interface ComparableTo(T: type) {}
|
||||
|
||||
// If U is comparable to T, then U is comparable to Wraps(T).
|
||||
impl forall [T:! type, U:! ComparableTo(T)] U as ComparableTo(Wraps(T)) {}
|
||||
impl forall [T: type, U: ComparableTo(T)] U as ComparableTo(Wraps(T)) {}
|
||||
// If U is comparable to T then Wraps(U) is comparable to T.
|
||||
impl forall [T:! type, U:! ComparableTo(T)] Wraps(U) as ComparableTo(T) {}
|
||||
impl forall [T: type, U: ComparableTo(T)] Wraps(U) as ComparableTo(T) {}
|
||||
|
||||
class C {}
|
||||
class D {}
|
||||
@@ -250,9 +250,9 @@ fn F() {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// Implement this for a type in one direction.
|
||||
interface ComparableTo(T:! type) {}
|
||||
interface ComparableTo(T: type) {}
|
||||
// Use this as a bound with two types in any direction.
|
||||
interface ComparableWith(T:! type) {}
|
||||
interface ComparableWith(T: type) {}
|
||||
|
||||
class C {}
|
||||
class D {}
|
||||
@@ -266,27 +266,27 @@ impl C as ComparableTo(D) {}
|
||||
// overlap.
|
||||
|
||||
// T is always ComparableWith(T).
|
||||
impl forall [T:! type] T as ComparableWith(T) {}
|
||||
impl forall [T: type] T as ComparableWith(T) {}
|
||||
// If U is ComparableTo(T), U is ComparableWith(T).
|
||||
// CHECK:STDERR: fail_todo_impl_recurse_with_simpler_type_in_generic_param_bidirectional_no_cycle.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
|
||||
// CHECK:STDERR: impl forall [T:! type, U:! ComparableTo(T)] U as ComparableWith(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type, U: ComparableTo(T)] U as ComparableWith(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_impl_recurse_with_simpler_type_in_generic_param_bidirectional_no_cycle.carbon:[[@LINE-5]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as ComparableWith(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as ComparableWith(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type, U:! ComparableTo(T)] U as ComparableWith(T) {}
|
||||
impl forall [T: type, U: ComparableTo(T)] U as ComparableWith(T) {}
|
||||
// If U is ComparableTo(T), T is ComparableWith(U).
|
||||
// CHECK:STDERR: fail_todo_impl_recurse_with_simpler_type_in_generic_param_bidirectional_no_cycle.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
|
||||
// CHECK:STDERR: impl forall [T:! type, U:! ComparableTo(T)] T as ComparableWith(U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type, U: ComparableTo(T)] T as ComparableWith(U) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_impl_recurse_with_simpler_type_in_generic_param_bidirectional_no_cycle.carbon:[[@LINE-14]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as ComparableWith(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as ComparableWith(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type, U:! ComparableTo(T)] T as ComparableWith(U) {}
|
||||
impl forall [T: type, U: ComparableTo(T)] T as ComparableWith(U) {}
|
||||
|
||||
fn Compare[T:! type, U:! ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
fn Compare[T: type, U: ComparableWith(T)](unused t: T, unused u: U) {}
|
||||
|
||||
fn F() {
|
||||
Compare({} as C, {} as C);
|
||||
@@ -303,8 +303,8 @@ interface Second {}
|
||||
// When answering a query "does T impl Second", we must avoid trying to deduce
|
||||
// parameters for this impl. Not only is doing so unnecessary, it would start a new
|
||||
// "does T impl Second" query, leading to a "cycle in impl lookup" error.
|
||||
impl forall [T:! Second] T as First {}
|
||||
impl forall [T:! type] T as Second {}
|
||||
impl forall [T: Second] T as First {}
|
||||
impl forall [T: type] T as Second {}
|
||||
|
||||
class C {}
|
||||
|
||||
@@ -316,14 +316,14 @@ fn F() {
|
||||
// --- deduce_cycle_with_symbolic.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface First(T:! type) {}
|
||||
interface First(T: type) {}
|
||||
interface Second {}
|
||||
|
||||
// When answering a query "does T impl Second", we must avoid trying to deduce
|
||||
// parameters for this impl. Not only is doing so unnecessary, it would start a new
|
||||
// "does T impl Second" query, leading to a "cycle in impl lookup" error.
|
||||
impl forall [T:! Second, U:! type] T as First(U) {}
|
||||
impl forall [T:! type] T as Second {}
|
||||
impl forall [T: Second, U: type] T as First(U) {}
|
||||
impl forall [T: type] T as Second {}
|
||||
|
||||
class C {}
|
||||
|
||||
|
||||
+44
-44
@@ -13,23 +13,23 @@
|
||||
// --- impl_forall.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class A(T:! type) {
|
||||
class A(T: type) {
|
||||
var n: T;
|
||||
}
|
||||
|
||||
interface I(U:! type) {
|
||||
interface I(U: type) {
|
||||
fn F(ref self) -> U*;
|
||||
}
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
impl forall [V:! type] A(V) as I(V) {
|
||||
impl forall [V: type] A(V) as I(V) {
|
||||
fn F(ref self) -> V* {
|
||||
return &self.n;
|
||||
}
|
||||
}
|
||||
//@dump-sem-ir-end
|
||||
|
||||
fn TestGeneric[W:! type](a: A(W)*) -> W* {
|
||||
fn TestGeneric[W: type](a: A(W)*) -> W* {
|
||||
//@dump-sem-ir-begin
|
||||
return a->(I(W).F)();
|
||||
//@dump-sem-ir-end
|
||||
@@ -158,14 +158,14 @@ fn TestSpecific(a: A({})*) -> {}* {
|
||||
// CHECK:STDOUT: %V.patt.loc12_15.1: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc12_15.2 (constants.%V.patt.d47)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A.generic]
|
||||
// CHECK:STDOUT: %V.ref.loc12_26: type = name_ref V, %V.loc12_15.2 [symbolic = %V.loc12_15.1 (constants.%V.67d)]
|
||||
// CHECK:STDOUT: %A.loc12_27.2: type = class_type @A, @A(constants.%V.67d) [symbolic = %A.loc12_27.1 (constants.%A.47a1de.2)]
|
||||
// CHECK:STDOUT: %V.ref.loc12_25: type = name_ref V, %V.loc12_15.2 [symbolic = %V.loc12_15.1 (constants.%V.67d)]
|
||||
// CHECK:STDOUT: %A.loc12_26.2: type = class_type @A, @A(constants.%V.67d) [symbolic = %A.loc12_26.1 (constants.%A.47a1de.2)]
|
||||
// CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
|
||||
// CHECK:STDOUT: %V.ref.loc12_34: type = name_ref V, %V.loc12_15.2 [symbolic = %V.loc12_15.1 (constants.%V.67d)]
|
||||
// CHECK:STDOUT: %I.type.loc12_35.2: type = facet_type <@I, @I(constants.%V.67d)> [symbolic = %I.type.loc12_35.1 (constants.%I.type.3fe556.2)]
|
||||
// CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %V.ref.loc12_33: type = name_ref V, %V.loc12_15.2 [symbolic = %V.loc12_15.1 (constants.%V.67d)]
|
||||
// CHECK:STDOUT: %I.type.loc12_34.2: type = facet_type <@I, @I(constants.%V.67d)> [symbolic = %I.type.loc12_34.1 (constants.%I.type.3fe556.2)]
|
||||
// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc12_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %V.loc12_15.2: type = symbolic_binding V, 0 [symbolic = %V.loc12_15.1 (constants.%V.67d)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -174,16 +174,16 @@ fn TestSpecific(a: A({})*) -> {}* {
|
||||
// CHECK:STDOUT: generic impl @A.as.I.impl(%V.loc12_15.2: type) {
|
||||
// CHECK:STDOUT: %V.patt.loc12_15.2: %pattern_type.98f = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc12_15.2 (constants.%V.patt.d47)]
|
||||
// CHECK:STDOUT: %V.loc12_15.1: type = symbolic_binding V, 0 [symbolic = %V.loc12_15.1 (constants.%V.67d)]
|
||||
// CHECK:STDOUT: %A.loc12_27.1: type = class_type @A, @A(%V.loc12_15.1) [symbolic = %A.loc12_27.1 (constants.%A.47a1de.2)]
|
||||
// CHECK:STDOUT: %I.type.loc12_35.1: type = facet_type <@I, @I(%V.loc12_15.1)> [symbolic = %I.type.loc12_35.1 (constants.%I.type.3fe556.2)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_37.2: <witness> = impl_witness %I.impl_witness_table, @A.as.I.impl(%V.loc12_15.1) [symbolic = %I.impl_witness.loc12_37.2 (constants.%I.impl_witness.25d8bb.1)]
|
||||
// CHECK:STDOUT: %A.loc12_26.1: type = class_type @A, @A(%V.loc12_15.1) [symbolic = %A.loc12_26.1 (constants.%A.47a1de.2)]
|
||||
// CHECK:STDOUT: %I.type.loc12_34.1: type = facet_type <@I, @I(%V.loc12_15.1)> [symbolic = %I.type.loc12_34.1 (constants.%I.type.3fe556.2)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_36.2: <witness> = impl_witness %I.impl_witness_table, @A.as.I.impl(%V.loc12_15.1) [symbolic = %I.impl_witness.loc12_36.2 (constants.%I.impl_witness.25d8bb.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc12_35.1 [symbolic = %require_complete (constants.%require_complete.45eab2.1)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %I.type.loc12_34.1 [symbolic = %require_complete (constants.%require_complete.45eab2.1)]
|
||||
// CHECK:STDOUT: %A.as.I.impl.F.type: type = fn_type @A.as.I.impl.F, @A.as.I.impl(%V.loc12_15.1) [symbolic = %A.as.I.impl.F.type (constants.%A.as.I.impl.F.type.d1ec9e.1)]
|
||||
// CHECK:STDOUT: %A.as.I.impl.F: @A.as.I.impl.%A.as.I.impl.F.type (%A.as.I.impl.F.type.d1ec9e.1) = struct_value () [symbolic = %A.as.I.impl.F (constants.%A.as.I.impl.F.d83bf5.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %A.loc12_27.2 as %I.type.loc12_35.2 {
|
||||
// CHECK:STDOUT: impl: %A.loc12_26.2 as %I.type.loc12_34.2 {
|
||||
// CHECK:STDOUT: %A.as.I.impl.F.decl: @A.as.I.impl.%A.as.I.impl.F.type (%A.as.I.impl.F.type.d1ec9e.1) = fn_decl @A.as.I.impl.F [symbolic = @A.as.I.impl.%A.as.I.impl.F (constants.%A.as.I.impl.F.d83bf5.1)] {
|
||||
// CHECK:STDOUT: %self.param_patt.loc13_12.1: @A.as.I.impl.F.%pattern_type.loc13_12 (%pattern_type.44a178.1) = ref_param_pattern [symbolic = %self.param_patt.loc13_12.2 (constants.%self.param_patt.a903c4.1)]
|
||||
// CHECK:STDOUT: %self.patt.loc13_12.1: @A.as.I.impl.F.%pattern_type.loc13_12 (%pattern_type.44a178.1) = at_binding_pattern self, %self.param_patt.loc13_12.1 [symbolic = %self.patt.loc13_12.2 (constants.%self.patt.4f0789.1)]
|
||||
@@ -194,19 +194,19 @@ fn TestSpecific(a: A({})*) -> {}* {
|
||||
// CHECK:STDOUT: %ptr.loc13_22.2: type = ptr_type %V.ref [symbolic = %ptr.loc13_22.1 (constants.%ptr.e8f8f9.2)]
|
||||
// CHECK:STDOUT: %.loc13_22.2: Core.Form = init_form %ptr.loc13_22.2 [symbolic = %.loc13_22.1 (constants.%.cb6cb9.2)]
|
||||
// CHECK:STDOUT: %self.param: ref @A.as.I.impl.F.%A (%A.47a1de.2) = ref_param call_param0
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @A.as.I.impl.%A.loc12_27.2 [symbolic = %A (constants.%A.47a1de.2)]
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @A.as.I.impl.%A.loc12_26.2 [symbolic = %A (constants.%A.47a1de.2)]
|
||||
// CHECK:STDOUT: %self: ref @A.as.I.impl.F.%A (%A.47a1de.2) = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: %return.param: ref @A.as.I.impl.F.%ptr.loc13_22.1 (%ptr.e8f8f9.2) = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref @A.as.I.impl.F.%ptr.loc13_22.1 (%ptr.e8f8f9.2) = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%A.as.I.impl.F.decl), @A.as.I.impl [concrete]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_37.1: <witness> = impl_witness %I.impl_witness_table, @A.as.I.impl(constants.%V.67d) [symbolic = %I.impl_witness.loc12_37.2 (constants.%I.impl_witness.25d8bb.1)]
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_36.1: <witness> = impl_witness %I.impl_witness_table, @A.as.I.impl(constants.%V.67d) [symbolic = %I.impl_witness.loc12_36.2 (constants.%I.impl_witness.25d8bb.1)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .V = <poisoned>
|
||||
// CHECK:STDOUT: .F = %A.as.I.impl.F.decl
|
||||
// CHECK:STDOUT: extend %I.type.loc12_35.2
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc12_37.1
|
||||
// CHECK:STDOUT: extend %I.type.loc12_34.2
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc12_36.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -265,27 +265,27 @@ fn TestSpecific(a: A({})*) -> {}* {
|
||||
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%W.loc19_17.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.b71f2b.3)]
|
||||
// CHECK:STDOUT: %assoc0: @TestGeneric.%I.assoc_type (%I.assoc_type.b71f2b.3) = assoc_entity element0, @I.WithSelf.%I.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.13b5f8.3)]
|
||||
// CHECK:STDOUT: %.loc21_11.2: require_specific_def_type = require_specific_def @A.as.I.impl(%W.loc19_17.1) [symbolic = %.loc21_11.2 (constants.%.346)]
|
||||
// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %A.loc19_32.1, @I, @I(%W.loc19_17.1) [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %I.facet: @TestGeneric.%I.type.loc21_17.2 (%I.type.3fe556.3) = facet_value %A.loc19_32.1, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet.3c2)]
|
||||
// CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %A.loc19_31.1, @I, @I(%W.loc19_17.1) [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
|
||||
// CHECK:STDOUT: %I.facet: @TestGeneric.%I.type.loc21_17.2 (%I.type.3fe556.3) = facet_value %A.loc19_31.1, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet.3c2)]
|
||||
// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I.WithSelf(%W.loc19_17.1, %I.facet) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.52e)]
|
||||
// CHECK:STDOUT: %.loc21_11.3: type = fn_type_with_self_type %I.WithSelf.F.type, %I.facet [symbolic = %.loc21_11.3 (constants.%.72b)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc21_11.2: @TestGeneric.%.loc21_11.3 (%.72b) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.089)]
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc21_11.2: <specific function> = specific_impl_function %impl.elem0.loc21_11.2, @I.WithSelf.F(%W.loc19_17.1, %I.facet) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.250)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%a.param: @TestGeneric.%ptr.loc19_33.1 (%ptr.5ab)) -> out %return.param: @TestGeneric.%ptr.loc19_40.1 (%ptr.e8f8f9.4) {
|
||||
// CHECK:STDOUT: fn(%a.param: @TestGeneric.%ptr.loc19_32.1 (%ptr.5ab)) -> out %return.param: @TestGeneric.%ptr.loc19_39.1 (%ptr.e8f8f9.4) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: @TestGeneric.%ptr.loc19_33.1 (%ptr.5ab) = name_ref a, %a
|
||||
// CHECK:STDOUT: %a.ref: @TestGeneric.%ptr.loc19_32.1 (%ptr.5ab) = name_ref a, %a
|
||||
// CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic]
|
||||
// CHECK:STDOUT: %W.ref.loc21: type = name_ref W, %W.loc19_17.2 [symbolic = %W.loc19_17.1 (constants.%W)]
|
||||
// CHECK:STDOUT: %I.type.loc21_17.1: type = facet_type <@I, @I(constants.%W)> [symbolic = %I.type.loc21_17.2 (constants.%I.type.3fe556.3)]
|
||||
// CHECK:STDOUT: %.loc21_18: @TestGeneric.%I.assoc_type (%I.assoc_type.b71f2b.3) = specific_constant @I.WithSelf.%assoc0.loc8_23.1, @I.WithSelf(constants.%W, constants.%Self.1916c4.1) [symbolic = %assoc0 (constants.%assoc0.13b5f8.3)]
|
||||
// CHECK:STDOUT: %F.ref: @TestGeneric.%I.assoc_type (%I.assoc_type.b71f2b.3) = name_ref F, %.loc21_18 [symbolic = %assoc0 (constants.%assoc0.13b5f8.3)]
|
||||
// CHECK:STDOUT: %.loc21_11.1: ref @TestGeneric.%A.loc19_32.1 (%A.47a1de.3) = deref %a.ref
|
||||
// CHECK:STDOUT: %.loc21_11.1: ref @TestGeneric.%A.loc19_31.1 (%A.47a1de.3) = deref %a.ref
|
||||
// CHECK:STDOUT: %impl.elem0.loc21_11.1: @TestGeneric.%.loc21_11.3 (%.72b) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.089)]
|
||||
// CHECK:STDOUT: %bound_method.loc21_11: <bound method> = bound_method %.loc21_11.1, %impl.elem0.loc21_11.1
|
||||
// CHECK:STDOUT: %specific_impl_fn.loc21_11.1: <specific function> = specific_impl_function %impl.elem0.loc21_11.1, @I.WithSelf.F(constants.%W, constants.%I.facet.3c2) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.250)]
|
||||
// CHECK:STDOUT: %bound_method.loc21_22: <bound method> = bound_method %.loc21_11.1, %specific_impl_fn.loc21_11.1
|
||||
// CHECK:STDOUT: %I.WithSelf.F.call: init @TestGeneric.%ptr.loc19_40.1 (%ptr.e8f8f9.4) = call %bound_method.loc21_22(%.loc21_11.1)
|
||||
// CHECK:STDOUT: %I.WithSelf.F.call: init @TestGeneric.%ptr.loc19_39.1 (%ptr.e8f8f9.4) = call %bound_method.loc21_22(%.loc21_11.1)
|
||||
// CHECK:STDOUT: return %I.WithSelf.F.call
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !observes:
|
||||
@@ -315,9 +315,9 @@ fn TestSpecific(a: A({})*) -> {}* {
|
||||
// CHECK:STDOUT: specific @A.as.I.impl(constants.%V.67d) {
|
||||
// CHECK:STDOUT: %V.patt.loc12_15.2 => constants.%V.patt.d47
|
||||
// CHECK:STDOUT: %V.loc12_15.1 => constants.%V.67d
|
||||
// CHECK:STDOUT: %A.loc12_27.1 => constants.%A.47a1de.2
|
||||
// CHECK:STDOUT: %I.type.loc12_35.1 => constants.%I.type.3fe556.2
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_37.2 => constants.%I.impl_witness.25d8bb.1
|
||||
// CHECK:STDOUT: %A.loc12_26.1 => constants.%A.47a1de.2
|
||||
// CHECK:STDOUT: %I.type.loc12_34.1 => constants.%I.type.3fe556.2
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_36.2 => constants.%I.impl_witness.25d8bb.1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete.45eab2.1
|
||||
@@ -341,24 +341,24 @@ fn TestSpecific(a: A({})*) -> {}* {
|
||||
// CHECK:STDOUT: specific @TestGeneric(constants.%W) {
|
||||
// CHECK:STDOUT: %W.patt.loc19_17.2 => constants.%W.patt
|
||||
// CHECK:STDOUT: %W.loc19_17.1 => constants.%W
|
||||
// CHECK:STDOUT: %A.loc19_32.1 => constants.%A.47a1de.3
|
||||
// CHECK:STDOUT: %ptr.loc19_33.1 => constants.%ptr.5ab
|
||||
// CHECK:STDOUT: %pattern_type.loc19_27 => constants.%pattern_type.c61
|
||||
// CHECK:STDOUT: %a.param_patt.loc19_27.2 => constants.%a.param_patt.537
|
||||
// CHECK:STDOUT: %a.patt.loc19_27.2 => constants.%a.patt.60b
|
||||
// CHECK:STDOUT: %ptr.loc19_40.1 => constants.%ptr.e8f8f9.4
|
||||
// CHECK:STDOUT: %.loc19_40.1 => constants.%.cb6cb9.4
|
||||
// CHECK:STDOUT: %pattern_type.loc19_40 => constants.%pattern_type.4f4b84.4
|
||||
// CHECK:STDOUT: %return.param_patt.loc19_40.2 => constants.%return.param_patt.27f587.4
|
||||
// CHECK:STDOUT: %return.patt.loc19_36.2 => constants.%return.patt.d67681.3
|
||||
// CHECK:STDOUT: %A.loc19_31.1 => constants.%A.47a1de.3
|
||||
// CHECK:STDOUT: %ptr.loc19_32.1 => constants.%ptr.5ab
|
||||
// CHECK:STDOUT: %pattern_type.loc19_26 => constants.%pattern_type.c61
|
||||
// CHECK:STDOUT: %a.param_patt.loc19_26.2 => constants.%a.param_patt.537
|
||||
// CHECK:STDOUT: %a.patt.loc19_26.2 => constants.%a.patt.60b
|
||||
// CHECK:STDOUT: %ptr.loc19_39.1 => constants.%ptr.e8f8f9.4
|
||||
// CHECK:STDOUT: %.loc19_39.1 => constants.%.cb6cb9.4
|
||||
// CHECK:STDOUT: %pattern_type.loc19_39 => constants.%pattern_type.4f4b84.4
|
||||
// CHECK:STDOUT: %return.param_patt.loc19_39.2 => constants.%return.param_patt.27f587.4
|
||||
// CHECK:STDOUT: %return.patt.loc19_35.2 => constants.%return.patt.d67681.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @A.as.I.impl(constants.%W) {
|
||||
// CHECK:STDOUT: %V.patt.loc12_15.2 => constants.%V.patt.d47
|
||||
// CHECK:STDOUT: %V.loc12_15.1 => constants.%W
|
||||
// CHECK:STDOUT: %A.loc12_27.1 => constants.%A.47a1de.3
|
||||
// CHECK:STDOUT: %I.type.loc12_35.1 => constants.%I.type.3fe556.3
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_37.2 => constants.%I.impl_witness.25d8bb.2
|
||||
// CHECK:STDOUT: %A.loc12_26.1 => constants.%A.47a1de.3
|
||||
// CHECK:STDOUT: %I.type.loc12_34.1 => constants.%I.type.3fe556.3
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_36.2 => constants.%I.impl_witness.25d8bb.2
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete.45eab2.2
|
||||
@@ -369,9 +369,9 @@ fn TestSpecific(a: A({})*) -> {}* {
|
||||
// CHECK:STDOUT: specific @A.as.I.impl(constants.%empty_struct_type) {
|
||||
// CHECK:STDOUT: %V.patt.loc12_15.2 => constants.%V.patt.d47
|
||||
// CHECK:STDOUT: %V.loc12_15.1 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT: %A.loc12_27.1 => constants.%A.940
|
||||
// CHECK:STDOUT: %I.type.loc12_35.1 => constants.%I.type.81d
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_37.2 => constants.%I.impl_witness.e69
|
||||
// CHECK:STDOUT: %A.loc12_26.1 => constants.%A.940
|
||||
// CHECK:STDOUT: %I.type.loc12_34.1 => constants.%I.type.81d
|
||||
// CHECK:STDOUT: %I.impl_witness.loc12_36.2 => constants.%I.impl_witness.e69
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.7da
|
||||
|
||||
+65
-65
@@ -17,23 +17,23 @@
|
||||
// --- interface_z.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
// --- interface_z_with_impl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// Add an extra unused interface to bump `Z`'s id up so that it doesn't
|
||||
// accidentally match the id assigned to the imported copy of `Z`.
|
||||
interface Other(T:! type) {}
|
||||
interface Other(T: type) {}
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
final impl forall [T:! type] T as Z(T) {}
|
||||
final impl forall [T: type] T as Z(T) {}
|
||||
|
||||
// --- type_d.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class D(T:! type) {}
|
||||
class D(T: type) {}
|
||||
|
||||
// ============================================================================
|
||||
// Test files
|
||||
@@ -44,7 +44,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {}
|
||||
|
||||
final impl forall [T:! type] T as Z {}
|
||||
final impl forall [T: type] T as Z {}
|
||||
|
||||
// --- final_impl_with_interface_concrete_self_same_file.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -86,26 +86,26 @@ interface Z {}
|
||||
|
||||
// The root self type is from another file, but the interface is from this file.
|
||||
// This tests the self type being a symbolic type due to the type parameter T.
|
||||
final impl forall [T:! type] D(T) as Z {}
|
||||
final impl forall [T: type] D(T) as Z {}
|
||||
|
||||
// --- fail_multiple_finals_overlap_with_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
final impl forall [T:! type] T as Z(T) {}
|
||||
final impl forall [T: type] T as Z(T) {}
|
||||
|
||||
// The final impl here overlaps with the final impl above, but is not in a
|
||||
// match_first.
|
||||
//
|
||||
// CHECK:STDERR: fail_multiple_finals_overlap_with_interface.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(()) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_multiple_finals_overlap_with_interface.carbon:[[@LINE-8]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(()) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_multiple_finals_overlap_with_interface.carbon:[[@LINE-8]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote]
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl forall [T:! type] T as Z(()) {}
|
||||
final impl forall [T: type] T as Z(()) {}
|
||||
|
||||
class C {}
|
||||
|
||||
@@ -116,8 +116,8 @@ class C {}
|
||||
// CHECK:STDERR: final impl C as Z({}) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_multiple_finals_overlap_with_interface.carbon:[[@LINE-22]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl C as Z({}) {}
|
||||
|
||||
@@ -134,13 +134,13 @@ final impl C as Z(()) {}
|
||||
// a match_first.
|
||||
//
|
||||
// CHECK:STDERR: fail_multiple_finals_overlap_with_self_type.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile]
|
||||
// CHECK:STDERR: final impl forall [T:! type] C as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] C as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_multiple_finals_overlap_with_self_type.carbon:[[@LINE-8]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote]
|
||||
// CHECK:STDERR: final impl C as Z(()) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl forall [T:! type] C as Z(T) {}
|
||||
final impl forall [T: type] C as Z(T) {}
|
||||
|
||||
// --- multiple_finals_with_nonoverlapping_with_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -171,11 +171,11 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
import library "interface_z";
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
// Can provide a specialized final blanket impl for a type defined in the same
|
||||
// file.
|
||||
final impl forall [T:! type] C(T) as Z(T) {}
|
||||
final impl forall [T: type] C(T) as Z(T) {}
|
||||
|
||||
// --- fail_final_impl_with_both_interface_and_self_but_different_files.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -192,8 +192,8 @@ class C {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_impl_with_both_interface_and_self_but_different_files.carbon:[[@LINE-10]]:1: in import [InImport]
|
||||
// CHECK:STDERR: interface_z_with_impl.carbon:9:1: note: imported `final impl` here [FinalImplOverlapsDifferentFileNote]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl C as Z(()) {}
|
||||
|
||||
@@ -212,8 +212,8 @@ class C {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_overlaps_final_from_other_file.carbon:[[@LINE-10]]:1: in import [InImport]
|
||||
// CHECK:STDERR: interface_z_with_impl.carbon:9:1: note: imported `final impl` here [FinalImplOverlapsDifferentFileNote]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl C as Z(C) {}
|
||||
|
||||
@@ -231,8 +231,8 @@ class C {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_overlaps_non_final_from_other_file.carbon:[[@LINE-9]]:1: in import [InImport]
|
||||
// CHECK:STDERR: interface_z_with_impl.carbon:9:1: note: `final impl` declared here would always be used instead [ImplFinalOverlapsNonFinalNote]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl C as Z(C) {}
|
||||
|
||||
@@ -280,15 +280,15 @@ class C {}
|
||||
// the interface.
|
||||
//
|
||||
// CHECK:STDERR: fail_final_different_file_from_self_and_interface_with_generic_self.carbon:[[@LINE+4]]:1: error: `final impl` found in file that does not contain the root self type nor the interface definition [FinalImplInvalidFile]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(C) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(C) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl forall [T:! type] T as Z(C) {}
|
||||
final impl forall [T: type] T as Z(C) {}
|
||||
|
||||
// --- fail_final_overlaps_earlier_non_final_impl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
// CHECK:STDERR: fail_final_overlaps_earlier_non_final_impl.carbon:[[@LINE+3]]:1: error: `impl` will never be used [ImplFinalOverlapsNonFinal]
|
||||
// CHECK:STDERR: impl () as Z(()) {}
|
||||
@@ -296,84 +296,84 @@ interface Z(T:! type) {}
|
||||
impl () as Z(()) {}
|
||||
|
||||
// CHECK:STDERR: fail_final_overlaps_earlier_non_final_impl.carbon:[[@LINE+4]]:1: note: `final impl` declared here would always be used instead [ImplFinalOverlapsNonFinalNote]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl forall [T:! type] T as Z(T) {}
|
||||
final impl forall [T: type] T as Z(T) {}
|
||||
|
||||
// --- fail_final_overlaps_later_non_final_impl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
final impl forall [T:! type] T as Z(T) {}
|
||||
final impl forall [T: type] T as Z(T) {}
|
||||
|
||||
// CHECK:STDERR: fail_final_overlaps_later_non_final_impl.carbon:[[@LINE+7]]:1: error: `impl` will never be used [ImplFinalOverlapsNonFinal]
|
||||
// CHECK:STDERR: impl () as Z(()) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_overlaps_later_non_final_impl.carbon:[[@LINE-5]]:1: note: `final impl` declared here would always be used instead [ImplFinalOverlapsNonFinalNote]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl () as Z(()) {}
|
||||
|
||||
// --- fail_final_overlaps_earlier_final_impl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
class C {}
|
||||
|
||||
final impl C as Z(C) {}
|
||||
|
||||
// CHECK:STDERR: fail_final_overlaps_earlier_final_impl.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_overlaps_earlier_final_impl.carbon:[[@LINE-5]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote]
|
||||
// CHECK:STDERR: final impl C as Z(C) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl forall [T:! type] T as Z(T) {}
|
||||
final impl forall [T: type] T as Z(T) {}
|
||||
|
||||
// --- fail_final_overlaps_later_final_impl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
class C {}
|
||||
|
||||
final impl forall [T:! type] T as Z(T) {}
|
||||
final impl forall [T: type] T as Z(T) {}
|
||||
|
||||
// CHECK:STDERR: fail_final_overlaps_later_final_impl.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile]
|
||||
// CHECK:STDERR: final impl C as Z(C) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_overlaps_later_final_impl.carbon:[[@LINE-5]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl C as Z(C) {}
|
||||
|
||||
// --- fail_non_final_type_structure_matches_non_final_impl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
interface Y {}
|
||||
|
||||
impl forall [T:! Y] T as Z(T) {}
|
||||
impl forall [T: Y] T as Z(T) {}
|
||||
|
||||
class C(T:! type);
|
||||
class C(T: type);
|
||||
|
||||
// No diagnosis here as the type structure is unique.
|
||||
impl forall [T:! type] T as Z(C(T)) {}
|
||||
impl forall [T: type] T as Z(C(T)) {}
|
||||
|
||||
// CHECK:STDERR: fail_non_final_type_structure_matches_non_final_impl.carbon:[[@LINE+7]]:1: error: found non-final `impl` with the same type structure as another non-final `impl` [ImplNonFinalSameTypeStructure]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_non_final_type_structure_matches_non_final_impl.carbon:[[@LINE-10]]:1: note: other `impl` here [ImplNonFinalSameTypeStructureNote]
|
||||
// CHECK:STDERR: impl forall [T:! Y] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: Y] T as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type] T as Z(T) {}
|
||||
impl forall [T: type] T as Z(T) {}
|
||||
|
||||
// --- non_final_type_structure_same_shape_but_different_concrete_types.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -389,9 +389,9 @@ impl D as Z {}
|
||||
// --- partial_overlap_type_structure_of_non_final_impl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
impl forall [T:! type] T as Z(T) {}
|
||||
impl forall [T: type] T as Z(T) {}
|
||||
|
||||
class C {}
|
||||
// Partially overlaps the blanket impl, which is fine.
|
||||
@@ -403,20 +403,20 @@ impl D as Z(D) {}
|
||||
|
||||
// --- fail_final_overlap_where_each_is_more_specific_than_the_other.carbon
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
// This should be diagnosed as overlapping final impls outside a `match_first`.
|
||||
// The first impl is more specific in the interface constraint. The second is
|
||||
// more specific in the self type. They overlap for the query `C(()) as Z(())`
|
||||
// but neither impl is completely more specific than the other.
|
||||
final impl forall [T:! type] C(T) as Z(()) {}
|
||||
final impl forall [T: type] C(T) as Z(()) {}
|
||||
// CHECK:STDERR: fail_final_overlap_where_each_is_more_specific_than_the_other.carbon:[[@LINE+7]]:1: error: `final impl` overlaps with `final impl` from same file outside a `match_first` block [FinalImplOverlapsSameFile]
|
||||
// CHECK:STDERR: final impl forall [T:! type] C(()) as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] C(()) as Z(T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_overlap_where_each_is_more_specific_than_the_other.carbon:[[@LINE-4]]:1: note: other `final impl` here [FinalImplOverlapsSameFileNote]
|
||||
// CHECK:STDERR: final impl forall [T:! type] C(T) as Z(()) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: final impl forall [T: type] C(T) as Z(()) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl forall [T:! type] C(()) as Z(T) {}
|
||||
final impl forall [T: type] C(()) as Z(T) {}
|
||||
+35
-35
@@ -123,7 +123,7 @@ fn J() {
|
||||
|
||||
package PackageHasParam;
|
||||
|
||||
class AnyParam[T:! type](X:! T) {}
|
||||
class AnyParam[T: type](X: T) {}
|
||||
|
||||
interface Y {
|
||||
fn K(unused self) {}
|
||||
@@ -135,7 +135,7 @@ package PackageGenericInterface;
|
||||
|
||||
import PackageHasParam;
|
||||
|
||||
interface GenericInterface(U:! type) {}
|
||||
interface GenericInterface(U: type) {}
|
||||
|
||||
impl PackageHasParam.AnyParam(GenericInterface) as PackageHasParam.Y {
|
||||
fn K(unused self) {}
|
||||
@@ -165,7 +165,7 @@ package PackageGenericClass;
|
||||
|
||||
import PackageHasParam;
|
||||
|
||||
class GenericClass(U:! type) {}
|
||||
class GenericClass(U: type) {}
|
||||
|
||||
impl PackageHasParam.AnyParam(GenericClass) as PackageHasParam.Y {
|
||||
fn K(unused self) {}
|
||||
@@ -201,7 +201,7 @@ interface Extra6 {}
|
||||
interface Extra7 {}
|
||||
interface Extra8 {}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
interface I { fn F(self); }
|
||||
|
||||
impl C((Extra1, Extra2, Extra3, Extra4, Extra5, Extra6, Extra7, Extra8)) as I {
|
||||
@@ -1670,18 +1670,18 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %AnyParam.decl: %AnyParam.type = class_decl @AnyParam [concrete = constants.%AnyParam.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %X.patt.loc4_27.1: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_27.2 (constants.%X.patt)]
|
||||
// CHECK:STDOUT: %X.patt.loc4_26.1: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_26.2 (constants.%X.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc4_17: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_17.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %.loc4_30: type = splice_block %T.ref [symbolic = %T.loc4_17.1 (constants.%T)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc4_27: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_28: type = splice_block %T.ref [symbolic = %T.loc4_17.1 (constants.%T)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc4_26: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_17.2 [symbolic = %T.loc4_17.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %X.loc4_27.2: @AnyParam.%T.loc4_17.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc4_27.1 (constants.%X)]
|
||||
// CHECK:STDOUT: %X.loc4_26.2: @AnyParam.%T.loc4_17.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc4_26.1 (constants.%X)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Y.decl: type = interface_decl @Y [concrete = constants.%Y.type] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
@@ -1715,12 +1715,12 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: !observes:
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @AnyParam(%T.loc4_17.2: type, %X.loc4_27.2: @AnyParam.%T.loc4_17.1 (%T)) {
|
||||
// CHECK:STDOUT: generic class @AnyParam(%T.loc4_17.2: type, %X.loc4_26.2: @AnyParam.%T.loc4_17.1 (%T)) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_17.2: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: %T.loc4_17.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc4_17.1 [symbolic = %pattern_type (constants.%pattern_type.51d)]
|
||||
// CHECK:STDOUT: %X.patt.loc4_27.2: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_27.2 (constants.%X.patt)]
|
||||
// CHECK:STDOUT: %X.loc4_27.1: @AnyParam.%T.loc4_17.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc4_27.1 (constants.%X)]
|
||||
// CHECK:STDOUT: %X.patt.loc4_26.2: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_26.2 (constants.%X.patt)]
|
||||
// CHECK:STDOUT: %X.loc4_26.1: @AnyParam.%T.loc4_17.1 (%T) = symbolic_binding X, 1 [symbolic = %X.loc4_26.1 (constants.%X)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
@@ -1755,8 +1755,8 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc4_17.1 => constants.%T
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
|
||||
// CHECK:STDOUT: %X.patt.loc4_27.2 => constants.%X.patt
|
||||
// CHECK:STDOUT: %X.loc4_27.1 => constants.%X
|
||||
// CHECK:STDOUT: %X.patt.loc4_26.2 => constants.%X.patt
|
||||
// CHECK:STDOUT: %X.loc4_26.1 => constants.%X
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Y.WithSelf(constants.%Self) {
|
||||
@@ -1843,10 +1843,10 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: import PackageHasParam//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.527 = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_27, loaded [symbolic = @AnyParam.%X (constants.%X)]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)]
|
||||
// CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.03c: %Y.assoc_type = import_ref PackageHasParam//default, loc7_21, loaded [concrete = constants.%assoc0.970]
|
||||
// CHECK:STDOUT: %PackageHasParam.K: @Y.WithSelf.%Y.WithSelf.K.type (%Y.WithSelf.K.type.977) = import_ref PackageHasParam//default, K, loaded [symbolic = @Y.WithSelf.%Y.WithSelf.K (constants.%Y.WithSelf.K.d2d)]
|
||||
@@ -1868,9 +1868,9 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.cd1 = interface_decl @GenericInterface [concrete = constants.%GenericInterface.generic] {
|
||||
// CHECK:STDOUT: %U.patt.loc6_29.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_29.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc6_32.1: type = splice_block %.loc6_32.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc6_32.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc6_31.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc6_29.2: type = symbolic_binding U, 0 [symbolic = %U.loc6_29.1 (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -1891,14 +1891,14 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %GenericInterface.type: type = facet_type <@GenericInterface, @GenericInterface(%U.loc6_29.1)> [symbolic = %GenericInterface.type (constants.%GenericInterface.type.48f)]
|
||||
// CHECK:STDOUT: %Self.loc6_38.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.48f) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.19b)]
|
||||
// CHECK:STDOUT: %Self.loc6_37.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.48f) = symbolic_binding Self, 1 [symbolic = %Self.loc6_37.2 (constants.%Self.19b)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc6_38.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.48f) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.19b)]
|
||||
// CHECK:STDOUT: %Self.loc6_37.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.48f) = symbolic_binding Self, 1 [symbolic = %Self.loc6_37.2 (constants.%Self.19b)]
|
||||
// CHECK:STDOUT: %GenericInterface.WithSelf.decl = interface_with_self_decl @GenericInterface [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc6_38.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc6_37.1
|
||||
// CHECK:STDOUT: witness = ()
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !requires:
|
||||
@@ -2139,12 +2139,12 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: import PackageGenericInterface//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.527 = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_27, loaded [symbolic = @AnyParam.%X (constants.%X)]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)]
|
||||
// CHECK:STDOUT: %PackageGenericInterface.GenericInterface: %GenericInterface.type.cd1 = import_ref PackageGenericInterface//default, GenericInterface, loaded [concrete = constants.%GenericInterface.generic]
|
||||
// CHECK:STDOUT: %PackageGenericInterface.import_ref.b00 = import_ref PackageGenericInterface//default, loc6_38, unloaded
|
||||
// CHECK:STDOUT: %PackageGenericInterface.import_ref.b00 = import_ref PackageGenericInterface//default, loc6_37, unloaded
|
||||
// CHECK:STDOUT: %PackageGenericInterface.import_ref.b3bc94.2: type = import_ref PackageGenericInterface//default, loc6_29, loaded [symbolic = @GenericInterface.%U (constants.%U)]
|
||||
// CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.03c: %Y.assoc_type = import_ref PackageHasParam//default, loc7_21, loaded [concrete = constants.%assoc0.970]
|
||||
@@ -2398,10 +2398,10 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: import PackageHasParam//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.527 = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_27, loaded [symbolic = @AnyParam.%X (constants.%X)]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)]
|
||||
// CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.03c: %Y.assoc_type = import_ref PackageHasParam//default, loc7_21, loaded [concrete = constants.%assoc0.970]
|
||||
// CHECK:STDOUT: %PackageHasParam.K: @Y.WithSelf.%Y.WithSelf.K.type (%Y.WithSelf.K.type.977) = import_ref PackageHasParam//default, K, loaded [symbolic = @Y.WithSelf.%Y.WithSelf.K (constants.%Y.WithSelf.K.d2d)]
|
||||
@@ -2423,9 +2423,9 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %GenericClass.decl: %GenericClass.type = class_decl @GenericClass [concrete = constants.%GenericClass.generic] {
|
||||
// CHECK:STDOUT: %U.patt.loc6_21.1: %pattern_type.98f = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_21.2 (constants.%U.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc6_24.1: type = splice_block %.loc6_24.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc6_23.1: type = splice_block %.loc6_23.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc6_24.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc6_23.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %U.loc6_21.2: type = symbolic_binding U, 0 [symbolic = %U.loc6_21.1 (constants.%U)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -2683,12 +2683,12 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: import PackageGenericClass//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.8f2: <witness> = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.527 = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_27, loaded [symbolic = @AnyParam.%X (constants.%X)]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)]
|
||||
// CHECK:STDOUT: %PackageGenericClass.GenericClass: %GenericClass.type = import_ref PackageGenericClass//default, GenericClass, loaded [concrete = constants.%GenericClass.generic]
|
||||
// CHECK:STDOUT: %PackageGenericClass.import_ref.8f2: <witness> = import_ref PackageGenericClass//default, loc6_31, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageGenericClass.import_ref.8f2: <witness> = import_ref PackageGenericClass//default, loc6_30, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %PackageGenericClass.import_ref.772 = import_ref PackageGenericClass//default, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageGenericClass.import_ref.b3b: type = import_ref PackageGenericClass//default, loc6_21, loaded [symbolic = @GenericClass.%U (constants.%U)]
|
||||
// CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type]
|
||||
@@ -2955,9 +2955,9 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc13_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_10.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc13_13.1: type = splice_block %.loc13_13.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc13_12.1: type = splice_block %.loc13_12.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc13_13.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc13_12.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc13_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc13_10.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -3277,7 +3277,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: import HasExtraInterfaces//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.C: %C.type = import_ref HasExtraInterfaces//default, C, loaded [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.import_ref.8f2: <witness> = import_ref HasExtraInterfaces//default, loc13_20, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.import_ref.8f2: <witness> = import_ref HasExtraInterfaces//default, loc13_19, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.import_ref.0f9 = import_ref HasExtraInterfaces//default, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.import_ref.b3b: type = import_ref HasExtraInterfaces//default, loc13_10, loaded [symbolic = @C.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.I: type = import_ref HasExtraInterfaces//default, I, loaded [concrete = constants.%I.type]
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
// The value of .X is an error.
|
||||
// CHECK:STDERR: fail_error_interface_z.carbon:[[@LINE+4]]:35: error: associated constant `.(Z.X)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues]
|
||||
// CHECK:STDERR: final impl forall [T:! type] T as Z where .X = {} and .X = () {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_error_interface_z.carbon:[[@LINE+4]]:34: error: associated constant `.(Z.X)` given two different values `{}` and `()` [AssociatedConstantWithDifferentValues]
|
||||
// CHECK:STDERR: final impl forall [T: type] T as Z where .X = {} and .X = () {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
final impl forall [T:! type] T as Z where .X = {} and .X = () {}
|
||||
final impl forall [T: type] T as Z where .X = {} and .X = () {}
|
||||
|
||||
// --- fail_import_error.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import library "error_interface_z";
|
||||
|
||||
fn F[unused U:! type](T:! Z) {
|
||||
fn F[unused U: type](generic T: Z) {
|
||||
// The value of `.X` is an error. It should not crash though.
|
||||
//
|
||||
// CHECK:STDERR: fail_import_error.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `()` to `T.(Z.X)` [ConversionFailure]
|
||||
|
||||
@@ -14,18 +14,18 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C {}
|
||||
final impl forall [T:! type] T as Z where .X = C {}
|
||||
final impl forall [T: type] T as Z where .X = C {}
|
||||
|
||||
// --- import_final.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import library "interface_z";
|
||||
|
||||
fn F[unused U:! type](T:! Z) {
|
||||
fn F[unused U: type](generic T: Z) {
|
||||
// The value of `.X` can be known to be `C` here when the impl `T as Z(C)` is
|
||||
// final.
|
||||
let unused a: T.X = {} as C;
|
||||
|
||||
+94
-94
@@ -61,12 +61,12 @@ library "[[@TEST_NAME]]";
|
||||
// the specific ids in the query interface and the facet type will continue
|
||||
// to match after substitution.
|
||||
|
||||
class Outer(OuterParam:! type) {
|
||||
class Outer(OuterParam: type) {
|
||||
interface Y {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
|
||||
fn G(unused H:! Y where .T = ()) {}
|
||||
fn G(unused generic H: Y where .T = ()) {}
|
||||
}
|
||||
|
||||
class C;
|
||||
@@ -82,12 +82,12 @@ library "[[@TEST_NAME]]";
|
||||
interface Z1 {}
|
||||
interface Z2 {}
|
||||
|
||||
class Outer(OuterParam:! Z1) {
|
||||
class Outer(OuterParam: Z1) {
|
||||
interface Y {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
|
||||
fn G(unused H:! Y where .T = ()) {}
|
||||
fn G(unused generic H: Y where .T = ()) {}
|
||||
|
||||
class C;
|
||||
impl C as Y where .T = () {}
|
||||
@@ -178,9 +178,9 @@ fn F() {
|
||||
// CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] {
|
||||
// CHECK:STDOUT: %OuterParam.patt.loc49_23.1: %pattern_type.98f = symbolic_binding_pattern OuterParam, 0 [symbolic = %OuterParam.patt.loc49_23.2 (constants.%OuterParam.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc49_26.1: type = splice_block %.loc49_26.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc49_25.1: type = splice_block %.loc49_25.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc49_26.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc49_25.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %OuterParam.loc49_23.2: type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam.loc49_23.1 (constants.%OuterParam)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -262,31 +262,31 @@ fn F() {
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %Y.decl: type = interface_decl @Y [symbolic = @Outer.%Y.type (constants.%Y.type.d63)] {} {}
|
||||
// CHECK:STDOUT: %Outer.G.decl: @Outer.%Outer.G.type (%Outer.G.type.744) = fn_decl @Outer.G [symbolic = @Outer.%Outer.G (constants.%Outer.G.2ce)] {
|
||||
// CHECK:STDOUT: %H.patt.loc54_16.1: @Outer.G.%pattern_type (%pattern_type.a2a) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc54_16.2 (constants.%H.patt.934)]
|
||||
// CHECK:STDOUT: %H.patt.loc54_24.1: @Outer.G.%pattern_type (%pattern_type.a2a) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc54_24.2 (constants.%H.patt.934)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc54_21.1: type = splice_block %.loc54_21.2 [symbolic = %Y_where.type (constants.%Y_where.type.aab)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc54_19: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.d63)]
|
||||
// CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc54_19 [symbolic = %Y.type (constants.%Y.type.d63)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_21.2: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self.frozen.loc54_21.1 (constants.%.Self.frozen.e31)]
|
||||
// CHECK:STDOUT: %.loc54_28.1: type = splice_block %.loc54_28.2 [symbolic = %Y_where.type (constants.%Y_where.type.aab)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc54_26: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.d63)]
|
||||
// CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc54_26 [symbolic = %Y.type (constants.%Y.type.d63)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_28.2: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self.frozen.loc54_28.1 (constants.%.Self.frozen.e31)]
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.d63) = name_ref .Self, %.Self.frozen.loc54_21.2 [symbolic = %.Self.frozen.loc54_21.1 (constants.%.Self.frozen.e31)]
|
||||
// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.d63) = name_ref .Self, %.Self.frozen.loc54_28.2 [symbolic = %.Self.frozen.loc54_28.1 (constants.%.Self.frozen.e31)]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)]
|
||||
// CHECK:STDOUT: %.loc54_27.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)]
|
||||
// CHECK:STDOUT: %.loc54_27.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = specific_constant @T.%assoc0, @Y.WithSelf(constants.%OuterParam, constants.%.Self.frozen.e31) [symbolic = %assoc0 (constants.%assoc0.bbd)]
|
||||
// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = name_ref T, %.loc54_27.2 [symbolic = %assoc0 (constants.%assoc0.bbd)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_27.3: type = impl_witness_access constants.%Y.lookup_impl_witness.69a, element0 [symbolic = %impl.elem0.loc54_27.1 (constants.%impl.elem0.093)]
|
||||
// CHECK:STDOUT: %.loc54_33.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc54_33.2: type = converted %.loc54_33.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %rewrite.loc54_30.1 = requirement_rewrite %impl.elem0.loc54_27.3, %.loc54_33.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_27.4: type = impl_witness_access constants.%Y.lookup_impl_witness.c77, element0 [symbolic = %impl.elem0.loc54_27.2 (constants.%impl.elem0.35b)]
|
||||
// CHECK:STDOUT: %rewrite.loc54_30.2 = requirement_rewrite %impl.elem0.loc54_27.4, %.loc54_33.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc54_21.2: type = where_expr [symbolic = %Y_where.type (constants.%Y_where.type.aab)] {
|
||||
// CHECK:STDOUT: %.loc54_34.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)]
|
||||
// CHECK:STDOUT: %.loc54_34.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = specific_constant @T.%assoc0, @Y.WithSelf(constants.%OuterParam, constants.%.Self.frozen.e31) [symbolic = %assoc0 (constants.%assoc0.bbd)]
|
||||
// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = name_ref T, %.loc54_34.2 [symbolic = %assoc0 (constants.%assoc0.bbd)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_34.3: type = impl_witness_access constants.%Y.lookup_impl_witness.69a, element0 [symbolic = %impl.elem0.loc54_34.1 (constants.%impl.elem0.093)]
|
||||
// CHECK:STDOUT: %.loc54_40.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc54_40.2: type = converted %.loc54_40.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %rewrite.loc54_37.1 = requirement_rewrite %impl.elem0.loc54_34.3, %.loc54_40.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_34.4: type = impl_witness_access constants.%Y.lookup_impl_witness.c77, element0 [symbolic = %impl.elem0.loc54_34.2 (constants.%impl.elem0.35b)]
|
||||
// CHECK:STDOUT: %rewrite.loc54_37.2 = requirement_rewrite %impl.elem0.loc54_34.4, %.loc54_40.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc54_28.2: type = where_expr [symbolic = %Y_where.type (constants.%Y_where.type.aab)] {
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc54_30.2 = requirement_rewrite %impl.elem0.loc54_27.4, %.loc54_33.2 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc54_37.2 = requirement_rewrite %impl.elem0.loc54_34.4, %.loc54_40.2 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %H.loc54_16.2: @Outer.G.%Y_where.type (%Y_where.type.aab) = symbolic_binding H, 1 [symbolic = %H.loc54_16.1 (constants.%H)]
|
||||
// CHECK:STDOUT: %H.loc54_24.2: @Outer.G.%Y_where.type (%Y_where.type.aab) = symbolic_binding H, 1 [symbolic = %H.loc54_24.1 (constants.%H)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
@@ -300,23 +300,23 @@ fn F() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Outer.G(@Outer.%OuterParam.loc49_23.2: type, %H.loc54_16.2: @Outer.G.%Y_where.type (%Y_where.type.aab)) {
|
||||
// CHECK:STDOUT: generic fn @Outer.G(@Outer.%OuterParam.loc49_23.2: type, %H.loc54_24.2: @Outer.G.%Y_where.type (%Y_where.type.aab)) {
|
||||
// CHECK:STDOUT: %OuterParam: type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)]
|
||||
// CHECK:STDOUT: %Y.type: type = facet_type <@Y, @Y(%OuterParam)> [symbolic = %Y.type (constants.%Y.type.d63)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_21.1: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self.frozen.loc54_21.1 (constants.%.Self.frozen.e31)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_28.1: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self.frozen.loc54_28.1 (constants.%.Self.frozen.e31)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Y.type [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc54_21.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)]
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc54_28.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.2b2)]
|
||||
// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.045)]
|
||||
// CHECK:STDOUT: %assoc0: @Outer.G.%Y.assoc_type (%Y.assoc_type.045) = assoc_entity element0, @Y.WithSelf.%T [symbolic = %assoc0 (constants.%assoc0.bbd)]
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.1: <witness> = lookup_impl_witness %.Self.frozen.loc54_21.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc54_27.1 (constants.%Y.lookup_impl_witness.69a)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_27.1: type = impl_witness_access %Y.lookup_impl_witness.loc54_27.1, element0 [symbolic = %impl.elem0.loc54_27.1 (constants.%impl.elem0.093)]
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.1: <witness> = lookup_impl_witness %.Self.frozen.loc54_28.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc54_34.1 (constants.%Y.lookup_impl_witness.69a)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_34.1: type = impl_witness_access %Y.lookup_impl_witness.loc54_34.1, element0 [symbolic = %impl.elem0.loc54_34.1 (constants.%impl.elem0.093)]
|
||||
// CHECK:STDOUT: %.Self: @Outer.G.%Y.type (%Y.type.d63) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.12c)]
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.2: <witness> = lookup_impl_witness %.Self, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc54_27.2 (constants.%Y.lookup_impl_witness.c77)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_27.2: type = impl_witness_access %Y.lookup_impl_witness.loc54_27.2, element0 [symbolic = %impl.elem0.loc54_27.2 (constants.%impl.elem0.35b)]
|
||||
// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc54_27.2 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.aab)]
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.2: <witness> = lookup_impl_witness %.Self, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc54_34.2 (constants.%Y.lookup_impl_witness.c77)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_34.2: type = impl_witness_access %Y.lookup_impl_witness.loc54_34.2, element0 [symbolic = %impl.elem0.loc54_34.2 (constants.%impl.elem0.35b)]
|
||||
// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc54_34.2 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.aab)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Y_where.type [symbolic = %pattern_type (constants.%pattern_type.a2a)]
|
||||
// CHECK:STDOUT: %H.patt.loc54_16.2: @Outer.G.%pattern_type (%pattern_type.a2a) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc54_16.2 (constants.%H.patt.934)]
|
||||
// CHECK:STDOUT: %H.loc54_16.1: @Outer.G.%Y_where.type (%Y_where.type.aab) = symbolic_binding H, 1 [symbolic = %H.loc54_16.1 (constants.%H)]
|
||||
// CHECK:STDOUT: %H.patt.loc54_24.2: @Outer.G.%pattern_type (%pattern_type.a2a) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc54_24.2 (constants.%H.patt.934)]
|
||||
// CHECK:STDOUT: %H.loc54_24.1: @Outer.G.%Y_where.type (%Y_where.type.aab) = symbolic_binding H, 1 [symbolic = %H.loc54_24.1 (constants.%H)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
@@ -380,20 +380,20 @@ fn F() {
|
||||
// CHECK:STDOUT: specific @Outer.G(constants.%OuterParam, constants.%H) {
|
||||
// CHECK:STDOUT: %OuterParam => constants.%OuterParam
|
||||
// CHECK:STDOUT: %Y.type => constants.%Y.type.d63
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_21.1 => constants.%.Self.frozen.e31
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_28.1 => constants.%.Self.frozen.e31
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.2b2
|
||||
// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.045
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.bbd
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.1 => constants.%Y.lookup_impl_witness.69a
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_27.1 => constants.%impl.elem0.093
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.1 => constants.%Y.lookup_impl_witness.69a
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_34.1 => constants.%impl.elem0.093
|
||||
// CHECK:STDOUT: %.Self => constants.%.Self.12c
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.2 => constants.%Y.lookup_impl_witness.c77
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_27.2 => constants.%impl.elem0.35b
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.2 => constants.%Y.lookup_impl_witness.c77
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_34.2 => constants.%impl.elem0.35b
|
||||
// CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.aab
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a2a
|
||||
// CHECK:STDOUT: %H.patt.loc54_16.2 => constants.%H.patt.934
|
||||
// CHECK:STDOUT: %H.loc54_16.1 => constants.%H
|
||||
// CHECK:STDOUT: %H.patt.loc54_24.2 => constants.%H.patt.934
|
||||
// CHECK:STDOUT: %H.loc54_24.1 => constants.%H
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Outer(constants.%empty_tuple.type) {
|
||||
@@ -437,20 +437,20 @@ fn F() {
|
||||
// CHECK:STDOUT: specific @Outer.G(constants.%empty_tuple.type, constants.%facet_value) {
|
||||
// CHECK:STDOUT: %OuterParam => constants.%empty_tuple.type
|
||||
// CHECK:STDOUT: %Y.type => constants.%Y.type.1f7
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_21.1 => constants.%.Self.frozen.fb9
|
||||
// CHECK:STDOUT: %.Self.frozen.loc54_28.1 => constants.%.Self.frozen.fb9
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.002
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.1ff
|
||||
// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.46d
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.a6e
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.1 => constants.%Y.lookup_impl_witness.63b
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_27.1 => constants.%impl.elem0.1cc
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.1 => constants.%Y.lookup_impl_witness.63b
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_34.1 => constants.%impl.elem0.1cc
|
||||
// CHECK:STDOUT: %.Self => constants.%.Self.693
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_27.2 => constants.%Y.lookup_impl_witness.b55
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_27.2 => constants.%impl.elem0.c92
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc54_34.2 => constants.%Y.lookup_impl_witness.b55
|
||||
// CHECK:STDOUT: %impl.elem0.loc54_34.2 => constants.%impl.elem0.c92
|
||||
// CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.7cc
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.42f
|
||||
// CHECK:STDOUT: %H.patt.loc54_16.2 => constants.%H.patt.9c6
|
||||
// CHECK:STDOUT: %H.loc54_16.1 => constants.%facet_value
|
||||
// CHECK:STDOUT: %H.patt.loc54_24.2 => constants.%H.patt.9c6
|
||||
// CHECK:STDOUT: %H.loc54_24.1 => constants.%facet_value
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
@@ -697,31 +697,31 @@ fn F() {
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %Y.decl: type = interface_decl @Y [symbolic = @Outer.%Y.type (constants.%Y.type.6da)] {} {}
|
||||
// CHECK:STDOUT: %Outer.G.decl: @Outer.%Outer.G.type (%Outer.G.type.2cf) = fn_decl @Outer.G [symbolic = @Outer.%Outer.G (constants.%Outer.G.f56)] {
|
||||
// CHECK:STDOUT: %H.patt.loc11_16.1: @Outer.G.%pattern_type (%pattern_type.a5e) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc11_16.2 (constants.%H.patt.7f4)]
|
||||
// CHECK:STDOUT: %H.patt.loc11_24.1: @Outer.G.%pattern_type (%pattern_type.a5e) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc11_24.2 (constants.%H.patt.7f4)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc11_21.1: type = splice_block %.loc11_21.2 [symbolic = %Y_where.type (constants.%Y_where.type.883)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_16: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc11_19: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.6da)]
|
||||
// CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc11_19 [symbolic = %Y.type (constants.%Y.type.6da)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_21.2: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_21.1 (constants.%.Self.frozen.3ed)]
|
||||
// CHECK:STDOUT: %.loc11_28.1: type = splice_block %.loc11_28.2 [symbolic = %Y_where.type (constants.%Y_where.type.883)] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_24: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.197]
|
||||
// CHECK:STDOUT: %.loc11_26: type = specific_constant @Outer.%Y.decl, @Outer(constants.%OuterParam) [symbolic = %Y.type (constants.%Y.type.6da)]
|
||||
// CHECK:STDOUT: %Y.ref: type = name_ref Y, %.loc11_26 [symbolic = %Y.type (constants.%Y.type.6da)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_28.2: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_28.1 (constants.%.Self.frozen.3ed)]
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete]
|
||||
// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.6da) = name_ref .Self, %.Self.frozen.loc11_21.2 [symbolic = %.Self.frozen.loc11_21.1 (constants.%.Self.frozen.3ed)]
|
||||
// CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.6da) = name_ref .Self, %.Self.frozen.loc11_28.2 [symbolic = %.Self.frozen.loc11_28.1 (constants.%.Self.frozen.3ed)]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)]
|
||||
// CHECK:STDOUT: %.loc11_27.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)]
|
||||
// CHECK:STDOUT: %.loc11_27.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = specific_constant @T.%assoc0, @Y.WithSelf(constants.%OuterParam, constants.%.Self.frozen.3ed) [symbolic = %assoc0 (constants.%assoc0.c2d)]
|
||||
// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = name_ref T, %.loc11_27.2 [symbolic = %assoc0 (constants.%assoc0.c2d)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.3: type = impl_witness_access constants.%Y.lookup_impl_witness.9ce, element0 [symbolic = %impl.elem0.loc11_27.1 (constants.%impl.elem0.c34)]
|
||||
// CHECK:STDOUT: %.loc11_33.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc11_33.2: type = converted %.loc11_33.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %rewrite.loc11_30.1 = requirement_rewrite %impl.elem0.loc11_27.3, %.loc11_33.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.4: type = impl_witness_access constants.%Y.lookup_impl_witness.75a, element0 [symbolic = %impl.elem0.loc11_27.2 (constants.%impl.elem0.5e0)]
|
||||
// CHECK:STDOUT: %rewrite.loc11_30.2 = requirement_rewrite %impl.elem0.loc11_27.4, %.loc11_33.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc11_21.2: type = where_expr [symbolic = %Y_where.type (constants.%Y_where.type.883)] {
|
||||
// CHECK:STDOUT: %.loc11_34.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)]
|
||||
// CHECK:STDOUT: %.loc11_34.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = specific_constant @T.%assoc0, @Y.WithSelf(constants.%OuterParam, constants.%.Self.frozen.3ed) [symbolic = %assoc0 (constants.%assoc0.c2d)]
|
||||
// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = name_ref T, %.loc11_34.2 [symbolic = %assoc0 (constants.%assoc0.c2d)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.3: type = impl_witness_access constants.%Y.lookup_impl_witness.9ce, element0 [symbolic = %impl.elem0.loc11_34.1 (constants.%impl.elem0.c34)]
|
||||
// CHECK:STDOUT: %.loc11_40.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc11_40.2: type = converted %.loc11_40.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %rewrite.loc11_37.1 = requirement_rewrite %impl.elem0.loc11_34.3, %.loc11_40.2 [concrete]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.4: type = impl_witness_access constants.%Y.lookup_impl_witness.75a, element0 [symbolic = %impl.elem0.loc11_34.2 (constants.%impl.elem0.5e0)]
|
||||
// CHECK:STDOUT: %rewrite.loc11_37.2 = requirement_rewrite %impl.elem0.loc11_34.4, %.loc11_40.2 [concrete]
|
||||
// CHECK:STDOUT: %.loc11_28.2: type = where_expr [symbolic = %Y_where.type (constants.%Y_where.type.883)] {
|
||||
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc11_30.2 = requirement_rewrite %impl.elem0.loc11_27.4, %.loc11_33.2 [concrete]
|
||||
// CHECK:STDOUT: %rewrite.loc11_37.2 = requirement_rewrite %impl.elem0.loc11_34.4, %.loc11_40.2 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %H.loc11_16.2: @Outer.G.%Y_where.type (%Y_where.type.883) = symbolic_binding H, 1 [symbolic = %H.loc11_16.1 (constants.%H)]
|
||||
// CHECK:STDOUT: %H.loc11_24.2: @Outer.G.%Y_where.type (%Y_where.type.883) = symbolic_binding H, 1 [symbolic = %H.loc11_24.1 (constants.%H)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @Outer.%C (constants.%C.147)] {} {}
|
||||
// CHECK:STDOUT: impl_decl @C.as.Y.impl [concrete] {} {
|
||||
@@ -762,23 +762,23 @@ fn F() {
|
||||
// CHECK:STDOUT: class;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Outer.G(@Outer.%OuterParam.loc6_23.2: %Z1.type, %H.loc11_16.2: @Outer.G.%Y_where.type (%Y_where.type.883)) {
|
||||
// CHECK:STDOUT: generic fn @Outer.G(@Outer.%OuterParam.loc6_23.2: %Z1.type, %H.loc11_24.2: @Outer.G.%Y_where.type (%Y_where.type.883)) {
|
||||
// CHECK:STDOUT: %OuterParam: %Z1.type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)]
|
||||
// CHECK:STDOUT: %Y.type: type = facet_type <@Y, @Y(%OuterParam)> [symbolic = %Y.type (constants.%Y.type.6da)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_21.1: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_21.1 (constants.%.Self.frozen.3ed)]
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_28.1: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self.frozen.loc11_28.1 (constants.%.Self.frozen.3ed)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Y.type [symbolic = %require_complete (constants.%require_complete.ab6)]
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc11_21.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)]
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.loc11_28.1 [symbolic = %.Self.frozen.as_type (constants.%.Self.frozen.as_type.b76)]
|
||||
// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.9e3)]
|
||||
// CHECK:STDOUT: %assoc0: @Outer.G.%Y.assoc_type (%Y.assoc_type.9e3) = assoc_entity element0, @Y.WithSelf.%T [symbolic = %assoc0 (constants.%assoc0.c2d)]
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.1: <witness> = lookup_impl_witness %.Self.frozen.loc11_21.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc11_27.1 (constants.%Y.lookup_impl_witness.9ce)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.1: type = impl_witness_access %Y.lookup_impl_witness.loc11_27.1, element0 [symbolic = %impl.elem0.loc11_27.1 (constants.%impl.elem0.c34)]
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.1: <witness> = lookup_impl_witness %.Self.frozen.loc11_28.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc11_34.1 (constants.%Y.lookup_impl_witness.9ce)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.1: type = impl_witness_access %Y.lookup_impl_witness.loc11_34.1, element0 [symbolic = %impl.elem0.loc11_34.1 (constants.%impl.elem0.c34)]
|
||||
// CHECK:STDOUT: %.Self: @Outer.G.%Y.type (%Y.type.6da) = symbolic_binding .Self [symbolic = %.Self (constants.%.Self.b74)]
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.2: <witness> = lookup_impl_witness %.Self, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc11_27.2 (constants.%Y.lookup_impl_witness.75a)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.2: type = impl_witness_access %Y.lookup_impl_witness.loc11_27.2, element0 [symbolic = %impl.elem0.loc11_27.2 (constants.%impl.elem0.5e0)]
|
||||
// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc11_27.2 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.883)]
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.2: <witness> = lookup_impl_witness %.Self, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness.loc11_34.2 (constants.%Y.lookup_impl_witness.75a)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.2: type = impl_witness_access %Y.lookup_impl_witness.loc11_34.2, element0 [symbolic = %impl.elem0.loc11_34.2 (constants.%impl.elem0.5e0)]
|
||||
// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc11_34.2 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.883)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Y_where.type [symbolic = %pattern_type (constants.%pattern_type.a5e)]
|
||||
// CHECK:STDOUT: %H.patt.loc11_16.2: @Outer.G.%pattern_type (%pattern_type.a5e) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc11_16.2 (constants.%H.patt.7f4)]
|
||||
// CHECK:STDOUT: %H.loc11_16.1: @Outer.G.%Y_where.type (%Y_where.type.883) = symbolic_binding H, 1 [symbolic = %H.loc11_16.1 (constants.%H)]
|
||||
// CHECK:STDOUT: %H.patt.loc11_24.2: @Outer.G.%pattern_type (%pattern_type.a5e) = symbolic_binding_pattern H, 1 [symbolic = %H.patt.loc11_24.2 (constants.%H.patt.7f4)]
|
||||
// CHECK:STDOUT: %H.loc11_24.1: @Outer.G.%Y_where.type (%Y_where.type.883) = symbolic_binding H, 1 [symbolic = %H.loc11_24.1 (constants.%H)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
@@ -878,20 +878,20 @@ fn F() {
|
||||
// CHECK:STDOUT: specific @Outer.G(constants.%OuterParam, constants.%H) {
|
||||
// CHECK:STDOUT: %OuterParam => constants.%OuterParam
|
||||
// CHECK:STDOUT: %Y.type => constants.%Y.type.6da
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_21.1 => constants.%.Self.frozen.3ed
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_28.1 => constants.%.Self.frozen.3ed
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete.ab6
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.b76
|
||||
// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.9e3
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.c2d
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.1 => constants.%Y.lookup_impl_witness.9ce
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.1 => constants.%impl.elem0.c34
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.1 => constants.%Y.lookup_impl_witness.9ce
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.1 => constants.%impl.elem0.c34
|
||||
// CHECK:STDOUT: %.Self => constants.%.Self.b74
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.2 => constants.%Y.lookup_impl_witness.75a
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.2 => constants.%impl.elem0.5e0
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.2 => constants.%Y.lookup_impl_witness.75a
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.2 => constants.%impl.elem0.5e0
|
||||
// CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.883
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a5e
|
||||
// CHECK:STDOUT: %H.patt.loc11_16.2 => constants.%H.patt.7f4
|
||||
// CHECK:STDOUT: %H.loc11_16.1 => constants.%H
|
||||
// CHECK:STDOUT: %H.patt.loc11_24.2 => constants.%H.patt.7f4
|
||||
// CHECK:STDOUT: %H.loc11_24.1 => constants.%H
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%OuterParam) {}
|
||||
@@ -980,20 +980,20 @@ fn F() {
|
||||
// CHECK:STDOUT: specific @Outer.G(constants.%Z1.facet, constants.%facet_value.58a) {
|
||||
// CHECK:STDOUT: %OuterParam => constants.%Z1.facet
|
||||
// CHECK:STDOUT: %Y.type => constants.%Y.type.b7c
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_21.1 => constants.%.Self.frozen.70d
|
||||
// CHECK:STDOUT: %.Self.frozen.loc11_28.1 => constants.%.Self.frozen.70d
|
||||
// CHECK:STDOUT: %require_complete => constants.%complete_type.c4c
|
||||
// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.1e5
|
||||
// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.d53
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.ef6
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.1 => constants.%Y.lookup_impl_witness.fb3
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.1 => constants.%impl.elem0.73b
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.1 => constants.%Y.lookup_impl_witness.fb3
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.1 => constants.%impl.elem0.73b
|
||||
// CHECK:STDOUT: %.Self => constants.%.Self.b06
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_27.2 => constants.%Y.lookup_impl_witness.d61
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_27.2 => constants.%impl.elem0.400
|
||||
// CHECK:STDOUT: %Y.lookup_impl_witness.loc11_34.2 => constants.%Y.lookup_impl_witness.d61
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_34.2 => constants.%impl.elem0.400
|
||||
// CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.8eb
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.692
|
||||
// CHECK:STDOUT: %H.patt.loc11_16.2 => constants.%H.patt.a46
|
||||
// CHECK:STDOUT: %H.loc11_16.1 => constants.%facet_value.58a
|
||||
// CHECK:STDOUT: %H.patt.loc11_24.2 => constants.%H.patt.a46
|
||||
// CHECK:STDOUT: %H.loc11_24.1 => constants.%facet_value.58a
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -16,7 +16,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {}
|
||||
|
||||
class C(B:! bool);
|
||||
class C(B: bool);
|
||||
|
||||
impl C(true) as Z {}
|
||||
impl C(false) as Z {}
|
||||
|
||||
+94
-94
@@ -13,14 +13,14 @@
|
||||
// --- specialized_self_first.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C {}
|
||||
impl C as Z(C) where .X = C {}
|
||||
|
||||
impl forall [T:! type] T as Z(T) where .X = () {}
|
||||
impl forall [T: type] T as Z(T) where .X = () {}
|
||||
|
||||
fn F() {
|
||||
// The specialization of `Z(C)` should match in preference to the blanket impl
|
||||
@@ -32,11 +32,11 @@ fn F() {
|
||||
// --- specialized_self_second.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as Z(T) where .X = () {}
|
||||
impl forall [T: type] T as Z(T) where .X = () {}
|
||||
|
||||
class C {}
|
||||
impl C as Z(C) where .X = C {}
|
||||
@@ -51,14 +51,14 @@ fn F() {
|
||||
// --- specialized_constraint_first.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C {}
|
||||
|
||||
impl C as Z(C) where .X = C {}
|
||||
impl forall [T:! type] C as Z(T) where .X = () {}
|
||||
impl forall [T: type] C as Z(T) where .X = () {}
|
||||
|
||||
fn F() {
|
||||
// The specialization of `Z(C)` should match in preference to the blanket impl
|
||||
@@ -70,13 +70,13 @@ fn F() {
|
||||
// --- specialized_constraint_second.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C {}
|
||||
|
||||
impl forall [T:! type] C as Z(T) where .X = () {}
|
||||
impl forall [T: type] C as Z(T) where .X = () {}
|
||||
impl C as Z(C) where .X = C {}
|
||||
|
||||
fn F() {
|
||||
@@ -89,14 +89,14 @@ fn F() {
|
||||
// --- specialized_self_vs_constraint_self_first.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
impl forall [T:! type] C(()) as Z(T) where .X = C(()) {}
|
||||
impl forall [T:! type] C(T) as Z(C(())) where .X = () {}
|
||||
impl forall [T: type] C(()) as Z(T) where .X = C(()) {}
|
||||
impl forall [T: type] C(T) as Z(C(())) where .X = () {}
|
||||
|
||||
fn F() {
|
||||
// The specialization of `C(())` should match in preference to the blanket impl
|
||||
@@ -108,14 +108,14 @@ fn F() {
|
||||
// --- specialized_self_vs_constraint_self_second.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
impl forall [T:! type] C(T) as Z(C(())) where .X = () {}
|
||||
impl forall [T:! type] C(()) as Z(T) where .X = C(()) {}
|
||||
impl forall [T: type] C(T) as Z(C(())) where .X = () {}
|
||||
impl forall [T: type] C(()) as Z(T) where .X = C(()) {}
|
||||
|
||||
fn F() {
|
||||
// The specialization of `Z(C)` should match in preference to the blanket impl
|
||||
@@ -127,16 +127,16 @@ fn F() {
|
||||
// --- generic_class_with_fully_specified_impl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as Z(T) where .X = {.a: ()} {}
|
||||
impl forall [T: type] T as Z(T) where .X = {.a: ()} {}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
impl C(()) as Z(()) where .X = C(()) {}
|
||||
|
||||
impl forall [T:! type] C(T) as Z(T) where .X = {.b: ()} {}
|
||||
impl forall [T: type] C(T) as Z(T) where .X = {.b: ()} {}
|
||||
|
||||
fn F() {
|
||||
// The specialization of `Z(C)` should match in preference to the blanket
|
||||
@@ -148,15 +148,15 @@ fn F() {
|
||||
// --- generic_class_with_blanket_impl_first.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
impl forall [T:! type] C(T) as Z(T) where .X = C(()) {}
|
||||
impl forall [T: type] C(T) as Z(T) where .X = C(()) {}
|
||||
|
||||
impl forall [T:! type] T as Z(T) where .X = () {}
|
||||
impl forall [T: type] T as Z(T) where .X = () {}
|
||||
|
||||
fn F() {
|
||||
// The specialization of `Z(C)` should match in preference to the blanket
|
||||
@@ -168,15 +168,15 @@ fn F() {
|
||||
// --- generic_class_with_blanket_impl_second.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as Z(T) where .X = () {}
|
||||
impl forall [T: type] T as Z(T) where .X = () {}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
impl forall [T:! type] C(T) as Z(T) where .X = C(()) {}
|
||||
impl forall [T: type] C(T) as Z(T) where .X = C(()) {}
|
||||
|
||||
fn F() {
|
||||
// The specialization of `Z(C)` should match in preference to the blanket
|
||||
@@ -189,26 +189,26 @@ fn F() {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class D(T:! type) {}
|
||||
impl forall [T:! type] D(T) as Z where .X = D(()) {}
|
||||
class D(T: type) {}
|
||||
impl forall [T: type] D(T) as Z where .X = D(()) {}
|
||||
|
||||
class E {}
|
||||
impl E as Z where .X = () {}
|
||||
|
||||
class C(T:! Z, U:! Z) {}
|
||||
class C(T: Z, U: Z) {}
|
||||
|
||||
// This places a FacetValue of type FacetType(Z) at the position of `D` in the
|
||||
// self type, because the class C requires a facet value satisfying Z. It tests
|
||||
// that we correctly determine that this FacetType is not symbolic, and look at
|
||||
// the parametes of D for symbolic references.
|
||||
impl forall [T:! Z] C(T, D(E)) as Z where .X = () {}
|
||||
impl forall [T:! Z] C(D(T), T) as Z where .X = () {}
|
||||
impl forall [T: Z] C(T, D(E)) as Z where .X = () {}
|
||||
impl forall [T: Z] C(D(T), T) as Z where .X = () {}
|
||||
// This is the best match, `T` is in the last position compared to the others.
|
||||
impl forall [T:! Z] C(D(E), T) as Z where .X = C(E, E) {}
|
||||
impl forall [T:! Z] C(T, T) as Z where .X = () {}
|
||||
impl forall [T: Z] C(D(E), T) as Z where .X = C(E, E) {}
|
||||
impl forall [T: Z] C(T, T) as Z where .X = () {}
|
||||
|
||||
fn F() {
|
||||
let unused a: C(D(E), D(E)).(Z.X) = {} as C(E, E);
|
||||
@@ -217,22 +217,22 @@ fn F() {
|
||||
// --- fail_specialized_class_with_symbolic_facet_value_param.carbon
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as Z where .X = T {}
|
||||
impl forall [T: type] T as Z where .X = T {}
|
||||
|
||||
interface Y {}
|
||||
class C(T:! Y) {}
|
||||
class C(T: Y) {}
|
||||
|
||||
class D {}
|
||||
impl D as Y {}
|
||||
|
||||
// D can be either a concrete or symbolic FacetValue, depending on what the
|
||||
// caller has.
|
||||
impl forall [D:! Y] C(D) as Z where .X = () {}
|
||||
impl forall [D: Y] C(D) as Z where .X = () {}
|
||||
|
||||
fn F[D:! Y](unused d: D) {
|
||||
fn F[D: Y](unused d: D) {
|
||||
// The FacetValue deduced for the param of `C` will be a symbolic FacetValue
|
||||
// because we are in a generic where `D` is an unknown type, which will cause
|
||||
// the query and impl self type to be C(FacetValue) for a symbolic FacetValue.
|
||||
@@ -251,13 +251,13 @@ fn F[D:! Y](unused d: D) {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C {}
|
||||
impl C* as Z where .X = C {}
|
||||
|
||||
impl forall [T:! type] T* as Z where .X = () {}
|
||||
impl forall [T: type] T* as Z where .X = () {}
|
||||
|
||||
fn F() {
|
||||
// The specialization of `Z(C)` should match in preference to the blanket impl
|
||||
@@ -270,10 +270,10 @@ fn F() {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
impl forall [T:! type] T* as Z where .X = () {}
|
||||
impl forall [T: type] T* as Z where .X = () {}
|
||||
|
||||
class C {}
|
||||
impl C* as Z where .X = C {}
|
||||
@@ -289,17 +289,17 @@ fn F() {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
// This impl makes a cycle, but it's not considered at all for `C(())` since
|
||||
// there is another impl with a better type structure, so no diagnostic is
|
||||
// emitted.
|
||||
impl forall [T:! Z] T as Z where .X = () {}
|
||||
impl forall [T: Z] T as Z where .X = () {}
|
||||
// Also a cycle, and also a worse match for `C(())`.
|
||||
impl forall [T:! Z] C(T) as Z where .X = () {}
|
||||
impl forall [T: Z] C(T) as Z where .X = () {}
|
||||
|
||||
impl C(()) as Z where .X = C(()) {}
|
||||
|
||||
@@ -310,17 +310,17 @@ fn F() {
|
||||
// --- final_specialization_before_generic_use_of_type_constant.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C {}
|
||||
|
||||
impl forall [T:! type, U:! type] T as Z(U) where .X = () {}
|
||||
impl forall [T: type, U: type] T as Z(U) where .X = () {}
|
||||
|
||||
final impl forall [T:! type] T as Z(C) where .X = C {}
|
||||
final impl forall [T: type] T as Z(C) where .X = C {}
|
||||
|
||||
fn F[unused U:! type](T:! Z(C)) {
|
||||
fn F[unused U: type](generic T: Z(C)) {
|
||||
// The value of `.X` can be known to be `C` here when the impl `T as Z(C)` is
|
||||
// final.
|
||||
let unused a: T.X = {} as C;
|
||||
@@ -329,15 +329,15 @@ fn F[unused U:! type](T:! Z(C)) {
|
||||
// --- fail_specialization_written_after_generic_use_of_type_constant.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C {}
|
||||
|
||||
impl forall [T:! type, U:! type] T as Z(U) where .X = () {}
|
||||
impl forall [T: type, U: type] T as Z(U) where .X = () {}
|
||||
|
||||
fn F[unused U:! type](T:! Z(C)) {
|
||||
fn F[unused U: type](generic T: Z(C)) {
|
||||
// The value of `.X` is symbolic, it can't be assigned a value of type `C`.
|
||||
// CHECK:STDERR: fail_specialization_written_after_generic_use_of_type_constant.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `C` to `T.(Z(C).X)` [ConversionFailure]
|
||||
// CHECK:STDERR: let unused a: T.X = {} as C;
|
||||
@@ -349,28 +349,28 @@ fn F[unused U:! type](T:! Z(C)) {
|
||||
let unused a: T.X = {} as C;
|
||||
}
|
||||
|
||||
final impl forall [T:! type] T as Z(C) where .X = C {}
|
||||
final impl forall [T: type] T as Z(C) where .X = C {}
|
||||
|
||||
// --- specialization_written_after_generic_use.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let V:! type;
|
||||
let V: type;
|
||||
fn ZZ() -> V*;
|
||||
}
|
||||
|
||||
var t: ();
|
||||
|
||||
interface Y {}
|
||||
impl forall [T:! Y] T as Z where .V = () {
|
||||
impl forall [T: Y] T as Z where .V = () {
|
||||
fn ZZ() -> ()* { return &t; }
|
||||
}
|
||||
|
||||
fn H(W:! Z, X: W.(Z.V)*) -> W.(Z.V)* {
|
||||
fn H(generic W: Z, X: W.(Z.V)*) -> W.(Z.V)* {
|
||||
return X;
|
||||
}
|
||||
|
||||
fn G(U:! Y) -> U.(Z.V)* {
|
||||
fn G(generic U: Y) -> U.(Z.V)* {
|
||||
return H(U, U.(Z.ZZ)());
|
||||
}
|
||||
|
||||
@@ -391,23 +391,23 @@ fn F() {
|
||||
// --- specialization_written_after_generic_use_with_generic_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let V:! type;
|
||||
interface Z(T: type) {
|
||||
let V: type;
|
||||
fn ZZ() -> V*;
|
||||
}
|
||||
|
||||
var t: ();
|
||||
|
||||
interface Y {}
|
||||
impl forall [T:! Y] T as Z(T) where .V = () {
|
||||
impl forall [T: Y] T as Z(T) where .V = () {
|
||||
fn ZZ() -> ()* { return &t; }
|
||||
}
|
||||
|
||||
fn H(U:! Y, W:! Y & Z(U), X: W.(Z(U).V)*) -> W.(Z(U).V)* {
|
||||
fn H(generic U: Y, generic W: Y & Z(U), X: W.(Z(U).V)*) -> W.(Z(U).V)* {
|
||||
return X;
|
||||
}
|
||||
|
||||
fn G(U:! Y) -> U.(Z(U).V)* {
|
||||
fn G(generic U: Y) -> U.(Z(U).V)* {
|
||||
return H(U, U, U.(Z(U).ZZ)());
|
||||
}
|
||||
|
||||
@@ -428,24 +428,24 @@ fn F() {
|
||||
// --- type_structure_first_difference.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
fn MakeX() -> X;
|
||||
}
|
||||
|
||||
class C {}
|
||||
|
||||
// Type structure: "?(?)"
|
||||
impl forall [T:! type] T as Z(T) where .X = {.less_good: ()} {
|
||||
impl forall [T: type] T as Z(T) where .X = {.less_good: ()} {
|
||||
fn MakeX() -> {.less_good: ()} { return {.less_good = ()}; }
|
||||
}
|
||||
|
||||
// Type structure: "?(c)". Should outrank the previous impl.
|
||||
impl forall [T:! type] T as Z(C) where .X = () {
|
||||
impl forall [T: type] T as Z(C) where .X = () {
|
||||
fn MakeX() -> () { return (); }
|
||||
}
|
||||
|
||||
fn F(T:! Z(C)) -> T.(Z(C).X) {
|
||||
fn F(generic T: Z(C)) -> T.(Z(C).X) {
|
||||
return T.MakeX();
|
||||
}
|
||||
|
||||
@@ -457,13 +457,13 @@ fn G() {
|
||||
// --- extend_impl_as_specialization.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
impl forall [T:! type, S:! type] T as Z(S) where .X = {} {}
|
||||
impl forall [T: type, S: type] T as Z(S) where .X = {} {}
|
||||
|
||||
class C(S:! type) {
|
||||
class C(S: type) {
|
||||
extend impl as Z(S) where .X = () {}
|
||||
fn CC(a: Self.(Z(S).X)*) -> Self.(Z(S).X)* { return a; }
|
||||
}
|
||||
@@ -477,13 +477,13 @@ fn F() {
|
||||
// --- final_impl_as_specialization.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
impl forall [T:! type, S:! type] T as Z(S) where .X = {} {}
|
||||
impl forall [T: type, S: type] T as Z(S) where .X = {} {}
|
||||
|
||||
class C(S:! type) {
|
||||
class C(S: type) {
|
||||
final impl as Z(S) where .X = () {}
|
||||
fn CC() -> Self.(Z(S).X) { return (); }
|
||||
}
|
||||
@@ -495,13 +495,13 @@ fn F() {
|
||||
// --- final_extend_impl_as_specialization.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
impl forall [T:! type, S:! type] T as Z(S) where .X = {} {}
|
||||
impl forall [T: type, S: type] T as Z(S) where .X = {} {}
|
||||
|
||||
class C(S:! type) {
|
||||
class C(S: type) {
|
||||
extend final impl as Z(S) where .X = () {}
|
||||
fn CC() -> Self.(Z(S).X) { return (); }
|
||||
}
|
||||
|
||||
@@ -14,18 +14,18 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
fn F(self) -> T;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I where .T = () {
|
||||
impl forall [U: type] U as I where .T = () {
|
||||
fn F(unused self) -> () { return (); }
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_final_poisoned_concrete_query_in_specific.carbon:[[@LINE+3]]:25: error: found `impl` that would change the result of an earlier use of `C* as I` [PoisonedImplLookupConcreteResult]
|
||||
// CHECK:STDERR: fn H[W:! type](v: W) -> W.(I.T) {
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
fn H[W:! type](v: W) -> W.(I.T) {
|
||||
// CHECK:STDERR: fail_final_poisoned_concrete_query_in_specific.carbon:[[@LINE+3]]:24: error: found `impl` that would change the result of an earlier use of `C* as I` [PoisonedImplLookupConcreteResult]
|
||||
// CHECK:STDERR: fn H[W: type](v: W) -> W.(I.T) {
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
fn H[W: type](v: W) -> W.(I.T) {
|
||||
return v.(I.F)();
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ fn G(p: C*) -> () {
|
||||
// CHECK:STDERR: impl C* as I where .T = C {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_poisoned_concrete_query_in_specific.carbon:[[@LINE-21]]:1: note: the use had selected the `impl` here [PoisonedImplLookupConcreteResultNotePreviousImpl]
|
||||
// CHECK:STDERR: impl forall [U:! type] U as I where .T = () {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [U: type] U as I where .T = () {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl C* as I where .T = C {
|
||||
fn F(self) -> C { return *self; }
|
||||
@@ -51,14 +51,14 @@ impl C* as I where .T = C {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I where .T = () {}
|
||||
impl forall [U: type] U as I where .T = () {}
|
||||
|
||||
class C {}
|
||||
|
||||
fn H[W:! type](unused v: W) {
|
||||
fn H[W: type](unused v: W) {
|
||||
// This concrete impl lookup query poisons any further specializations.
|
||||
// CHECK:STDERR: fail_final_poisoned_concrete_query_in_generic.carbon:[[@LINE+3]]:17: error: found `impl` that would change the result of an earlier use of `C as I` [PoisonedImplLookupConcreteResult]
|
||||
// CHECK:STDERR: let unused a: C.(I.T) = ();
|
||||
@@ -70,8 +70,8 @@ fn H[W:! type](unused v: W) {
|
||||
// CHECK:STDERR: impl C as I where .T = C {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_poisoned_concrete_query_in_generic.carbon:[[@LINE-15]]:1: note: the use had selected the `impl` here [PoisonedImplLookupConcreteResultNotePreviousImpl]
|
||||
// CHECK:STDERR: impl forall [U:! type] U as I where .T = () {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [U: type] U as I where .T = () {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl C as I where .T = C {}
|
||||
|
||||
@@ -79,13 +79,13 @@ impl C as I where .T = C {}
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
fn F(self) -> T;
|
||||
}
|
||||
|
||||
class C(U:! type) {}
|
||||
class C(U: type) {}
|
||||
|
||||
impl forall [U:! type] C(U) as I where .T = () {
|
||||
impl forall [U: type] C(U) as I where .T = () {
|
||||
fn F(unused self) -> () { return (); }
|
||||
}
|
||||
|
||||
@@ -101,8 +101,8 @@ fn G(c: C(())) -> () {
|
||||
// CHECK:STDERR: impl C(()) as I where .T = {} {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_poisoned_concrete_query_nested_type_in_self.carbon:[[@LINE-15]]:1: note: the use had selected the `impl` here [PoisonedImplLookupConcreteResultNotePreviousImpl]
|
||||
// CHECK:STDERR: impl forall [U:! type] C(U) as I where .T = () {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [U: type] C(U) as I where .T = () {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl C(()) as I where .T = {} {
|
||||
fn F(unused self) -> {} { return {}; }
|
||||
@@ -111,12 +111,12 @@ impl C(()) as I where .T = {} {
|
||||
// --- fail_final_poisoned_concrete_query_nested_type_in_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(U:! type) {
|
||||
let T:! type;
|
||||
interface I(U: type) {
|
||||
let T: type;
|
||||
fn F(self) -> T;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I(U) where .T = () {
|
||||
impl forall [U: type] U as I(U) where .T = () {
|
||||
fn F(unused self) -> () { return (); }
|
||||
}
|
||||
|
||||
@@ -134,8 +134,8 @@ fn G(c: C) -> () {
|
||||
// CHECK:STDERR: impl C as I(C) where .T = {} {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_final_poisoned_concrete_query_nested_type_in_interface.carbon:[[@LINE-17]]:1: note: the use had selected the `impl` here [PoisonedImplLookupConcreteResultNotePreviousImpl]
|
||||
// CHECK:STDERR: impl forall [U:! type] U as I(U) where .T = () {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [U: type] U as I(U) where .T = () {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl C as I(C) where .T = {} {
|
||||
fn F(unused self) -> {} { return {}; }
|
||||
@@ -145,27 +145,27 @@ impl C as I(C) where .T = {} {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
fn F(self) -> T;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I where .T = () {
|
||||
impl forall [U: type] U as I where .T = () {
|
||||
fn F(unused self) -> () { return (); }
|
||||
}
|
||||
|
||||
fn H[W:! type](v: W) -> W.(I.T) {
|
||||
fn H[W: type](v: W) -> W.(I.T) {
|
||||
return v.(I.F)();
|
||||
}
|
||||
|
||||
// This function could return a concrete `X` if it saw the `final` impl below.
|
||||
fn G[X:! type](p: X*) -> (X*).(I.T) {
|
||||
fn G[X: type](p: X*) -> (X*).(I.T) {
|
||||
return H(p);
|
||||
}
|
||||
|
||||
// TODO: This should be diagnosed as poisoned, as H() uses an associated
|
||||
// constant from the `impl` which was treated as a symbolic, but this would
|
||||
// change it to be a concrete type.
|
||||
final impl forall [V:! Core.Copy] V* as I where .T = V {
|
||||
final impl forall [V: Core.Copy] V* as I where .T = V {
|
||||
fn F(self) -> V { return *self; }
|
||||
}
|
||||
|
||||
@@ -180,8 +180,8 @@ fn F() {
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
musteval fn G() -> auto {
|
||||
class C(T:! type) {}
|
||||
impl forall [T:! type] C(T) as Z {}
|
||||
class C(T: type) {}
|
||||
impl forall [T: type] C(T) as Z {}
|
||||
C(D) as Z;
|
||||
return C(D);
|
||||
}
|
||||
|
||||
+434
-434
File diff suppressed because it is too large.
Load diff
+49
-49
@@ -16,8 +16,8 @@
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(T:! type) { fn F(self); }
|
||||
class C(T:! type) {}
|
||||
interface I(T: type) { fn F(self); }
|
||||
class C(T: type) {}
|
||||
|
||||
class X {}
|
||||
|
||||
@@ -93,18 +93,18 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc4_17.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc5_10.1: %pattern_type.98f = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_10.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc5_13.1: type = splice_block %.loc5_13.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.loc5_12.1: type = splice_block %.loc5_12.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc5_13.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %.loc5_12.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T.loc5_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_10.1 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -117,31 +117,31 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_14.1)> [symbolic = %I.type (constants.%I.type.3fe)]
|
||||
// CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.loc4_22.2: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.loc4_22.1: @I.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self.loc4_22.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !with Self:
|
||||
// CHECK:STDOUT: %I.WithSelf.F.decl: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F)] {
|
||||
// CHECK:STDOUT: %self.param_patt.loc4_30.1: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = value_param_pattern [symbolic = %self.param_patt.loc4_30.2 (constants.%self.param_patt)]
|
||||
// CHECK:STDOUT: %self.patt.loc4_30.1: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = at_binding_pattern self, %self.param_patt.loc4_30.1 [symbolic = %self.patt.loc4_30.2 (constants.%self.patt)]
|
||||
// CHECK:STDOUT: %self.param_patt.loc4_29.1: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = value_param_pattern [symbolic = %self.param_patt.loc4_29.2 (constants.%self.param_patt)]
|
||||
// CHECK:STDOUT: %self.patt.loc4_29.1: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = at_binding_pattern self, %self.param_patt.loc4_29.1 [symbolic = %self.patt.loc4_29.2 (constants.%self.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc4_30.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc4_30.1: type = splice_block %.loc4_30.3 [symbolic = %Self.as_type.loc4_30.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc4_30.2: @I.WithSelf.F.%I.type (%I.type.3fe) = specific_constant @I.%Self.loc4_23.1, @I(constants.%T) [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.ref: @I.WithSelf.F.%I.type (%I.type.3fe) = name_ref Self, %.loc4_30.2 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_30.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_30.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc4_30.3: type = converted %Self.ref, %Self.as_type.loc4_30.2 [symbolic = %Self.as_type.loc4_30.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.as_type.loc4_29.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc4_29.1: type = splice_block %.loc4_29.3 [symbolic = %Self.as_type.loc4_29.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc4_29.2: @I.WithSelf.F.%I.type (%I.type.3fe) = specific_constant @I.%Self.loc4_22.1, @I(constants.%T) [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.ref: @I.WithSelf.F.%I.type (%I.type.3fe) = name_ref Self, %.loc4_29.2 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_29.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_29.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc4_29.3: type = converted %Self.ref, %Self.as_type.loc4_29.2 [symbolic = %Self.as_type.loc4_29.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc4_30.1 (%Self.as_type) = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.as_type.loc4_29.1 (%Self.as_type) = wrapper_binding self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0.loc4_35.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)]
|
||||
// CHECK:STDOUT: %assoc0.loc4_34.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc4_34.2 (constants.%assoc0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_23.1
|
||||
// CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc4_35.1
|
||||
// CHECK:STDOUT: .Self = %Self.loc4_22.1
|
||||
// CHECK:STDOUT: .F = @I.WithSelf.%assoc0.loc4_34.1
|
||||
// CHECK:STDOUT: witness = (@I.WithSelf.%I.WithSelf.F.decl)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !requires:
|
||||
@@ -173,16 +173,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT: .Self = constants.%X
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_14.2: type, @I.%Self.loc4_23.1: @I.%I.type (%I.type.3fe)) {
|
||||
// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_14.2: type, @I.%Self.loc4_22.1: @I.%I.type (%I.type.3fe)) {
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.3fe)]
|
||||
// CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.3fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_30.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_30.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_30.1 [symbolic = %pattern_type (constants.%pattern_type.b82)]
|
||||
// CHECK:STDOUT: %self.param_patt.loc4_30.2: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = value_param_pattern [symbolic = %self.param_patt.loc4_30.2 (constants.%self.param_patt)]
|
||||
// CHECK:STDOUT: %self.patt.loc4_30.2: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = at_binding_pattern self, %self.param_patt.loc4_30.2 [symbolic = %self.patt.loc4_30.2 (constants.%self.patt)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_29.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_29.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc4_29.1 [symbolic = %pattern_type (constants.%pattern_type.b82)]
|
||||
// CHECK:STDOUT: %self.param_patt.loc4_29.2: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = value_param_pattern [symbolic = %self.param_patt.loc4_29.2 (constants.%self.param_patt)]
|
||||
// CHECK:STDOUT: %self.patt.loc4_29.2: @I.WithSelf.F.%pattern_type (%pattern_type.b82) = at_binding_pattern self, %self.param_patt.loc4_29.2 [symbolic = %self.patt.loc4_29.2 (constants.%self.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc4_30.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.as_type.loc4_29.1 (%Self.as_type));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @I(constants.%T) {
|
||||
@@ -196,10 +196,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT: %T => constants.%T
|
||||
// CHECK:STDOUT: %I.type => constants.%I.type.3fe
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_30.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_29.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.b82
|
||||
// CHECK:STDOUT: %self.param_patt.loc4_30.2 => constants.%self.param_patt
|
||||
// CHECK:STDOUT: %self.patt.loc4_30.2 => constants.%self.patt
|
||||
// CHECK:STDOUT: %self.param_patt.loc4_29.2 => constants.%self.param_patt
|
||||
// CHECK:STDOUT: %self.patt.loc4_29.2 => constants.%self.patt
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%T) {
|
||||
@@ -250,12 +250,12 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f2: <witness> = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.9c8 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5f6 = import_ref Main//types, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5f6 = import_ref Main//types, loc4_34, unloaded
|
||||
// CHECK:STDOUT: %Main.F: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, F, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)]
|
||||
// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_34, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.a67)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_23, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_22, loaded [symbolic = @I.%Self (constants.%Self.a67)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_22, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -456,16 +456,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT: %Main.InInterfaceArgs: type = import_ref Main//impl_in_interface_args, InInterfaceArgs, loaded [concrete = constants.%InInterfaceArgs]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.9c8 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.c60: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = import_ref Main//types, loc4_35, loaded [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.341)]
|
||||
// CHECK:STDOUT: %Main.import_ref.c60: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = import_ref Main//types, loc4_34, loaded [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.341)]
|
||||
// CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.620: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, loc4_35, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)]
|
||||
// CHECK:STDOUT: %Main.import_ref.620: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, loc4_34, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.a67)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_23, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_22, loaded [symbolic = @I.%Self (constants.%Self.a67)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_22, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//impl_in_interface_args, loc5_24, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.9ad = import_ref Main//impl_in_interface_args, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_34, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.743: <witness> = import_ref Main//impl_in_interface_args, loc7_30, loaded [concrete = constants.%I.impl_witness]
|
||||
// CHECK:STDOUT: %Main.import_ref.57b: type = import_ref Main//impl_in_interface_args, loc7_6, loaded [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %Main.import_ref.555: type = import_ref Main//impl_in_interface_args, loc7_28, loaded [concrete = constants.%I.type.ec4]
|
||||
@@ -653,15 +653,15 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT: %Main.I: %I.type.335 = import_ref Main//types, I, loaded [concrete = constants.%I.generic]
|
||||
// CHECK:STDOUT: %Main.C: %C.type = import_ref Main//types, C, loaded [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//types, loc5_20, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//types, loc5_19, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.189 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//types, loc5_10, loaded [symbolic = @C.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.5f6 = import_ref Main//types, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5f6 = import_ref Main//types, loc4_34, unloaded
|
||||
// CHECK:STDOUT: %Main.F: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, F, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)]
|
||||
// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_34, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.a67)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_23, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_22, loaded [symbolic = @I.%Self (constants.%Self.a67)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_22, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.9c8 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
@@ -893,21 +893,21 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT: %Main.C: %C.type = import_ref Main//types, C, loaded [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %Main.InClassArgs: type = import_ref Main//impl_in_class_args, InClassArgs, loaded [concrete = constants.%InClassArgs]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//types, loc5_20, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.1: <witness> = import_ref Main//types, loc5_19, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.189 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//types, loc5_10, loaded [symbolic = @C.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//impl_in_class_args, loc5_20, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.195 = import_ref Main//impl_in_class_args, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.c60: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = import_ref Main//types, loc4_35, loaded [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.341)]
|
||||
// CHECK:STDOUT: %Main.import_ref.c60: @I.WithSelf.%I.assoc_type (%I.assoc_type.b71) = import_ref Main//types, loc4_34, loaded [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.341)]
|
||||
// CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.620: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, loc4_35, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)]
|
||||
// CHECK:STDOUT: %Main.import_ref.620: @I.WithSelf.%I.WithSelf.F.type (%I.WithSelf.F.type.0fc) = import_ref Main//types, loc4_34, loaded [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.a92)]
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.a67)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_23, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.d08dda.2: @I.%I.type (%I.type.3fe) = import_ref Main//types, loc4_22, loaded [symbolic = @I.%Self (constants.%Self.a67)]
|
||||
// CHECK:STDOUT: %Main.import_ref.a43 = import_ref Main//types, loc4_22, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//types, loc4_14, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.3: <witness> = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.9c8 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.35c = import_ref Main//types, loc4_34, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.d12: <witness> = import_ref Main//impl_in_class_args, loc7_29, loaded [concrete = constants.%I.impl_witness]
|
||||
// CHECK:STDOUT: %Main.import_ref.312: type = import_ref Main//impl_in_class_args, loc7_19, loaded [concrete = constants.%C.165]
|
||||
// CHECK:STDOUT: %Main.import_ref.ae9: type = import_ref Main//impl_in_class_args, loc7_27, loaded [concrete = constants.%I.type.d91]
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/lookup/struct.carbon
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
fn ZZ() -> X;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ impl {.b: (), .a: ()} as Z where .X = D {
|
||||
fn ZZ() -> D { return () as D; }
|
||||
}
|
||||
|
||||
fn F(T:! Z) -> T.X {
|
||||
fn F(generic T: Z) -> T.X {
|
||||
return T.ZZ();
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -17,25 +17,25 @@ interface X {}
|
||||
interface Y {}
|
||||
interface Z {}
|
||||
|
||||
impl forall [T:! Y] T as X {}
|
||||
impl forall [T: Y] T as X {}
|
||||
|
||||
class C(T:! X) {}
|
||||
class C(T: X) {}
|
||||
|
||||
// The `adapt C(T)` line produces a symbolic impl lookup that `T` impls `X`:
|
||||
// - At first the impl lookup query in the eval block has self as
|
||||
// `SymbolicBinding(T:! Y)`.
|
||||
// `SymbolicBinding(T: Y)`.
|
||||
//
|
||||
// The call to construct `D` from in `Test()` makes a specific for `D`:
|
||||
// - The value of `T` in `D` is deduced to be a `FacetValue` of type `Y & Z`
|
||||
// pointing to the `SymbolicBinding(T:! Y & Z)` from `Test()`. But
|
||||
// pointing to the `SymbolicBinding(T: Y & Z)` from `Test()`. But
|
||||
// `FacetValue` needs an instruction of type `TypeType` so the
|
||||
// `SymbolicBinding` is wrapped in `FacetAccessType`, meaning it's
|
||||
// `FacetValue(FacetAccessType(SymbolicBinding(T:! Y & Z)))`.
|
||||
// `FacetValue(FacetAccessType(SymbolicBinding(T: Y & Z)))`.
|
||||
// - That facet value is written to the specific of `D` constructed from
|
||||
// `Test()`.
|
||||
// - The eval block of `D` is run with the above specific. This runs the
|
||||
// symbolic impl lookup that `T` impls `X`. But with the `T` rewritten by the
|
||||
// specific to the `FacetValue(FacetAccessType(SymbolicBinding(T:! Y & Z)))`.
|
||||
// specific to the `FacetValue(FacetAccessType(SymbolicBinding(T: Y & Z)))`.
|
||||
//
|
||||
// The impl lookup unwraps the `FacetValue` to get the underlying type as it may
|
||||
// have access to a more constrained FacetType (with access to more interfaces)
|
||||
@@ -48,24 +48,24 @@ class C(T:! X) {}
|
||||
// `FacetAccessType` in the initial query that makes the symbolic lookup
|
||||
// instruction (`LookupImplWitness`), but then the self type being replaced
|
||||
// with a `FacetAccessType` when evaluating the instruction.
|
||||
class D(T:! Y) { adapt C(T); }
|
||||
class D(T: Y) { adapt C(T); }
|
||||
|
||||
fn Test(T:! Y & Z, unused d: D(T)) {}
|
||||
fn Test(generic T: Y & Z, unused d: D(T)) {}
|
||||
|
||||
// --- final_symbolic_rewrite.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {
|
||||
let X:! type;
|
||||
interface Z(T: type) {
|
||||
let X: type;
|
||||
}
|
||||
|
||||
// This impl has a rewrite to a symbolic constant, and the `.Self` type has a
|
||||
// dependency on a generic parameter.
|
||||
final impl forall [T:! type, S:! type] T as Z(S) where .X = T {}
|
||||
final impl forall [T: type, S: type] T as Z(S) where .X = T {}
|
||||
|
||||
class C {}
|
||||
|
||||
fn F(T:! Z(C), t: T) {
|
||||
fn F(generic T: Z(C), t: T) {
|
||||
// This should typecheck, the `final impl` should give the same `T`.
|
||||
let unused a: T.X = t;
|
||||
}
|
||||
@@ -14,10 +14,10 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I where .T = () {}
|
||||
impl forall [U: type] U as I where .T = () {}
|
||||
|
||||
class C {}
|
||||
|
||||
@@ -25,10 +25,10 @@ class C {}
|
||||
// should be diagnosed.
|
||||
//
|
||||
// CHECK:STDERR: fail_no_binding_used.carbon:[[@LINE+4]]:13: error: `impl` with unused generic binding [ImplUnusedBinding]
|
||||
// CHECK:STDERR: impl forall [V:! type] C as I where .T = {.unmatched: ()} {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [V: type] C as I where .T = {.unmatched: ()} {}
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [V:! type] C as I where .T = {.unmatched: ()} {}
|
||||
impl forall [V: type] C as I where .T = {.unmatched: ()} {}
|
||||
|
||||
fn F() {
|
||||
// This shows that the first impl declaration was matched even though the
|
||||
@@ -42,10 +42,10 @@ fn F() {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I where .T = () {}
|
||||
impl forall [U: type] U as I where .T = () {}
|
||||
|
||||
class C {}
|
||||
|
||||
@@ -54,10 +54,10 @@ class C {}
|
||||
// https://discord.com/channels/655572317891461132/941071822756143115/1354563497731686550
|
||||
//
|
||||
// CHECK:STDERR: fail_one_binding_unused.carbon:[[@LINE+4]]:13: error: `impl` with unused generic binding [ImplUnusedBinding]
|
||||
// CHECK:STDERR: impl forall [V:! type, W:! type] V as I where .T = {.unmatched: ()} {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [V: type, W: type] V as I where .T = {.unmatched: ()} {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [V:! type, W:! type] V as I where .T = {.unmatched: ()} {}
|
||||
impl forall [V: type, W: type] V as I where .T = {.unmatched: ()} {}
|
||||
|
||||
fn F() {
|
||||
// This shows that the first impl declaration was matched even though the
|
||||
@@ -70,12 +70,12 @@ fn F() {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I where .T = () {}
|
||||
impl forall [U: type] U as I where .T = () {}
|
||||
|
||||
class C(U:! type) {
|
||||
class C(U: type) {
|
||||
// This impl can never deduce its inherited generic binding `U`, which
|
||||
// should be diagnosed.
|
||||
//
|
||||
@@ -96,22 +96,22 @@ fn F() {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I where .T = () {}
|
||||
impl forall [U: type] U as I where .T = () {}
|
||||
|
||||
class C(U:! type) {
|
||||
class C(U: type) {
|
||||
// This impl can never deduce its inherited generic binding `U`, which
|
||||
// should be diagnosed.
|
||||
//
|
||||
// TODO: We should point the diagnostic at the binding `U` in C.
|
||||
//
|
||||
// CHECK:STDERR: fail_inherited_binding_in_forall_unused.carbon:[[@LINE+4]]:15: error: `impl` with unused generic binding [ImplUnusedBinding]
|
||||
// CHECK:STDERR: impl forall [V:! type] C(V) as I where .T = {.unmatched: ()} {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [V: type] C(V) as I where .T = {.unmatched: ()} {}
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [V:! type] C(V) as I where .T = {.unmatched: ()} {}
|
||||
impl forall [V: type] C(V) as I where .T = {.unmatched: ()} {}
|
||||
}
|
||||
|
||||
fn F() {
|
||||
@@ -122,12 +122,12 @@ fn F() {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I where .T = {.unmatched: ()} {}
|
||||
impl forall [U: type] U as I where .T = {.unmatched: ()} {}
|
||||
|
||||
class C(U:! type) {
|
||||
class C(U: type) {
|
||||
// `U` can be deduced here, so no diagnostic issued.
|
||||
impl C(U) as I where .T = () {}
|
||||
}
|
||||
@@ -140,15 +140,15 @@ fn F() {
|
||||
// --- inherited_binding_in_forall_used.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I(W:! type) {
|
||||
let T:! type;
|
||||
interface I(W: type) {
|
||||
let T: type;
|
||||
}
|
||||
|
||||
impl forall [U:! type] U as I(U) where .T = {.unmatched: ()} {}
|
||||
impl forall [U: type] U as I(U) where .T = {.unmatched: ()} {}
|
||||
|
||||
class C(U:! type) {
|
||||
class C(U: type) {
|
||||
// `U` can be deduced here, so no diagnostic issued.
|
||||
impl forall [V:! type] C(U) as I(V) where .T = () {}
|
||||
impl forall [V: type] C(U) as I(V) where .T = () {}
|
||||
}
|
||||
|
||||
fn F() {
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
fn F() -> U;
|
||||
}
|
||||
|
||||
class C { adapt {}; }
|
||||
|
||||
impl forall [T:! type] T as I where .U = C {
|
||||
impl forall [T: type] T as I where .U = C {
|
||||
// `T as I` does an impl lookup to form a FacetValue, which must find the impl
|
||||
// being defined and use that. The witness must be a final witness in order to
|
||||
// know that `U` is `C`.
|
||||
@@ -31,13 +31,13 @@ impl forall [T:! type] T as I where .U = C {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
fn F() -> U;
|
||||
}
|
||||
|
||||
class C { adapt {}; }
|
||||
|
||||
impl forall [T:! type] T as I where .U = C {
|
||||
impl forall [T: type] T as I where .U = C {
|
||||
// `Self as I` is a symbolic facet value specified in the interface-with-self
|
||||
// specific, and then monomorphized with the self type of the impl.
|
||||
fn F() -> (Self as I).U { return {} as C; }
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
fn F() -> U;
|
||||
}
|
||||
|
||||
class C { adapt {}; }
|
||||
|
||||
impl forall [T:! type] T as I where .U = C {
|
||||
impl forall [T: type] T as I where .U = C {
|
||||
// We perform name lookup into `I` and resolve `U` to `T.(I.U)`.
|
||||
//@dump-sem-ir-begin
|
||||
fn F() -> U { return {} as C; }
|
||||
@@ -55,7 +55,7 @@ impl forall [T:! type] T as I where .U = C {
|
||||
// CHECK:STDOUT: %T.as.I.impl.F.type: type = fn_type @T.as.I.impl.F, @T.as.I.impl(%T.loc10_15.1) [symbolic = %T.as.I.impl.F.type (constants.%T.as.I.impl.F.type)]
|
||||
// CHECK:STDOUT: %T.as.I.impl.F: @T.as.I.impl.%T.as.I.impl.F.type (%T.as.I.impl.F.type) = struct_value () [symbolic = %T.as.I.impl.F (constants.%T.as.I.impl.F)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %T.ref as %.loc10_31 {
|
||||
// CHECK:STDOUT: impl: %T.ref as %.loc10_30 {
|
||||
// CHECK:STDOUT: %T.as.I.impl.F.decl: @T.as.I.impl.%T.as.I.impl.F.type (%T.as.I.impl.F.type) = fn_decl @T.as.I.impl.F [symbolic = @T.as.I.impl.%T.as.I.impl.F (constants.%T.as.I.impl.F)] {
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.98b = out_param_pattern [concrete = constants.%return.param_patt.89a]
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.98b = return_slot_pattern %return.param_patt, %U.ref [concrete = constants.%return.patt.e4a]
|
||||
@@ -74,8 +74,8 @@ impl forall [T:! type] T as I where .U = C {
|
||||
// CHECK:STDOUT: .U = <poisoned>
|
||||
// CHECK:STDOUT: .F = %T.as.I.impl.F.decl
|
||||
// CHECK:STDOUT: .C = <poisoned>
|
||||
// CHECK:STDOUT: extend %.loc10_31
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc10_44.1
|
||||
// CHECK:STDOUT: extend %.loc10_30
|
||||
// CHECK:STDOUT: witness = %I.impl_witness.loc10_43.1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -106,7 +106,7 @@ impl forall [T:! type] T as I where .U = C {
|
||||
// CHECK:STDOUT: specific @T.as.I.impl(constants.%T) {
|
||||
// CHECK:STDOUT: %T.patt.loc10_15.2 => constants.%T.patt
|
||||
// CHECK:STDOUT: %T.loc10_15.1 => constants.%T
|
||||
// CHECK:STDOUT: %I.impl_witness.loc10_44.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT: %I.impl_witness.loc10_43.2 => constants.%I.impl_witness
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T.as.I.impl.F.type => constants.%T.as.I.impl.F.type
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ interface I {};
|
||||
|
||||
namespace N;
|
||||
// Use `package.I` and poison `N.I`.
|
||||
fn N.F1(x:! I);
|
||||
fn N.F1(generic x: I);
|
||||
|
||||
class N.C {
|
||||
extend impl as I {
|
||||
|
||||
+9
-9
@@ -14,14 +14,14 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class ImportedC {}
|
||||
class ImportedD(T:! type) {}
|
||||
class ImportedD(T: type) {}
|
||||
|
||||
interface ImportedY {}
|
||||
interface ImportedZ(T:! type) {}
|
||||
interface ImportedZ(T: type) {}
|
||||
|
||||
constraint ImportedN(T:! type) {}
|
||||
constraint ImportedN(T: type) {}
|
||||
|
||||
class ImportedAnyParam[T:! type](X:! T) {}
|
||||
class ImportedAnyParam[T: type](X: T) {}
|
||||
|
||||
// --- fail_todo_class_definition_missing.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -177,7 +177,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
import library "imports";
|
||||
|
||||
class D(T:! type) {}
|
||||
class D(T: type) {}
|
||||
|
||||
impl ImportedAnyParam(D) as ImportedY {}
|
||||
|
||||
@@ -197,7 +197,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
import library "imports";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
impl ImportedAnyParam(Z) as ImportedY {}
|
||||
|
||||
@@ -217,7 +217,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
import library "imports";
|
||||
|
||||
constraint N(T:! type) {}
|
||||
constraint N(T: type) {}
|
||||
|
||||
impl ImportedAnyParam(N) as ImportedY {}
|
||||
|
||||
@@ -256,7 +256,7 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {}
|
||||
|
||||
fn F(unused T:! type) {
|
||||
fn F(unused generic T: type) {
|
||||
class C {}
|
||||
impl C as Z {}
|
||||
}
|
||||
@@ -267,7 +267,7 @@ library "[[@TEST_NAME]]";
|
||||
interface Z {}
|
||||
|
||||
// Neither {} nor Z are defined within or by the scope of `F`.
|
||||
fn F(unused T:! type) {
|
||||
fn F(unused generic T: type) {
|
||||
// TODO: The error should be about being an orphan, not an unused binding.
|
||||
// CHECK:STDERR: fail_todo_orphan_in_generic_fn_scope.carbon:[[@LINE+4]]:3: error: `impl` with unused generic binding [ImplUnusedBinding]
|
||||
// CHECK:STDERR: impl {} as Z {}
|
||||
|
||||
@@ -58,14 +58,14 @@ interface Y {
|
||||
}
|
||||
|
||||
// T does not need to impl Z yet.
|
||||
impl forall [T:! type] T as Y;
|
||||
impl forall [T: type] T as Y;
|
||||
|
||||
// T needs to impl Z at the start of the definition.
|
||||
// CHECK:STDERR: fail_missing_extend_require_for_symbolic_type.carbon:[[@LINE+4]]:1: error: interface `Y` being implemented requires that `T` implements `Z` [RequireImplsNotImplemented]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as Y {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as Y {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type] T as Y {}
|
||||
impl forall [T: type] T as Y {}
|
||||
|
||||
// --- fail_missing_require_for_symbolic_type.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -77,25 +77,25 @@ interface Y {
|
||||
}
|
||||
|
||||
// T does not need to impl Z yet.
|
||||
impl forall [T:! type] T as Y;
|
||||
impl forall [T: type] T as Y;
|
||||
|
||||
// T needs to impl Z at the start of the definition.
|
||||
// CHECK:STDERR: fail_missing_require_for_symbolic_type.carbon:[[@LINE+4]]:1: error: interface `Y` being implemented requires that `T` implements `Z` [RequireImplsNotImplemented]
|
||||
// CHECK:STDERR: impl forall [T:! type] T as Y {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: impl forall [T: type] T as Y {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl forall [T:! type] T as Y {}
|
||||
impl forall [T: type] T as Y {}
|
||||
|
||||
// --- fail_missing_extend_require_double.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z1(T:! type) {}
|
||||
interface Z2(T:! type) {}
|
||||
interface Z1(T: type) {}
|
||||
interface Z2(T: type) {}
|
||||
|
||||
class A;
|
||||
class B;
|
||||
|
||||
interface Y(U:! type) {
|
||||
interface Y(U: type) {
|
||||
extend require impls Z1(U) & Z2(B);
|
||||
}
|
||||
|
||||
@@ -108,13 +108,13 @@ impl () as Y(A) {}
|
||||
// --- fail_missing_require_double.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z1(T:! type) {}
|
||||
interface Z2(T:! type) {}
|
||||
interface Z1(T: type) {}
|
||||
interface Z2(T: type) {}
|
||||
|
||||
class A;
|
||||
class B;
|
||||
|
||||
interface Y(U:! type) {
|
||||
interface Y(U: type) {
|
||||
require impls Z1(U) & Z2(B);
|
||||
}
|
||||
|
||||
@@ -160,17 +160,17 @@ interface Y {
|
||||
}
|
||||
|
||||
// T does not need to impl Z1/Z2 yet.
|
||||
impl forall [T:! type] T as Y;
|
||||
impl forall [T: type] T as Y;
|
||||
|
||||
// Now we know T impls Z1 and Z2.
|
||||
impl forall [T:! type] T as Z1;
|
||||
impl forall [T:! type] T as Z2;
|
||||
impl forall [T: type] T as Z1;
|
||||
impl forall [T: type] T as Z2;
|
||||
|
||||
// So no error here.
|
||||
impl forall [T:! type] T as Y {}
|
||||
impl forall [T: type] T as Y {}
|
||||
|
||||
impl forall [T:! type] T as Z1 {}
|
||||
impl forall [T:! type] T as Z2 {}
|
||||
impl forall [T: type] T as Z1 {}
|
||||
impl forall [T: type] T as Z2 {}
|
||||
|
||||
// --- require_for_symbolic_type_impl_matches_same_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -184,18 +184,18 @@ interface Y {
|
||||
}
|
||||
|
||||
// This only matches T that impl Z1 and Z2 so no error here.
|
||||
impl forall [T:! Z1 & Z2] T as Y {}
|
||||
impl forall [T: Z1 & Z2] T as Y {}
|
||||
|
||||
// --- require_for_generic_interfaces.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z1(T:! type) {}
|
||||
interface Z2(T:! type) {}
|
||||
interface Z1(T: type) {}
|
||||
interface Z2(T: type) {}
|
||||
|
||||
class A;
|
||||
class B;
|
||||
|
||||
interface Y(U:! type) {
|
||||
interface Y(U: type) {
|
||||
extend require impls Z1(U);
|
||||
require impls Z2(B);
|
||||
}
|
||||
@@ -216,11 +216,11 @@ impl () as Z2(B) {}
|
||||
// --- fail_require_non_self_missing.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
class C;
|
||||
|
||||
interface Y(U:! type) {
|
||||
interface Y(U: type) {
|
||||
// `Self` must appear somewhere in the require decl, so it's in the interface
|
||||
// specific because we want to test a different self-type.
|
||||
require C impls Z(Self);
|
||||
@@ -236,11 +236,11 @@ impl () as Y(()) {}
|
||||
// --- require_non_self.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z(T:! type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
class C;
|
||||
|
||||
interface Y(U:! type) {
|
||||
interface Y(U: type) {
|
||||
// `Self` must appear somewhere in the require decl, so it's in the interface
|
||||
// specific because we want to test a different self-type.
|
||||
require C impls Z(Self);
|
||||
@@ -264,15 +264,15 @@ interface C {
|
||||
require impls B;
|
||||
}
|
||||
|
||||
impl forall [T:! B] T as A { fn AA() {} }
|
||||
impl forall [T: B] T as A { fn AA() {} }
|
||||
|
||||
// When we get to the definition we check that anything B requires is satisfied.
|
||||
// - The interface B requires A, so we must check T impls A.
|
||||
// - The impl for A requires T impls B.
|
||||
// - This impl is what provides T impls B.
|
||||
impl forall [T:! C] T as B {}
|
||||
impl forall [T: C] T as B {}
|
||||
|
||||
fn F(T:! C) {
|
||||
fn F(generic T: C) {
|
||||
// If things go wrong, we find the impl `T as B`, but inside its definition is
|
||||
// a lookup for `T as A`, which (through deducing `T`) includes a lookup for
|
||||
// `T as B`. This creates a cycle of evaluating `T as B` recursively.
|
||||
@@ -286,25 +286,25 @@ fn F(T:! C) {
|
||||
// --- fail_impl_requires_itself_cycle_with_monomorphization_error.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class W(T:! type) {
|
||||
class W(T: type) {
|
||||
adapt {};
|
||||
}
|
||||
|
||||
interface A(N:! Core.IntLiteral) {
|
||||
interface A(N: Core.IntLiteral) {
|
||||
fn AA() -> W(array((), N));
|
||||
}
|
||||
interface B(N:! Core.IntLiteral) {
|
||||
interface B(N: Core.IntLiteral) {
|
||||
require impls A(N);
|
||||
}
|
||||
interface C(N:! Core.IntLiteral) {
|
||||
interface C(N: Core.IntLiteral) {
|
||||
require impls B(N);
|
||||
}
|
||||
|
||||
impl forall [N:! Core.IntLiteral, T:! B(N)] T as A(N) {
|
||||
impl forall [N: Core.IntLiteral, T: B(N)] T as A(N) {
|
||||
fn AA() -> W(array((), N)) { return {} as W(array((), N)); }
|
||||
}
|
||||
|
||||
impl forall [N:! Core.IntLiteral, T:! C(N)] T as B(N) {
|
||||
impl forall [N: Core.IntLiteral, T: C(N)] T as B(N) {
|
||||
// The definition here does not contain the lookups verifying that C(N) impls
|
||||
// `A(N)`, so they do not get re-evaluated for a specific `N`. That doesn't
|
||||
// prevent us from producing a reasonable diagnostic when that `N` causes an
|
||||
@@ -314,7 +314,7 @@ impl forall [N:! Core.IntLiteral, T:! C(N)] T as B(N) {
|
||||
// `T as B(N)` implies `T as A(N)`.
|
||||
}
|
||||
|
||||
fn F(T:! C(-1)) {
|
||||
fn F(generic T: C(-1)) {
|
||||
// CHECK:STDERR: fail_impl_requires_itself_cycle_with_monomorphization_error.carbon:[[@LINE+7]]:3: error: unable to monomorphize specific `AA()` [ResolvingSpecificHere]
|
||||
// CHECK:STDERR: T.(A(-1).AA)();
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~
|
||||
|
||||
+10
-10
@@ -40,11 +40,11 @@ constraint N {
|
||||
}
|
||||
|
||||
// T does not need to impl Z yet.
|
||||
impl forall [T:! type] T as N;
|
||||
impl forall [T: type] T as N;
|
||||
|
||||
// T needs to impl Z at the start of the definition.
|
||||
// TODO: RequireImplsNotImplemented error that () does not implement Z.
|
||||
impl forall [T:! type] T as N {}
|
||||
impl forall [T: type] T as N {}
|
||||
|
||||
// --- require_for_concrete_type.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -80,15 +80,15 @@ constraint N {
|
||||
}
|
||||
|
||||
// T does not need to impl Z yet.
|
||||
impl forall [T:! type] T as N;
|
||||
impl forall [T: type] T as N;
|
||||
|
||||
// Now we know T impls Z.
|
||||
impl forall [T:! type] T as Z;
|
||||
impl forall [T: type] T as Z;
|
||||
|
||||
// So no error here.
|
||||
impl forall [T:! type] T as N {}
|
||||
impl forall [T: type] T as N {}
|
||||
|
||||
impl forall [T:! type] T as Z {}
|
||||
impl forall [T: type] T as Z {}
|
||||
|
||||
// --- require_for_symbolic_type_impl_matches_same_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -102,18 +102,18 @@ constraint N {
|
||||
}
|
||||
|
||||
// This only matches T that impl Z so no error here.
|
||||
impl forall [T:! Z] T as N {}
|
||||
impl forall [T: Z] T as N {}
|
||||
|
||||
// --- require_for_generic_interfaces.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Y(T:! type) {}
|
||||
interface Z(T:! type) {}
|
||||
interface Y(T: type) {}
|
||||
interface Z(T: type) {}
|
||||
|
||||
class A;
|
||||
class B;
|
||||
|
||||
constraint N(U:! type) {
|
||||
constraint N(U: type) {
|
||||
extend require impls Y(U);
|
||||
require impls Z(B);
|
||||
}
|
||||
|
||||
+30
-30
@@ -14,7 +14,7 @@
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
//@dump-sem-ir-begin
|
||||
fn F(self, u: U) -> U;
|
||||
//@dump-sem-ir-end
|
||||
@@ -47,7 +47,7 @@ impl C as J where .U = C {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
fn F(u: U) -> U;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ fn CallFunction() -> i32 {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
fn F(u: U) -> U;
|
||||
fn G(self, v: U) -> U;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ fn CallBoth(e: E) {
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
fn GenericCallF[T:! J](t: T, u: T.U) -> T.U {
|
||||
fn GenericCallF[T: J](t: T, u: T.U) -> T.U {
|
||||
return t.F(u);
|
||||
}
|
||||
|
||||
@@ -107,11 +107,11 @@ interface I {
|
||||
}
|
||||
|
||||
interface J {
|
||||
let U:! I & Core.Destroy;
|
||||
let U: I & Core.Destroy;
|
||||
fn F(u: U) -> U;
|
||||
}
|
||||
|
||||
fn GenericResult[T:! J](t: T, u: T.U) -> T.U {
|
||||
fn GenericResult[T: J](t: T, u: T.U) -> T.U {
|
||||
return t.F(u).(I.Op)(T.F(u));
|
||||
}
|
||||
|
||||
@@ -119,11 +119,11 @@ fn GenericResult[T:! J](t: T, u: T.U) -> T.U {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
fn G(self, v: U) -> U;
|
||||
}
|
||||
|
||||
fn GenericCallInterfaceQualified[T:! J](t: T, u: T.U) -> T.U {
|
||||
fn GenericCallInterfaceQualified[T: J](t: T, u: T.U) -> T.U {
|
||||
return t.(J.G)(u);
|
||||
}
|
||||
|
||||
@@ -131,11 +131,11 @@ fn GenericCallInterfaceQualified[T:! J](t: T, u: T.U) -> T.U {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
fn F(u: U) -> U;
|
||||
}
|
||||
|
||||
fn GenericCallFI32[T:! J where .U = i32](t: T) -> i32 {
|
||||
fn GenericCallFI32[T: J where .U = i32](t: T) -> i32 {
|
||||
return t.F(2);
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ impl E as J {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let U:! type;
|
||||
let U: type;
|
||||
fn F(u: U) -> U;
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ class E {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class E {
|
||||
@@ -227,13 +227,13 @@ class E {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let T:! type;
|
||||
let T: type;
|
||||
fn F() -> T;
|
||||
}
|
||||
|
||||
class A {}
|
||||
|
||||
class E(T:! type) {
|
||||
class E(T: type) {
|
||||
extend impl as J where .T = A {
|
||||
// This `T` names the interface's `T` (extended by the `impl`), not the
|
||||
// class's `T` parameter.
|
||||
@@ -243,7 +243,7 @@ class E(T:! type) {
|
||||
}
|
||||
}
|
||||
|
||||
impl forall [T:! type] T as J where .T = () {
|
||||
impl forall [T: type] T as J where .T = () {
|
||||
// This `T` names the interface's `T` (extended by the `impl`), not the
|
||||
// class's `T` parameter.
|
||||
//
|
||||
@@ -260,8 +260,8 @@ impl forall [T:! type] T as J where .T = () {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let T:! type;
|
||||
let U:! type;
|
||||
let T: type;
|
||||
let U: type;
|
||||
}
|
||||
|
||||
class A {}
|
||||
@@ -272,15 +272,15 @@ class A {}
|
||||
// CHECK:STDERR: impl A as J {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE-11]]:7: note: associated constant declared here [AssociatedConstantHere]
|
||||
// CHECK:STDERR: let T:! type;
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: let T: type;
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE+7]]:1: error: associated constant U not given a value in impl of interface J [ImplAssociatedConstantNeedsValue]
|
||||
// CHECK:STDERR: impl A as J {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE-17]]:7: note: associated constant declared here [AssociatedConstantHere]
|
||||
// CHECK:STDERR: let U:! type;
|
||||
// CHECK:STDERR: ^~~~~~~~
|
||||
// CHECK:STDERR: let U: type;
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR:
|
||||
impl A as J {
|
||||
// CHECK:STDERR: fail_todo_associated_constant_use_before_value_known.carbon:[[@LINE+8]]:3: error: unrecognized declaration introducer [UnrecognizedDecl]
|
||||
@@ -362,7 +362,7 @@ impl A as J {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J2 {
|
||||
let U2:! type;
|
||||
let U2: type;
|
||||
// CHECK:STDERR: fail_todo_self_period_associated_type.carbon:[[@LINE+14]]:17: error: member access into facet of incomplete type `J2` [IncompleteTypeInMemberAccessOfFacet]
|
||||
// CHECK:STDERR: fn F(self, z: Self.U2) -> Self.U2;
|
||||
// CHECK:STDERR: ^~~~
|
||||
@@ -398,7 +398,7 @@ impl C2 as J2 where .U2 = C2 {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface K {
|
||||
let V:! type;
|
||||
let V: type;
|
||||
fn F(self, v: V) -> V;
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ impl () as K where .V = {.a: ()} {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface M {
|
||||
let Z:! {.b: {}};
|
||||
let Z: {.b: {}};
|
||||
fn G() -> {};
|
||||
}
|
||||
|
||||
@@ -439,10 +439,10 @@ impl () as M where .Z = {.b = {}} {
|
||||
// --- self_as_uses_correct_rewrite_constraint.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
|
||||
interface M {
|
||||
let Z:! {.b: type};
|
||||
let Z: {.b: type};
|
||||
fn G() -> type;
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ impl C(()) as M where .Z = {.b = ()} {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let N:! i32;
|
||||
let N: i32;
|
||||
fn F(self) -> array(bool, N);
|
||||
}
|
||||
|
||||
@@ -474,13 +474,13 @@ impl () as I where .N = 2 {
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface Z {
|
||||
let X:! type;
|
||||
let X: type;
|
||||
}
|
||||
|
||||
class C(T:! type) {}
|
||||
class C(T: type) {}
|
||||
class D {}
|
||||
|
||||
impl forall [T:! type] T as Z where .X = C(T) {}
|
||||
impl forall [T: type] T as Z where .X = C(T) {}
|
||||
|
||||
fn F() {
|
||||
let unused a: D.(Z.X) = {} as C(D);
|
||||
|
||||
+20
-20
@@ -15,16 +15,16 @@ library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {}
|
||||
|
||||
class ArgToI(T:! I) {}
|
||||
class ArgToI(T: I) {}
|
||||
|
||||
interface IMisuse {
|
||||
let Arg:! type;
|
||||
let Arg: type;
|
||||
// CHECK:STDERR: fail_invalid_interface.carbon:[[@LINE+7]]:18: error: cannot convert type `Arg` into type implementing `I` [ConversionFailureTypeToFacet]
|
||||
// CHECK:STDERR: fn Op(self) -> ArgToI(Arg);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_invalid_interface.carbon:[[@LINE-7]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
||||
// CHECK:STDERR: class ArgToI(T:! I) {}
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR: class ArgToI(T: I) {}
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
fn Op(self) -> ArgToI(Arg);
|
||||
}
|
||||
@@ -50,15 +50,15 @@ class C {
|
||||
}
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE+8]]:21: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch]
|
||||
// CHECK:STDERR: fn F(T:! IMisuse) { T.Op(); }
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE+8]]:28: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch]
|
||||
// CHECK:STDERR: fn F(generic T: IMisuse) { T.Op(); }
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE-21]]:1: in import [InImport]
|
||||
// CHECK:STDERR: fail_invalid_interface.carbon:16:3: note: calling function declared here [InCallToEntity]
|
||||
// CHECK:STDERR: fn Op(self) -> ArgToI(Arg);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(T:! IMisuse) { T.Op(); }
|
||||
fn F(generic T: IMisuse) { T.Op(); }
|
||||
|
||||
fn G() {
|
||||
var c: C;
|
||||
@@ -68,9 +68,9 @@ fn G() {
|
||||
// CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE+7]]:3: note: type `C` does not implement interface `Core.ImplicitAs(IMisuse)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: F(c);
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE-10]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
||||
// CHECK:STDERR: fn F(T:! IMisuse) { T.Op(); }
|
||||
// CHECK:STDERR: ^~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_misusing_invalid_interface.carbon:[[@LINE-10]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
||||
// CHECK:STDERR: fn F(generic T: IMisuse) { T.Op(); }
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
F(c);
|
||||
}
|
||||
@@ -89,8 +89,8 @@ class C {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE-9]]:1: in import [InImport]
|
||||
// CHECK:STDERR: fail_invalid_interface.carbon:5:14: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
||||
// CHECK:STDERR: class ArgToI(T:! I) {}
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR: class ArgToI(T: I) {}
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
fn Op(unused self) -> ArgToI(ArgC) {
|
||||
return {};
|
||||
@@ -98,15 +98,15 @@ class C {
|
||||
}
|
||||
}
|
||||
|
||||
// CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE+8]]:21: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch]
|
||||
// CHECK:STDERR: fn F(T:! IMisuse) { T.Op(); }
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE+8]]:28: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch]
|
||||
// CHECK:STDERR: fn F(generic T: IMisuse) { T.Op(); }
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE-23]]:1: in import [InImport]
|
||||
// CHECK:STDERR: fail_invalid_interface.carbon:16:3: note: calling function declared here [InCallToEntity]
|
||||
// CHECK:STDERR: fn Op(self) -> ArgToI(Arg);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(T:! IMisuse) { T.Op(); }
|
||||
fn F(generic T: IMisuse) { T.Op(); }
|
||||
|
||||
fn G() {
|
||||
var c: C;
|
||||
@@ -116,9 +116,9 @@ fn G() {
|
||||
// CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE+7]]:3: note: type `C` does not implement interface `Core.ImplicitAs(IMisuse)` [MissingImplInMemberAccessInContext]
|
||||
// CHECK:STDERR: F(c);
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE-10]]:6: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
||||
// CHECK:STDERR: fn F(T:! IMisuse) { T.Op(); }
|
||||
// CHECK:STDERR: ^~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_using_invalid_interface.carbon:[[@LINE-10]]:14: note: initializing generic parameter `T` declared here [InitializingGenericParam]
|
||||
// CHECK:STDERR: fn F(generic T: IMisuse) { T.Op(); }
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
F(c);
|
||||
}
|
||||
Reference in new issue
Block a user