mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 17:48:11 +00:00
1667 lines
82 KiB
Plaintext
1667 lines
82 KiB
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/named_constraint/require.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/named_constraint/require.carbon
|
|
|
|
// --- extend.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {
|
|
fn YY();
|
|
}
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint Z {
|
|
extend require impls Y;
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
fn F(generic T: Z, t: T) {
|
|
//@dump-sem-ir-begin
|
|
T.YY();
|
|
T.(Y.YY)();
|
|
|
|
t.YY();
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// --- extend_with_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y(T: type) {
|
|
fn YY();
|
|
}
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint Z {
|
|
extend require impls Y(Self);
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
fn F(generic T: Z, t: T) {
|
|
//@dump-sem-ir-begin
|
|
T.YY();
|
|
T.(Y(T).YY)();
|
|
|
|
t.YY();
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// --- implicit_self_impls.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {
|
|
fn YY();
|
|
}
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint Z {
|
|
require impls Y;
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
fn F(generic T: Z) {
|
|
T.(Y.YY)();
|
|
}
|
|
|
|
// --- explicit_self_impls.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {
|
|
fn YY();
|
|
}
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint Z {
|
|
require Self impls Y;
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
fn F(generic T: Z) {
|
|
T.(Y.YY)();
|
|
}
|
|
|
|
// --- fail_implicit_self_no_extend_name_lookup_fails.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {
|
|
fn YY();
|
|
}
|
|
|
|
constraint Z {
|
|
require impls Y;
|
|
}
|
|
|
|
fn F(generic T: Z) {
|
|
// This should fail name lookup since Z does not extend Y.
|
|
//
|
|
// CHECK:STDERR: fail_implicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope]
|
|
// CHECK:STDERR: T.YY();
|
|
// CHECK:STDERR: ^~~~
|
|
// CHECK:STDERR:
|
|
T.YY();
|
|
}
|
|
|
|
// --- fail_explicit_self_no_extend_name_lookup_fails.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {
|
|
fn YY();
|
|
}
|
|
|
|
constraint Z {
|
|
require Self impls Y;
|
|
}
|
|
|
|
fn F(generic T: Z) {
|
|
// This should fail name lookup since Z does not extend Y.
|
|
//
|
|
// CHECK:STDERR: fail_explicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope]
|
|
// CHECK:STDERR: T.YY();
|
|
// CHECK:STDERR: ^~~~
|
|
// CHECK:STDERR:
|
|
T.YY();
|
|
}
|
|
|
|
// --- explicit_self_specific_impls.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {}
|
|
|
|
class C(T: type);
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint Z {
|
|
require C(Self) impls Y;
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
// --- require_impls_where.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y { let Y1: type; }
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint Z {
|
|
require impls Y where .Y1 = ();
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_require_impls_incomplete_constraint.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
constraint Y;
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint Z {
|
|
// CHECK:STDERR: fail_require_impls_incomplete_constraint.carbon:[[@LINE+7]]:17: error: facet type `Y` cannot be identified in `require` declaration [RequireImplsUnidentifiedFacetType]
|
|
// CHECK:STDERR: require impls Y;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR: fail_require_impls_incomplete_constraint.carbon:[[@LINE-7]]:1: note: constraint was forward declared here [NamedConstraintForwardDeclaredHere]
|
|
// CHECK:STDERR: constraint Y;
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require impls Y;
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_require_impls_incomplete_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
constraint Z {
|
|
// CHECK:STDERR: fail_require_impls_incomplete_self.carbon:[[@LINE+4]]:17: error: facet type in `require` declaration refers to the named constraint `Z` from within its definition [RequireImplsReferenceCycle]
|
|
// CHECK:STDERR: require impls Z;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
require impls Z;
|
|
}
|
|
|
|
// --- fail_require_impls_incomplete_self_through_alias.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
constraint Z;
|
|
|
|
alias Y = Z;
|
|
constraint Z {
|
|
// CHECK:STDERR: fail_require_impls_incomplete_self_through_alias.carbon:[[@LINE+4]]:17: error: facet type in `require` declaration refers to the named constraint `Z` from within its definition [RequireImplsReferenceCycle]
|
|
// CHECK:STDERR: require impls Y;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
require impls Y;
|
|
}
|
|
|
|
// --- fail_require_impls_incomplete_self_forward_declared.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
constraint Z;
|
|
|
|
constraint Z {
|
|
// CHECK:STDERR: fail_require_impls_incomplete_self_forward_declared.carbon:[[@LINE+4]]:17: error: facet type in `require` declaration refers to the named constraint `Z` from within its definition [RequireImplsReferenceCycle]
|
|
// CHECK:STDERR: require impls Z;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
require impls Z;
|
|
}
|
|
|
|
// --- fail_require_impls_incomplete_self_in_period_self_impls.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
constraint Z {
|
|
// CHECK:STDERR: fail_require_impls_incomplete_self_in_period_self_impls.carbon:[[@LINE+4]]:17: error: facet type in `require` declaration refers to the named constraint `Z` from within its definition [RequireImplsReferenceCycle]
|
|
// CHECK:STDERR: require impls type where .Self impls Z;
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require impls type where .Self impls Z;
|
|
}
|
|
|
|
// --- fail_require_impls_incomplete_self_in_class_impls.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class C(T: type);
|
|
constraint Z {
|
|
// CHECK:STDERR: fail_require_impls_incomplete_self_in_class_impls.carbon:[[@LINE+4]]:17: error: facet type in `require` declaration refers to the named constraint `Z` from within its definition [RequireImplsReferenceCycle]
|
|
// CHECK:STDERR: require impls type where C(.Self) impls Z;
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require impls type where C(.Self) impls Z;
|
|
}
|
|
|
|
// --- fail_require_impls_incomplete_indirect.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
constraint Z;
|
|
|
|
constraint Y {
|
|
// CHECK:STDERR: fail_require_impls_incomplete_indirect.carbon:[[@LINE+7]]:17: error: facet type `Z` cannot be identified in `require` declaration [RequireImplsUnidentifiedFacetType]
|
|
// CHECK:STDERR: require impls Z;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR: fail_require_impls_incomplete_indirect.carbon:[[@LINE-6]]:1: note: constraint was forward declared here [NamedConstraintForwardDeclaredHere]
|
|
// CHECK:STDERR: constraint Z;
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require impls Z;
|
|
}
|
|
|
|
constraint Z {
|
|
require impls Y;
|
|
}
|
|
|
|
// --- fail_require_impls_incomplete_self_specific.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
constraint Z(T: type) {
|
|
// CHECK:STDERR: fail_require_impls_incomplete_self_specific.carbon:[[@LINE+4]]:19: error: facet type in `require` declaration refers to the named constraint `Z` from within its definition [RequireImplsReferenceCycle]
|
|
// CHECK:STDERR: require T impls Z(Self);
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
require T impls Z(Self);
|
|
}
|
|
|
|
// --- fail_require_impls_without_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {
|
|
let Y1: type;
|
|
}
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint Z(T: type) {
|
|
// Either the type `T` or the facet type `Y` must mention `Self` in a way that
|
|
// it would appear in the type structure used for impl lookup (so inside a
|
|
// `where` does not count). But they don't.
|
|
//
|
|
// CHECK:STDERR: fail_require_impls_without_self.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y` without a `Self` argument [RequireImplsMissingSelf]
|
|
// CHECK:STDERR: require T impls Y where .Y1 = Self;
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require T impls Y where .Y1 = Self;
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
// --- fail_require_impls_without_self_in_one_interface.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y(T: type) {}
|
|
|
|
constraint Z(T: type) {
|
|
// Self is in one interface but not the other.
|
|
//
|
|
// CHECK:STDERR: fail_require_impls_without_self_in_one_interface.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y({})` without a `Self` argument [RequireImplsMissingSelf]
|
|
// CHECK:STDERR: require T impls Y(Self) & Y({});
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require T impls Y(Self) & Y({});
|
|
}
|
|
|
|
// --- fail_require_impls_without_self_in_multiple_interfaces.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y(T: type) {}
|
|
|
|
constraint Z(T: type) {
|
|
// Self does not appear in either interface, we should get an error for each.
|
|
//
|
|
// CHECK:STDERR: fail_require_impls_without_self_in_multiple_interfaces.carbon:[[@LINE+8]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y(())` without a `Self` argument [RequireImplsMissingSelf]
|
|
// CHECK:STDERR: require T impls Y(()) & Y({});
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
// CHECK:STDERR: fail_require_impls_without_self_in_multiple_interfaces.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y({})` without a `Self` argument [RequireImplsMissingSelf]
|
|
// CHECK:STDERR: require T impls Y(()) & Y({});
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require T impls Y(()) & Y({});
|
|
}
|
|
|
|
// --- fail_self_impls_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
constraint Z(T: type) {
|
|
// CHECK:STDERR: fail_self_impls_self.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType]
|
|
// CHECK:STDERR: require impls Self;
|
|
// CHECK:STDERR: ^~~~
|
|
// CHECK:STDERR:
|
|
require impls Self;
|
|
}
|
|
|
|
// --- fail_impls_type.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
class C(T: type) {}
|
|
|
|
constraint Z(T: type) {
|
|
// CHECK:STDERR: fail_impls_type.carbon:[[@LINE+4]]:19: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType]
|
|
// CHECK:STDERR: require T impls C(Self);
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
require T impls C(Self);
|
|
}
|
|
|
|
// --- fail_non_type_impls.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {}
|
|
|
|
constraint Z(T: type) {
|
|
// CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+7]]:11: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
|
|
// CHECK:STDERR: require 1 impls Y;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+4]]:11: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
|
|
// CHECK:STDERR: require 1 impls Y;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
require 1 impls Y;
|
|
}
|
|
|
|
// --- fail_impls_non_type.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {}
|
|
|
|
constraint Z(T: type) {
|
|
// CHECK:STDERR: fail_impls_non_type.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType]
|
|
// CHECK:STDERR: require impls 1;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
require impls 1;
|
|
}
|
|
|
|
// --- require_self_in_requirement.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Y {
|
|
let Y1: type;
|
|
}
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint Z {
|
|
// Self can appear in a requirement.
|
|
require impls Y where .Y1 = Self;
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
// --- require_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {}
|
|
|
|
constraint N {
|
|
require impls Z(Self);
|
|
}
|
|
|
|
impl () as Z(()) {}
|
|
|
|
fn F() {
|
|
() as N;
|
|
}
|
|
|
|
// --- fail_require_different_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {}
|
|
|
|
constraint N {
|
|
require impls Z(Self);
|
|
}
|
|
|
|
impl () as Z({}) {}
|
|
|
|
fn F() {
|
|
// N requires () impls Z(Self) which is Z(()) for this query, but it impls
|
|
// Z({}).
|
|
//
|
|
// CHECK:STDERR: fail_require_different_self.carbon:[[@LINE+4]]:3: error: cannot convert type `()` into type implementing `N` [ConversionFailureTypeToFacet]
|
|
// CHECK:STDERR: () as N;
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
() as N;
|
|
}
|
|
|
|
// --- fail_require_different_parameter.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {}
|
|
|
|
constraint N {
|
|
require impls Z({});
|
|
}
|
|
|
|
impl () as Z(()) {}
|
|
|
|
fn F() {
|
|
// N requires () impls Z({}) but it impls Z(()).
|
|
//
|
|
// CHECK:STDERR: fail_require_different_parameter.carbon:[[@LINE+4]]:3: error: cannot convert type `()` into type implementing `N` [ConversionFailureTypeToFacet]
|
|
// CHECK:STDERR: () as N;
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
() as N;
|
|
}
|
|
|
|
// --- require_different_type_impls.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {}
|
|
|
|
constraint N {
|
|
require {} impls Z(Self);
|
|
}
|
|
|
|
impl {} as Z(()) {}
|
|
|
|
fn F() {
|
|
() as N;
|
|
}
|
|
|
|
// --- require_different_type_impls_nested_constraint.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {}
|
|
|
|
constraint M(T: type) {
|
|
extend require impls Z(T);
|
|
}
|
|
|
|
constraint N {
|
|
require {} impls M(Self);
|
|
}
|
|
|
|
impl {} as Z(()) {}
|
|
|
|
fn F() {
|
|
() as N;
|
|
}
|
|
|
|
// --- fail_require_different_type_impls_nested_constraint_without_reference_to_outer_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {}
|
|
|
|
constraint M(T: type) {
|
|
extend require impls Z(Self);
|
|
}
|
|
|
|
constraint N {
|
|
// `M(T)` does not make use of the `T`, which is assigned `Self`, so we end up
|
|
// without any interface specific referencing the `Self` of `N`.
|
|
//
|
|
// CHECK:STDERR: fail_require_different_type_impls_nested_constraint_without_reference_to_outer_self.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Z({})` without a `Self` argument [RequireImplsMissingSelf]
|
|
// CHECK:STDERR: require {} impls M(Self);
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require {} impls M(Self);
|
|
}
|
|
|
|
// --- fail_require_different_type_impls_nested_constraint_empty.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
constraint M(T: type) {}
|
|
|
|
constraint N {
|
|
// `M(T)` does not make use of the `T`, which is assigned `Self`, so we end up
|
|
// without any interface specific referencing the `Self` of `N`.
|
|
//
|
|
// CHECK:STDERR: fail_require_different_type_impls_nested_constraint_empty.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but no interfaces were found [RequireImplsMissingSelfEmptyFacetType]
|
|
// CHECK:STDERR: require {} impls M(Self);
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require {} impls M(Self);
|
|
}
|
|
|
|
// --- fail_require_different_type_impls_different_parameter.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {}
|
|
|
|
constraint N {
|
|
require {} impls Z(Self);
|
|
}
|
|
|
|
impl {} as Z({}) {}
|
|
|
|
fn F() {
|
|
// N requires {} impls Z(Self) which is Z(()) for this query, but it impls
|
|
// Z({}).
|
|
//
|
|
// CHECK:STDERR: fail_require_different_type_impls_different_parameter.carbon:[[@LINE+4]]:3: error: cannot convert type `()` into type implementing `N` [ConversionFailureTypeToFacet]
|
|
// CHECK:STDERR: () as N;
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
() as N;
|
|
}
|
|
|
|
// --- require_with_rewrite_constraint.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {
|
|
let X: type;
|
|
}
|
|
|
|
constraint N {
|
|
require {} impls Z(Self) where .X = Self;
|
|
}
|
|
|
|
// Will satisfy `() as N`.
|
|
impl {} as Z(()) where .X = () {}
|
|
|
|
fn F() {
|
|
() as N;
|
|
}
|
|
|
|
// --- require_with_rewrite_constraint_period_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {
|
|
let X: type;
|
|
}
|
|
|
|
constraint N(T: type) {
|
|
require T impls Z(Self) where .X = .Self;
|
|
}
|
|
|
|
// Will satisfy `() as N({})`.
|
|
impl {} as Z(()) where .X = {} {}
|
|
|
|
fn F() {
|
|
() as N({});
|
|
}
|
|
|
|
// --- todo_fail_require_with_mismatching_rewrite_constraint.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {
|
|
let X: type;
|
|
}
|
|
|
|
constraint N {
|
|
require {} impls Z(Self) where .X = Self;
|
|
}
|
|
|
|
// Will not satisfy `() as N` as the rewrite does not match.
|
|
impl {} as Z(()) where .X = {} {}
|
|
|
|
fn F() {
|
|
// TODO: Should fail, but we're currently checking the requirements of `N`
|
|
// rather than of the identified facet type of `N` (which would include the
|
|
// require decl's requirements).
|
|
() as N;
|
|
}
|
|
|
|
// --- todo_fail_require_with_mismatching_rewrite_constraint_period_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {
|
|
let X: type;
|
|
}
|
|
|
|
constraint N(T: type) {
|
|
require T impls Z(Self) where .X = .Self;
|
|
}
|
|
|
|
// Will not satisfy `() as N({})` as the rewrite does not match.
|
|
impl {} as Z(()) where .X = () {}
|
|
|
|
fn F() {
|
|
// TODO: Should fail, but we're currently checking the requirements of `N`
|
|
// rather than of the identified facet type of `N` (which would include the
|
|
// require decl's requirements).
|
|
() as N({});
|
|
}
|
|
|
|
// --- fail_require_with_period_self_impls_not_satisfied.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z {}
|
|
interface Y(T: type) {}
|
|
|
|
class C(T: type);
|
|
|
|
constraint N {
|
|
require impls Z where .Self impls Y(.Self);
|
|
}
|
|
|
|
fn F(generic _: N) {}
|
|
|
|
fn G(generic T: Z) {
|
|
// CHECK:STDERR: fail_require_with_period_self_impls_not_satisfied.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `N` [ConversionFailureFacetToFacet]
|
|
// CHECK:STDERR: T as N;
|
|
// CHECK:STDERR: ^~~~~~
|
|
// CHECK:STDERR:
|
|
T as N;
|
|
}
|
|
|
|
// --- require_with_period_self_impls.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z {}
|
|
interface Y(T: type) {}
|
|
|
|
class C(T: type);
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint N {
|
|
require impls Z where .Self impls Y(.Self);
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
fn F(generic _: N) {}
|
|
|
|
fn G(generic T: Z & Y(.Self)) {
|
|
T as N;
|
|
}
|
|
|
|
// --- fail_require_with_specific_period_self_not_satisfied.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z {}
|
|
interface Y(T: type) {}
|
|
|
|
class C(T: type);
|
|
|
|
constraint N {
|
|
require impls Z where C(.Self) impls Y(.Self);
|
|
}
|
|
|
|
fn F(generic _: N) {}
|
|
|
|
fn G(generic T: Z) {
|
|
// CHECK:STDERR: fail_require_with_specific_period_self_not_satisfied.carbon:[[@LINE+4]]:3: error: cannot convert type `T` that implements `Z` into type implementing `N` [ConversionFailureFacetToFacet]
|
|
// CHECK:STDERR: T as N;
|
|
// CHECK:STDERR: ^~~~~~
|
|
// CHECK:STDERR:
|
|
T as N;
|
|
}
|
|
|
|
// --- require_with_specific_period_self.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z {}
|
|
interface Y(T: type) {}
|
|
|
|
class C(T: type);
|
|
|
|
//@dump-sem-ir-begin
|
|
constraint N {
|
|
require impls Z where C(.Self) impls Y(.Self);
|
|
}
|
|
//@dump-sem-ir-end
|
|
|
|
fn F(generic _: N) {}
|
|
|
|
fn G(generic T: Z) {
|
|
impl C(T) as Y(T) {}
|
|
T as N;
|
|
}
|
|
|
|
// --- partially_identified_witness_from_self_in_lookup_facet_type.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {
|
|
let Z1: type;
|
|
}
|
|
interface Y(T: type) {}
|
|
|
|
class C {}
|
|
|
|
constraint N {
|
|
require C impls Z(Self);
|
|
// Test that we can find the `C impls Z(Self)` witness above through the
|
|
// `Self` in the lookup target facet type in `C as Z(Self)`.
|
|
require C.(Z(Self).Z1) impls Y(Self);
|
|
}
|
|
|
|
// --- fail_self_in_compound_member_access_is_not_in_type_structure.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z(T: type) {
|
|
let Z1: type;
|
|
}
|
|
interface Y {}
|
|
|
|
class C {}
|
|
|
|
constraint N {
|
|
require C impls Z(Self);
|
|
// The type structure is `? impls Y`, where the `?` is dependent on `Self` but
|
|
// it is not `Self`. Since `Self` is not directly part of the type structure,
|
|
// we don't accept this require decl.
|
|
//
|
|
// CHECK:STDERR: fail_self_in_compound_member_access_is_not_in_type_structure.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic argument for each required interface, but found interface `Y` without a `Self` argument [RequireImplsMissingSelf]
|
|
// CHECK:STDERR: require C.(Z(Self).Z1) impls Y;
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require C.(Z(Self).Z1) impls Y;
|
|
}
|
|
|
|
// --- fail_rewrite_cycle.carbon
|
|
library "[[@TEST_NAME]]";
|
|
|
|
interface Z {
|
|
let Z1: type;
|
|
let Z2: type;
|
|
}
|
|
|
|
constraint N {
|
|
// CHECK:STDERR: fail_rewrite_cycle.carbon:[[@LINE+4]]:17: error: found cycle in facet type constraint for `.(Z.Z2)` [FacetTypeConstraintCycle]
|
|
// CHECK:STDERR: require impls Z where .Z1 = .Z2 and .Z2 = .Z1;
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
require impls Z where .Z1 = .Z2 and .Z2 = .Z1;
|
|
}
|
|
|
|
// CHECK:STDOUT: --- extend.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
|
|
// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.WithSelf.%Y.WithSelf.YY.decl [concrete]
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %Self.d87: %Z.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.d87 [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type %Z.type [concrete]
|
|
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T: %Z.type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.86a: type = pattern_type %T.as_type [symbolic]
|
|
// CHECK:STDOUT: %t.param_patt: %pattern_type.86a = value_param_pattern [symbolic]
|
|
// CHECK:STDOUT: %t.patt: %pattern_type.86a = wrapper_binding_pattern t, %t.param_patt [symbolic]
|
|
// CHECK:STDOUT: %Y.lookup_impl_witness: <witness> = lookup_impl_witness %T, @Y [symbolic]
|
|
// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %T.as_type, (%Y.lookup_impl_witness) [symbolic]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.type.0e8: type = fn_type @Y.WithSelf.YY, @Y.WithSelf(%Y.facet) [symbolic]
|
|
// CHECK:STDOUT: %.43c: type = fn_type_with_self_type %Y.WithSelf.YY.type.0e8, %Y.facet [symbolic]
|
|
// CHECK:STDOUT: %impl.elem0: %.43c = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic]
|
|
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Y.WithSelf.YY(%Y.facet) [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @Z {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d87]
|
|
// CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %Z.WithSelf.Self.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.as_type.impls.Y.type.require [concrete] {
|
|
// CHECK:STDOUT: require %Self.as_type.loc9_18.1 impls %Y.ref
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.as_type.loc9_18.1: type = facet_access_type @Z.%Self [symbolic = %Self.as_type.loc9_18.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %.loc9: type = specific_constant @Z.WithSelf.Self.as_type.impls.Y.type.require.%Y.ref, @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%Self.d87) [concrete = constants.%Y.type]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .YY = <poisoned>
|
|
// CHECK:STDOUT: extend @Z.WithSelf.%.loc9
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: @Z.WithSelf.Self.as_type.impls.Y.type.require {
|
|
// CHECK:STDOUT: require @Z.WithSelf.Self.as_type.impls.Y.type.require.%Self.as_type.loc9_18.1 impls @Z.WithSelf.Self.as_type.impls.Y.type.require.%Y.ref
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Y.type.require(@Z.%Self: %Z.type) {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc9_18.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_18.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @F(%T.loc13_15.2: %Z.type) {
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: %Y.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc13_15.1, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)]
|
|
// CHECK:STDOUT: %Y.facet.loc15: %Y.type = facet_value %T.as_type.loc13_23.1, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.type: type = fn_type @Y.WithSelf.YY, @Y.WithSelf(%Y.facet.loc15) [symbolic = %Y.WithSelf.YY.type (constants.%Y.WithSelf.YY.type.0e8)]
|
|
// CHECK:STDOUT: %.loc15_4.2: type = fn_type_with_self_type %Y.WithSelf.YY.type, %Y.facet.loc15 [symbolic = %.loc15_4.2 (constants.%.43c)]
|
|
// CHECK:STDOUT: %impl.elem0.loc15_4.2: @F.%.loc15_4.2 (%.43c) = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc15_4.2: <specific function> = specific_impl_function %impl.elem0.loc15_4.2, @Y.WithSelf.YY(%Y.facet.loc15) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_23.1 (%T.as_type)) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %T.ref.loc15: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T)]
|
|
// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)]
|
|
// CHECK:STDOUT: %.loc15_4.1: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)]
|
|
// CHECK:STDOUT: %YY.ref.loc15: %Y.assoc_type = name_ref YY, @Y.WithSelf.%assoc0 [concrete = constants.%assoc0]
|
|
// CHECK:STDOUT: %impl.elem0.loc15_4.1: @F.%.loc15_4.2 (%.43c) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc15_4.1: <specific function> = specific_impl_function %impl.elem0.loc15_4.1, @Y.WithSelf.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.call.loc15: init %empty_tuple.type = call %specific_impl_fn.loc15_4.1()
|
|
// CHECK:STDOUT: %T.ref.loc16: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T)]
|
|
// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
|
|
// CHECK:STDOUT: %YY.ref.loc16: %Y.assoc_type = name_ref YY, @Y.WithSelf.%assoc0 [concrete = constants.%assoc0]
|
|
// CHECK:STDOUT: %T.as_type.loc16: type = facet_access_type %T.ref.loc16 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)]
|
|
// CHECK:STDOUT: %Y.facet.loc16: %Y.type = facet_value %T.as_type.loc16, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)]
|
|
// CHECK:STDOUT: %.loc16: %Y.type = converted %T.ref.loc16, %Y.facet.loc16 [symbolic = %Y.facet.loc15 (constants.%Y.facet)]
|
|
// CHECK:STDOUT: %impl.elem0.loc16: @F.%.loc15_4.2 (%.43c) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc16: <specific function> = specific_impl_function %impl.elem0.loc16, @Y.WithSelf.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.call.loc16: init %empty_tuple.type = call %specific_impl_fn.loc16()
|
|
// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc13_23.1 (%T.as_type) = name_ref t, %t
|
|
// CHECK:STDOUT: %YY.ref.loc18: %Y.assoc_type = name_ref YY, @Y.WithSelf.%assoc0 [concrete = constants.%assoc0]
|
|
// CHECK:STDOUT: %impl.elem0.loc18: @F.%.loc15_4.2 (%.43c) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc18: <specific function> = specific_impl_function %impl.elem0.loc18, @Y.WithSelf.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.call.loc18: init %empty_tuple.type = call %specific_impl_fn.loc18()
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.d87) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%Self.d87) {
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type.loc9_18.2 => constants.%Self.as_type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @F(constants.%T) {
|
|
// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc13_15.1 => constants.%T
|
|
// CHECK:STDOUT: %T.as_type.loc13_23.1 => constants.%T.as_type
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.86a
|
|
// CHECK:STDOUT: %t.param_patt.loc13_21.2 => constants.%t.param_patt
|
|
// CHECK:STDOUT: %t.patt.loc13_21.2 => constants.%t.patt
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%T) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%T) {
|
|
// CHECK:STDOUT: %Self => constants.%T
|
|
// CHECK:STDOUT: %Self.as_type.loc9_18.2 => constants.%T.as_type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- extend_with_self.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %Y.type.cb4: type = generic_interface_type @Y [concrete]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %Y.generic: %Y.type.cb4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Y.type.67d: type = facet_type <@Y, @Y(%T.67d)> [symbolic]
|
|
// CHECK:STDOUT: %Self.624: %Y.type.67d = symbolic_binding Self, 1 [symbolic]
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %Self.d87: %Z.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.d87 [symbolic]
|
|
// CHECK:STDOUT: %Y.type.f41: type = facet_type <@Y, @Y(%Self.as_type)> [symbolic]
|
|
// CHECK:STDOUT: %require_complete.097: <witness> = require_complete_type %Y.type.f41 [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type %Z.type [concrete]
|
|
// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.f45: %Z.type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.f45 [symbolic]
|
|
// CHECK:STDOUT: %pattern_type.86a: type = pattern_type %T.as_type [symbolic]
|
|
// CHECK:STDOUT: %t.param_patt: %pattern_type.86a = value_param_pattern [symbolic]
|
|
// CHECK:STDOUT: %t.patt: %pattern_type.86a = wrapper_binding_pattern t, %t.param_patt [symbolic]
|
|
// CHECK:STDOUT: %Y.type.40d: type = facet_type <@Y, @Y(%T.as_type)> [symbolic]
|
|
// CHECK:STDOUT: %require_complete.4ae: <witness> = require_complete_type %Y.type.40d [symbolic]
|
|
// CHECK:STDOUT: %Y.assoc_type.0ce: type = assoc_entity_type @Y, @Y(%T.as_type) [symbolic]
|
|
// CHECK:STDOUT: %assoc0.cc2: %Y.assoc_type.0ce = assoc_entity element0, @Y.WithSelf.%Y.WithSelf.YY.decl [symbolic]
|
|
// CHECK:STDOUT: %Y.lookup_impl_witness: <witness> = lookup_impl_witness %T.f45, @Y, @Y(%T.as_type) [symbolic]
|
|
// CHECK:STDOUT: %Y.facet: %Y.type.40d = facet_value %T.as_type, (%Y.lookup_impl_witness) [symbolic]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.type.5a5: type = fn_type @Y.WithSelf.YY, @Y.WithSelf(%T.as_type, %Y.facet) [symbolic]
|
|
// CHECK:STDOUT: %.44d: type = fn_type_with_self_type %Y.WithSelf.YY.type.5a5, %Y.facet [symbolic]
|
|
// CHECK:STDOUT: %impl.elem0: %.44d = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic]
|
|
// CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @Y.WithSelf.YY(%T.as_type, %Y.facet) [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @Z {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d87]
|
|
// CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %Z.WithSelf.Self.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.as_type.impls.Y.type.require [concrete] {
|
|
// CHECK:STDOUT: require %Self.as_type.loc9_18.1 impls %Y.type.loc9_30.1
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.as_type.loc9_18.1: type = facet_access_type @Z.%Self [symbolic = %Self.as_type.loc9_18.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Y.ref: %Y.type.cb4 = name_ref Y, file.%Y.decl [concrete = constants.%Y.generic]
|
|
// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc9_30: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_18.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %.loc9: type = converted %Self.ref, %Self.as_type.loc9_30 [symbolic = %Self.as_type.loc9_18.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Y.type.loc9_30.1: type = facet_type <@Y, @Y(constants.%Self.as_type)> [symbolic = %Y.type.loc9_30.2 (constants.%Y.type.f41)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %.loc9: type = specific_constant @Z.WithSelf.Self.as_type.impls.Y.type.require.%Y.type.loc9_30.1, @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%Self.d87) [symbolic = %Y.type (constants.%Y.type.f41)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .YY = <poisoned>
|
|
// CHECK:STDOUT: extend @Z.WithSelf.%.loc9
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: @Z.WithSelf.Self.as_type.impls.Y.type.require {
|
|
// CHECK:STDOUT: require @Z.WithSelf.Self.as_type.impls.Y.type.require.%Self.as_type.loc9_18.1 impls @Z.WithSelf.Self.as_type.impls.Y.type.require.%Y.type.loc9_30.1
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Y.type.require(@Z.%Self: %Z.type) {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc9_18.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_18.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Y.type.loc9_30.2: type = facet_type <@Y, @Y(%Self.as_type.loc9_18.2)> [symbolic = %Y.type.loc9_30.2 (constants.%Y.type.f41)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic fn @F(%T.loc13_15.2: %Z.type) {
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%T.as_type.loc13_23.1) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.0ce)]
|
|
// CHECK:STDOUT: %assoc0: @F.%Y.assoc_type (%Y.assoc_type.0ce) = assoc_entity element0, @Y.WithSelf.%Y.WithSelf.YY.decl [symbolic = %assoc0 (constants.%assoc0.cc2)]
|
|
// CHECK:STDOUT: %Y.type.loc15: type = facet_type <@Y, @Y(%T.as_type.loc13_23.1)> [symbolic = %Y.type.loc15 (constants.%Y.type.40d)]
|
|
// CHECK:STDOUT: %Y.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc13_15.1, @Y, @Y(%T.as_type.loc13_23.1) [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)]
|
|
// CHECK:STDOUT: %Y.facet.loc15: @F.%Y.type.loc15 (%Y.type.40d) = facet_value %T.as_type.loc13_23.1, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.type: type = fn_type @Y.WithSelf.YY, @Y.WithSelf(%T.as_type.loc13_23.1, %Y.facet.loc15) [symbolic = %Y.WithSelf.YY.type (constants.%Y.WithSelf.YY.type.5a5)]
|
|
// CHECK:STDOUT: %.loc15_4.3: type = fn_type_with_self_type %Y.WithSelf.YY.type, %Y.facet.loc15 [symbolic = %.loc15_4.3 (constants.%.44d)]
|
|
// CHECK:STDOUT: %impl.elem0.loc15_4.2: @F.%.loc15_4.3 (%.44d) = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc15_4.2: <specific function> = specific_impl_function %impl.elem0.loc15_4.2, @Y.WithSelf.YY(%T.as_type.loc13_23.1, %Y.facet.loc15) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT: %require_complete.loc16: <witness> = require_complete_type %Y.type.loc15 [symbolic = %require_complete.loc16 (constants.%require_complete.4ae)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc13_23.1 (%T.as_type)) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %T.ref.loc15: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.f45)]
|
|
// CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)]
|
|
// CHECK:STDOUT: %.loc15_4.1: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)]
|
|
// CHECK:STDOUT: %.loc15_4.2: @F.%Y.assoc_type (%Y.assoc_type.0ce) = specific_constant @Y.WithSelf.%assoc0.loc4_10.1, @Y.WithSelf(constants.%T.as_type, constants.%T.f45) [symbolic = %assoc0 (constants.%assoc0.cc2)]
|
|
// CHECK:STDOUT: %YY.ref.loc15: @F.%Y.assoc_type (%Y.assoc_type.0ce) = name_ref YY, %.loc15_4.2 [symbolic = %assoc0 (constants.%assoc0.cc2)]
|
|
// CHECK:STDOUT: %impl.elem0.loc15_4.1: @F.%.loc15_4.3 (%.44d) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc15_4.1: <specific function> = specific_impl_function %impl.elem0.loc15_4.1, @Y.WithSelf.YY(constants.%T.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.call.loc15: init %empty_tuple.type = call %specific_impl_fn.loc15_4.1()
|
|
// CHECK:STDOUT: %T.ref.loc16_3: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.f45)]
|
|
// CHECK:STDOUT: %Y.ref: %Y.type.cb4 = name_ref Y, file.%Y.decl [concrete = constants.%Y.generic]
|
|
// CHECK:STDOUT: %T.ref.loc16_8: %Z.type = name_ref T, %T.loc13_15.2 [symbolic = %T.loc13_15.1 (constants.%T.f45)]
|
|
// CHECK:STDOUT: %T.as_type.loc16_9: type = facet_access_type %T.ref.loc16_8 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)]
|
|
// CHECK:STDOUT: %.loc16_9: type = converted %T.ref.loc16_8, %T.as_type.loc16_9 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)]
|
|
// CHECK:STDOUT: %Y.type.loc16: type = facet_type <@Y, @Y(constants.%T.as_type)> [symbolic = %Y.type.loc15 (constants.%Y.type.40d)]
|
|
// CHECK:STDOUT: %.loc16_10: @F.%Y.assoc_type (%Y.assoc_type.0ce) = specific_constant @Y.WithSelf.%assoc0.loc4_10.1, @Y.WithSelf(constants.%T.as_type, constants.%Self.624) [symbolic = %assoc0 (constants.%assoc0.cc2)]
|
|
// CHECK:STDOUT: %YY.ref.loc16: @F.%Y.assoc_type (%Y.assoc_type.0ce) = name_ref YY, %.loc16_10 [symbolic = %assoc0 (constants.%assoc0.cc2)]
|
|
// CHECK:STDOUT: %T.as_type.loc16_4: type = facet_access_type %T.ref.loc16_3 [symbolic = %T.as_type.loc13_23.1 (constants.%T.as_type)]
|
|
// CHECK:STDOUT: %Y.facet.loc16: @F.%Y.type.loc15 (%Y.type.40d) = facet_value %T.as_type.loc16_4, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)]
|
|
// CHECK:STDOUT: %.loc16_4: @F.%Y.type.loc15 (%Y.type.40d) = converted %T.ref.loc16_3, %Y.facet.loc16 [symbolic = %Y.facet.loc15 (constants.%Y.facet)]
|
|
// CHECK:STDOUT: %impl.elem0.loc16: @F.%.loc15_4.3 (%.44d) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc16: <specific function> = specific_impl_function %impl.elem0.loc16, @Y.WithSelf.YY(constants.%T.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.call.loc16: init %empty_tuple.type = call %specific_impl_fn.loc16()
|
|
// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc13_23.1 (%T.as_type) = name_ref t, %t
|
|
// CHECK:STDOUT: %.loc18: @F.%Y.assoc_type (%Y.assoc_type.0ce) = specific_constant @Y.WithSelf.%assoc0.loc4_10.1, @Y.WithSelf(constants.%T.as_type, constants.%T.f45) [symbolic = %assoc0 (constants.%assoc0.cc2)]
|
|
// CHECK:STDOUT: %YY.ref.loc18: @F.%Y.assoc_type (%Y.assoc_type.0ce) = name_ref YY, %.loc18 [symbolic = %assoc0 (constants.%assoc0.cc2)]
|
|
// CHECK:STDOUT: %impl.elem0.loc18: @F.%.loc15_4.3 (%.44d) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)]
|
|
// CHECK:STDOUT: %specific_impl_fn.loc18: <specific function> = specific_impl_function %impl.elem0.loc18, @Y.WithSelf.YY(constants.%T.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)]
|
|
// CHECK:STDOUT: %Y.WithSelf.YY.call.loc18: init %empty_tuple.type = call %specific_impl_fn.loc18()
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.d87) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
|
|
// CHECK:STDOUT: %Y.type => constants.%Y.type.f41
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.097
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%Self.d87) {
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type.loc9_18.2 => constants.%Self.as_type
|
|
// CHECK:STDOUT: %Y.type.loc9_30.2 => constants.%Y.type.f41
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @F(constants.%T.f45) {
|
|
// CHECK:STDOUT: %T.patt.loc13_15.2 => constants.%T.patt.3a0
|
|
// CHECK:STDOUT: %T.loc13_15.1 => constants.%T.f45
|
|
// CHECK:STDOUT: %T.as_type.loc13_23.1 => constants.%T.as_type
|
|
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.86a
|
|
// CHECK:STDOUT: %t.param_patt.loc13_21.2 => constants.%t.param_patt
|
|
// CHECK:STDOUT: %t.patt.loc13_21.2 => constants.%t.patt
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%T.f45) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Self => constants.%T.f45
|
|
// CHECK:STDOUT: %Self.as_type => constants.%T.as_type
|
|
// CHECK:STDOUT: %Y.type => constants.%Y.type.40d
|
|
// CHECK:STDOUT: %require_complete => constants.%require_complete.4ae
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%T.f45) {
|
|
// CHECK:STDOUT: %Self => constants.%T.f45
|
|
// CHECK:STDOUT: %Self.as_type.loc9_18.2 => constants.%T.as_type
|
|
// CHECK:STDOUT: %Y.type.loc9_30.2 => constants.%Y.type.40d
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- implicit_self_impls.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %Self.d87: %Z.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.d87 [symbolic]
|
|
// CHECK:STDOUT: %T: %Z.type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @Z {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d87]
|
|
// CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %Z.WithSelf.Self.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.as_type.impls.Y.type.require [concrete] {
|
|
// CHECK:STDOUT: require %Self.as_type.loc9_11.1 impls %Y.ref
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.as_type.loc9_11.1: type = facet_access_type @Z.%Self [symbolic = %Self.as_type.loc9_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: @Z.WithSelf.Self.as_type.impls.Y.type.require {
|
|
// CHECK:STDOUT: require @Z.WithSelf.Self.as_type.impls.Y.type.require.%Self.as_type.loc9_11.1 impls @Z.WithSelf.Self.as_type.impls.Y.type.require.%Y.ref
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Y.type.require(@Z.%Self: %Z.type) {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc9_11.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.d87) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%Self.d87) {
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type.loc9_11.2 => constants.%Self.as_type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%T) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%T) {
|
|
// CHECK:STDOUT: %Self => constants.%T
|
|
// CHECK:STDOUT: %Self.as_type.loc9_11.2 => constants.%T.as_type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- explicit_self_impls.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %Self.d87: %Z.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.d87 [symbolic]
|
|
// CHECK:STDOUT: %T: %Z.type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @Z {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d87]
|
|
// CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %Z.WithSelf.Self.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.as_type.impls.Y.type.require [concrete] {
|
|
// CHECK:STDOUT: require %.loc9 impls %Y.ref
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc9_11.1: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %.loc9: type = converted %Self.ref, %Self.as_type.loc9_11.1 [symbolic = %Self.as_type.loc9_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: @Z.WithSelf.Self.as_type.impls.Y.type.require {
|
|
// CHECK:STDOUT: require @Z.WithSelf.Self.as_type.impls.Y.type.require.%.loc9 impls @Z.WithSelf.Self.as_type.impls.Y.type.require.%Y.ref
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Y.type.require(@Z.%Self: %Z.type) {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc9_11.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.d87) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%Self.d87) {
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type.loc9_11.2 => constants.%Self.as_type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%T) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y.type.require(constants.%T) {
|
|
// CHECK:STDOUT: %Self => constants.%T
|
|
// CHECK:STDOUT: %Self.as_type.loc9_11.2 => constants.%T.as_type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- explicit_self_specific_impls.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
|
|
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %Self.d87: %Z.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.d87 [symbolic]
|
|
// CHECK:STDOUT: %C.e83: type = class_type @C, @C(%Self.as_type) [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @Z {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d87]
|
|
// CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %Z.WithSelf.C.impls.Y.type.require.decl = require_decl @Z.WithSelf.C.impls.Y.type.require [concrete] {
|
|
// CHECK:STDOUT: require %C.loc9_17.1 impls %Y.ref
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
|
// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc9_17.1: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_17.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %.loc9: type = converted %Self.ref, %Self.as_type.loc9_17.1 [symbolic = %Self.as_type.loc9_17.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %C.loc9_17.1: type = class_type @C, @C(constants.%Self.as_type) [symbolic = %C.loc9_17.2 (constants.%C.e83)]
|
|
// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .C = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .C = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: @Z.WithSelf.C.impls.Y.type.require {
|
|
// CHECK:STDOUT: require @Z.WithSelf.C.impls.Y.type.require.%C.loc9_17.1 impls @Z.WithSelf.C.impls.Y.type.require.%Y.ref
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic require @Z.WithSelf.C.impls.Y.type.require(@Z.%Self: %Z.type) {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc9_17.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc9_17.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %C.loc9_17.2: type = class_type @C, @C(%Self.as_type.loc9_17.2) [symbolic = %C.loc9_17.2 (constants.%C.e83)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.d87) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.C.impls.Y.type.require(constants.%Self.d87) {
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type.loc9_17.2 => constants.%Self.as_type
|
|
// CHECK:STDOUT: %C.loc9_17.2 => constants.%C.e83
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- require_impls_where.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
|
|
// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
|
|
// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.WithSelf.%Y1 [concrete]
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %Self.d87: %Z.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.d87 [symbolic]
|
|
// CHECK:STDOUT: %.Self.frozen: %Y.type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen [symbolic_self]
|
|
// CHECK:STDOUT: %Y.lookup_impl_witness.94c: <witness> = lookup_impl_witness %.Self.frozen, @Y [symbolic_self]
|
|
// CHECK:STDOUT: %impl.elem0.74a: type = impl_witness_access %Y.lookup_impl_witness.94c, element0 [symbolic_self]
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
|
// CHECK:STDOUT: %.Self: %Y.type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %Y.lookup_impl_witness.9c7: <witness> = lookup_impl_witness %.Self, @Y [symbolic_self]
|
|
// CHECK:STDOUT: %impl.elem0.591: type = impl_witness_access %Y.lookup_impl_witness.9c7, element0 [symbolic_self]
|
|
// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y where %impl.elem0.591 = %empty_tuple.type> [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @Z {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d87]
|
|
// CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %Z.WithSelf.Self.as_type.impls.Y_where.type.require.decl = require_decl @Z.WithSelf.Self.as_type.impls.Y_where.type.require [concrete] {
|
|
// CHECK:STDOUT: require %Self.as_type.loc7_11.1 impls %.loc7_19
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.as_type.loc7_11.1: type = facet_access_type @Z.%Self [symbolic = %Self.as_type.loc7_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
|
|
// CHECK:STDOUT: %.Self.frozen: %Y.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete]
|
|
// CHECK:STDOUT: %.Self.ref: %Y.type = name_ref .Self, %.Self.frozen [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type]
|
|
// CHECK:STDOUT: %.loc7_25: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type]
|
|
// CHECK:STDOUT: %Y1.ref: %Y.assoc_type = name_ref Y1, @Y1.%assoc0 [concrete = constants.%assoc0]
|
|
// CHECK:STDOUT: %impl.elem0.loc7_25.1: type = impl_witness_access constants.%Y.lookup_impl_witness.94c, element0 [symbolic_self = constants.%impl.elem0.74a]
|
|
// CHECK:STDOUT: %.loc7_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
|
// CHECK:STDOUT: %.loc7_32.2: type = converted %.loc7_32.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
|
// CHECK:STDOUT: %rewrite.loc7_29.1 = requirement_rewrite %impl.elem0.loc7_25.1, %.loc7_32.2 [concrete]
|
|
// CHECK:STDOUT: %impl.elem0.loc7_25.2: type = impl_witness_access constants.%Y.lookup_impl_witness.9c7, element0 [symbolic_self = constants.%impl.elem0.591]
|
|
// CHECK:STDOUT: %rewrite.loc7_29.2 = requirement_rewrite %impl.elem0.loc7_25.2, %.loc7_32.2 [concrete]
|
|
// CHECK:STDOUT: %.loc7_19: type = where_expr [concrete = constants.%Y_where.type] {
|
|
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete]
|
|
// CHECK:STDOUT: %rewrite.loc7_29.2 = requirement_rewrite %impl.elem0.loc7_25.2, %.loc7_32.2 [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: @Z.WithSelf.Self.as_type.impls.Y_where.type.require {
|
|
// CHECK:STDOUT: require @Z.WithSelf.Self.as_type.impls.Y_where.type.require.%Self.as_type.loc7_11.1 impls @Z.WithSelf.Self.as_type.impls.Y_where.type.require.%.loc7_19
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc7_11.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc7_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.d87) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y_where.type.require(constants.%Self.d87) {
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type.loc7_11.2 => constants.%Self.as_type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_require_impls_incomplete_constraint.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @Z {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
|
|
// CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%Self) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_require_impls_without_self.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %.Self.frozen.197: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
|
|
// CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %Z.type.8e1: type = generic_named_constaint_type @Z [concrete]
|
|
// CHECK:STDOUT: %empty_struct: %Z.type.8e1 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %Z.type.d68: type = facet_type <@Z, @Z(%T)> [symbolic]
|
|
// CHECK:STDOUT: %Self.22b: %Z.type.d68 = symbolic_binding Self, 1 [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %Z.decl: %Z.type.8e1 = constraint_decl @Z [concrete = constants.%empty_struct] {
|
|
// CHECK:STDOUT: %T.patt.loc8_15.1: %pattern_type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)]
|
|
// CHECK:STDOUT: } {
|
|
// 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.197]
|
|
// 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: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic constraint @Z(%T.loc8_15.2: type) {
|
|
// CHECK:STDOUT: %T.patt.loc8_15.2: %pattern_type = 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:
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc8_15.1)> [symbolic = %Z.type (constants.%Z.type.d68)]
|
|
// CHECK:STDOUT: %Self.loc8_23.2: @Z.%Z.type (%Z.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc8_23.2 (constants.%Self.22b)]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint {
|
|
// CHECK:STDOUT: %Self.loc8_23.1: @Z.%Z.type (%Z.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc8_23.2 (constants.%Self.22b)]
|
|
// CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self.loc8_23.1
|
|
// CHECK:STDOUT: .T = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .T = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z(constants.%T) {
|
|
// CHECK:STDOUT: %T.patt.loc8_15.2 => constants.%T.patt
|
|
// CHECK:STDOUT: %T.loc8_15.1 => constants.%T
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%T, constants.%Self.22b) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- require_self_in_requirement.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
|
|
// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
|
|
// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.WithSelf.%Y1 [concrete]
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %Self.d87: %Z.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.d87 [symbolic]
|
|
// CHECK:STDOUT: %.Self.frozen: %Y.type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen [symbolic_self]
|
|
// CHECK:STDOUT: %Y.lookup_impl_witness.94c: <witness> = lookup_impl_witness %.Self.frozen, @Y [symbolic_self]
|
|
// CHECK:STDOUT: %impl.elem0.74a: type = impl_witness_access %Y.lookup_impl_witness.94c, element0 [symbolic_self]
|
|
// CHECK:STDOUT: %.Self: %Y.type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %Y.lookup_impl_witness.9c7: <witness> = lookup_impl_witness %.Self, @Y [symbolic_self]
|
|
// CHECK:STDOUT: %impl.elem0.591: type = impl_witness_access %Y.lookup_impl_witness.9c7, element0 [symbolic_self]
|
|
// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y where %impl.elem0.591 = %Self.as_type> [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @Z {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d87]
|
|
// CHECK:STDOUT: %Z.WithSelf.decl = constraint_with_self_decl @Z [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %Z.WithSelf.Self.as_type.impls.Y_where.type.require.decl = require_decl @Z.WithSelf.Self.as_type.impls.Y_where.type.require [concrete] {
|
|
// CHECK:STDOUT: require %Self.as_type.loc10_11.1 impls %.loc10_19
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.1: type = facet_access_type @Z.%Self [symbolic = %Self.as_type.loc10_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
|
|
// CHECK:STDOUT: %.Self.frozen: %Y.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete]
|
|
// CHECK:STDOUT: %.Self.ref: %Y.type = name_ref .Self, %.Self.frozen [symbolic_self = constants.%.Self.frozen]
|
|
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.frozen.as_type]
|
|
// CHECK:STDOUT: %.loc10_25: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.frozen.as_type]
|
|
// CHECK:STDOUT: %Y1.ref: %Y.assoc_type = name_ref Y1, @Y1.%assoc0 [concrete = constants.%assoc0]
|
|
// CHECK:STDOUT: %impl.elem0.loc10_25.1: type = impl_witness_access constants.%Y.lookup_impl_witness.94c, element0 [symbolic_self = constants.%impl.elem0.74a]
|
|
// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc10_31: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc10_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %.loc10_31: type = converted %Self.ref, %Self.as_type.loc10_31 [symbolic = %Self.as_type.loc10_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %rewrite.loc10_29.1 = requirement_rewrite %impl.elem0.loc10_25.1, %.loc10_31 [concrete]
|
|
// CHECK:STDOUT: %impl.elem0.loc10_25.2: type = impl_witness_access constants.%Y.lookup_impl_witness.9c7, element0 [symbolic_self = constants.%impl.elem0.591]
|
|
// CHECK:STDOUT: %rewrite.loc10_29.2 = requirement_rewrite %impl.elem0.loc10_25.2, %.loc10_31 [concrete]
|
|
// CHECK:STDOUT: %.loc10_19: type = where_expr [symbolic = %Y_where.type (constants.%Y_where.type)] {
|
|
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Y.ref [concrete]
|
|
// CHECK:STDOUT: %rewrite.loc10_29.2 = requirement_rewrite %impl.elem0.loc10_25.2, %.loc10_31 [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: @Z.WithSelf.Self.as_type.impls.Y_where.type.require {
|
|
// CHECK:STDOUT: require @Z.WithSelf.Self.as_type.impls.Y_where.type.require.%Self.as_type.loc10_11.1 impls @Z.WithSelf.Self.as_type.impls.Y_where.type.require.%.loc10_19
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic require @Z.WithSelf.Self.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) {
|
|
// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc10_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Y_where.type: type = facet_type <@Y where constants.%impl.elem0.591 = %Self.as_type.loc10_11.2> [symbolic = %Y_where.type (constants.%Y_where.type)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.d87) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @Z.WithSelf.Self.as_type.impls.Y_where.type.require(constants.%Self.d87) {
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.2 => constants.%Self.as_type
|
|
// CHECK:STDOUT: %Y_where.type => constants.%Y_where.type
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- require_with_period_self_impls.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %type: type = facet_type <type> [concrete]
|
|
// CHECK:STDOUT: %Y.type.cb4: type = generic_interface_type @Y [concrete]
|
|
// CHECK:STDOUT: %Y.generic: %Y.type.cb4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %N.type: type = facet_type <@N> [concrete]
|
|
// CHECK:STDOUT: %Self.d87: %N.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type.138: type = facet_access_type %Self.d87 [symbolic]
|
|
// CHECK:STDOUT: %.Self.frozen.7b7: %Z.type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %.Self.frozen.as_type.e08: type = facet_access_type %.Self.frozen.7b7 [symbolic_self]
|
|
// CHECK:STDOUT: %Y.type.d83: type = facet_type <@Y, @Y(%.Self.frozen.as_type.e08)> [symbolic_self]
|
|
// CHECK:STDOUT: %.Self.9b4: %Z.type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %.Self.as_type.179: type = facet_access_type %.Self.9b4 [symbolic_self]
|
|
// CHECK:STDOUT: %Y.type.c15: type = facet_type <@Y, @Y(%.Self.as_type.179)> [symbolic_self]
|
|
// CHECK:STDOUT: %Z_where.type.794: type = facet_type <@Z where .Self impls @Y, @Y(%.Self.as_type.179)> [concrete]
|
|
// CHECK:STDOUT: %Z_where.type.0d5: type = facet_type <@Z where .Self impls @Y, @Y(%Self.as_type.138)> [symbolic]
|
|
// CHECK:STDOUT: %.Self.e0b: %type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %.Self.as_type.007: type = facet_access_type %.Self.e0b [symbolic_self]
|
|
// CHECK:STDOUT: %facet_type.eeb: type = facet_type <@Z & @Y, @Y(%.Self.as_type.007)> [symbolic_self]
|
|
// CHECK:STDOUT: %T.c35: %facet_type.eeb = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.c35 [symbolic]
|
|
// CHECK:STDOUT: %Z_where.type.eca: type = facet_type <@Z where .Self impls @Y, @Y(%T.as_type)> [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %N.decl: type = constraint_decl @N [concrete = constants.%N.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @N {
|
|
// CHECK:STDOUT: %Self: %N.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d87]
|
|
// CHECK:STDOUT: %N.WithSelf.decl = constraint_with_self_decl @N [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %N.WithSelf.Self.as_type.impls.Z_where.type.require.decl = require_decl @N.WithSelf.Self.as_type.impls.Z_where.type.require [concrete] {
|
|
// CHECK:STDOUT: require %Self.as_type.loc10_11.1 impls %Z_where.type.loc10_19.2
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.1: type = facet_access_type @N.%Self [symbolic = %Self.as_type.loc10_11.2 (constants.%Self.as_type.138)]
|
|
// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
|
|
// CHECK:STDOUT: %.Self.frozen: %Z.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.7b7]
|
|
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.ref [concrete]
|
|
// CHECK:STDOUT: %.Self.ref.loc10_25.1: %Z.type = name_ref .Self, %.Self.frozen [symbolic_self = constants.%.Self.frozen.7b7]
|
|
// CHECK:STDOUT: %Y.ref: %Y.type.cb4 = name_ref Y, file.%Y.decl [concrete = constants.%Y.generic]
|
|
// CHECK:STDOUT: %.Self.ref.loc10_39: %Z.type = name_ref .Self, %.Self.frozen [symbolic_self = constants.%.Self.frozen.7b7]
|
|
// CHECK:STDOUT: %.Self.as_type.loc10_44: type = facet_access_type %.Self.ref.loc10_39 [symbolic_self = constants.%.Self.frozen.as_type.e08]
|
|
// CHECK:STDOUT: %.loc10_44: type = converted %.Self.ref.loc10_39, %.Self.as_type.loc10_44 [symbolic_self = constants.%.Self.frozen.as_type.e08]
|
|
// CHECK:STDOUT: %Y.type.loc10_44.1: type = facet_type <@Y, @Y(constants.%.Self.frozen.as_type.e08)> [symbolic_self = constants.%Y.type.d83]
|
|
// CHECK:STDOUT: %.Self.as_type.loc10_25.1: type = facet_access_type %.Self.ref.loc10_25.1 [symbolic_self = constants.%.Self.frozen.as_type.e08]
|
|
// CHECK:STDOUT: %.loc10_25.1: type = converted %.Self.ref.loc10_25.1, %.Self.as_type.loc10_25.1 [symbolic_self = constants.%.Self.frozen.as_type.e08]
|
|
// CHECK:STDOUT: %impls.loc10_31.1 = requirement_impls %.loc10_25.1, %Y.type.loc10_44.1 [concrete]
|
|
// CHECK:STDOUT: %.Self: %Z.type = symbolic_binding .Self [symbolic_self = constants.%.Self.9b4]
|
|
// CHECK:STDOUT: %.Self.ref.loc10_25.2: %Z.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.9b4]
|
|
// CHECK:STDOUT: %.Self.as_type.loc10_25.2: type = facet_access_type %.Self.ref.loc10_25.2 [symbolic_self = constants.%.Self.as_type.179]
|
|
// CHECK:STDOUT: %.loc10_25.2: type = converted %.Self.ref.loc10_25.1, %.Self.as_type.loc10_25.2 [symbolic_self = constants.%.Self.as_type.179]
|
|
// CHECK:STDOUT: %Y.type.loc10_44.2: type = facet_type <@Y, @Y(constants.%.Self.as_type.179)> [symbolic_self = constants.%Y.type.c15]
|
|
// CHECK:STDOUT: %impls.loc10_31.2 = requirement_impls %.loc10_25.2, %Y.type.loc10_44.2 [concrete]
|
|
// CHECK:STDOUT: %.loc10_19: type = where_expr [concrete = constants.%Z_where.type.794] {
|
|
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.ref [concrete]
|
|
// CHECK:STDOUT: %impls.loc10_31.2 = requirement_impls %.loc10_25.2, %Y.type.loc10_44.2 [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.1: type = facet_type <@Z where .Self impls @Y, @Y(constants.%Self.as_type.138)> [symbolic = %Z_where.type.loc10_19.3 (constants.%Z_where.type.0d5)]
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.2: type = facet_type <@Z where .Self impls @Y, @Y(constants.%Self.as_type.138)> [symbolic = %Z_where.type.loc10_19.3 (constants.%Z_where.type.0d5)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Z = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .Z = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: @N.WithSelf.Self.as_type.impls.Z_where.type.require {
|
|
// CHECK:STDOUT: require @N.WithSelf.Self.as_type.impls.Z_where.type.require.%Self.as_type.loc10_11.1 impls @N.WithSelf.Self.as_type.impls.Z_where.type.require.%Z_where.type.loc10_19.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic require @N.WithSelf.Self.as_type.impls.Z_where.type.require(@N.%Self: %N.type) {
|
|
// CHECK:STDOUT: %Self: %N.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc10_11.2 (constants.%Self.as_type.138)]
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.3: type = facet_type <@Z where .Self impls @Y, @Y(%Self.as_type.loc10_11.2)> [symbolic = %Z_where.type.loc10_19.3 (constants.%Z_where.type.0d5)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @N.WithSelf(constants.%Self.d87) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @N.WithSelf.Self.as_type.impls.Z_where.type.require(constants.%Self.d87) {
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.2 => constants.%Self.as_type.138
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.3 => constants.%Z_where.type.0d5
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @N.WithSelf(constants.%T.c35) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @N.WithSelf.Self.as_type.impls.Z_where.type.require(constants.%T.c35) {
|
|
// CHECK:STDOUT: %Self => constants.%T.c35
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.2 => constants.%T.as_type
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.3 => constants.%Z_where.type.eca
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- require_with_specific_period_self.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
|
|
// CHECK:STDOUT: %Y.type.cb4: type = generic_interface_type @Y [concrete]
|
|
// CHECK:STDOUT: %Y.generic: %Y.type.cb4 = struct_value () [concrete]
|
|
// CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
|
|
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
|
|
// CHECK:STDOUT: %N.type: type = facet_type <@N> [concrete]
|
|
// CHECK:STDOUT: %Self.d87: %N.type = symbolic_binding Self, 0 [symbolic]
|
|
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.d87 [symbolic]
|
|
// CHECK:STDOUT: %.Self.frozen.7b7: %Z.type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.7b7 [symbolic_self]
|
|
// CHECK:STDOUT: %C.6bd: type = class_type @C, @C(%.Self.frozen.as_type) [symbolic_self]
|
|
// CHECK:STDOUT: %Y.type.d83: type = facet_type <@Y, @Y(%.Self.frozen.as_type)> [symbolic_self]
|
|
// CHECK:STDOUT: %.Self: %Z.type = symbolic_binding .Self [symbolic_self]
|
|
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
|
// CHECK:STDOUT: %C.ae2: type = class_type @C, @C(%.Self.as_type) [symbolic_self]
|
|
// CHECK:STDOUT: %Y.type.c15: type = facet_type <@Y, @Y(%.Self.as_type)> [symbolic_self]
|
|
// CHECK:STDOUT: %Z_where.type.a0f3c6.1: type = facet_type <@Z where %C.ae2 impls @Y, @Y(%.Self.as_type)> [concrete]
|
|
// CHECK:STDOUT: %C.e83: type = class_type @C, @C(%Self.as_type) [symbolic]
|
|
// CHECK:STDOUT: %Z_where.type.a0f3c6.2: type = facet_type <@Z where %C.e83 impls @Y, @Y(%Self.as_type)> [symbolic]
|
|
// CHECK:STDOUT: %T.013: %Z.type = symbolic_binding T, 0 [symbolic]
|
|
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.013 [symbolic]
|
|
// CHECK:STDOUT: %C.7bd: type = class_type @C, @C(%T.as_type) [symbolic]
|
|
// CHECK:STDOUT: %Z_where.type.a0f3c6.3: type = facet_type <@Z where %C.7bd impls @Y, @Y(%T.as_type)> [symbolic]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: %N.decl: type = constraint_decl @N [concrete = constants.%N.type] {} {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constraint @N {
|
|
// CHECK:STDOUT: %Self: %N.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d87]
|
|
// CHECK:STDOUT: %N.WithSelf.decl = constraint_with_self_decl @N [concrete]
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !with Self:
|
|
// CHECK:STDOUT: %N.WithSelf.Self.as_type.impls.Z_where.type.require.decl = require_decl @N.WithSelf.Self.as_type.impls.Z_where.type.require [concrete] {
|
|
// CHECK:STDOUT: require %Self.as_type.loc10_11.1 impls %Z_where.type.loc10_19.2
|
|
// CHECK:STDOUT: } {
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.1: type = facet_access_type @N.%Self [symbolic = %Self.as_type.loc10_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type]
|
|
// CHECK:STDOUT: %.Self.frozen: %Z.type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen.7b7]
|
|
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.ref [concrete]
|
|
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
|
// CHECK:STDOUT: %.Self.ref.loc10_27: %Z.type = name_ref .Self, %.Self.frozen [symbolic_self = constants.%.Self.frozen.7b7]
|
|
// CHECK:STDOUT: %.Self.as_type.loc10_32: type = facet_access_type %.Self.ref.loc10_27 [symbolic_self = constants.%.Self.frozen.as_type]
|
|
// CHECK:STDOUT: %.loc10_32: type = converted %.Self.ref.loc10_27, %.Self.as_type.loc10_32 [symbolic_self = constants.%.Self.frozen.as_type]
|
|
// CHECK:STDOUT: %C.loc10_32.1: type = class_type @C, @C(constants.%.Self.frozen.as_type) [symbolic_self = constants.%C.6bd]
|
|
// CHECK:STDOUT: %Y.ref: %Y.type.cb4 = name_ref Y, file.%Y.decl [concrete = constants.%Y.generic]
|
|
// CHECK:STDOUT: %.Self.ref.loc10_42: %Z.type = name_ref .Self, %.Self.frozen [symbolic_self = constants.%.Self.frozen.7b7]
|
|
// CHECK:STDOUT: %.Self.as_type.loc10_47: type = facet_access_type %.Self.ref.loc10_42 [symbolic_self = constants.%.Self.frozen.as_type]
|
|
// CHECK:STDOUT: %.loc10_47: type = converted %.Self.ref.loc10_42, %.Self.as_type.loc10_47 [symbolic_self = constants.%.Self.frozen.as_type]
|
|
// CHECK:STDOUT: %Y.type.loc10_47.1: type = facet_type <@Y, @Y(constants.%.Self.frozen.as_type)> [symbolic_self = constants.%Y.type.d83]
|
|
// CHECK:STDOUT: %impls.loc10_34.1 = requirement_impls %C.loc10_32.1, %Y.type.loc10_47.1 [concrete]
|
|
// CHECK:STDOUT: %C.loc10_32.2: type = class_type @C, @C(constants.%.Self.as_type) [symbolic_self = constants.%C.ae2]
|
|
// CHECK:STDOUT: %Y.type.loc10_47.2: type = facet_type <@Y, @Y(constants.%.Self.as_type)> [symbolic_self = constants.%Y.type.c15]
|
|
// CHECK:STDOUT: %impls.loc10_34.2 = requirement_impls %C.loc10_32.2, %Y.type.loc10_47.2 [concrete]
|
|
// CHECK:STDOUT: %.loc10_19: type = where_expr [concrete = constants.%Z_where.type.a0f3c6.1] {
|
|
// CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Z.ref [concrete]
|
|
// CHECK:STDOUT: %impls.loc10_34.2 = requirement_impls %C.loc10_32.2, %Y.type.loc10_47.2 [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.1: type = facet_type <@Z where constants.%C.e83 impls @Y, @Y(constants.%Self.as_type)> [symbolic = %Z_where.type.loc10_19.3 (constants.%Z_where.type.a0f3c6.2)]
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.2: type = facet_type <@Z where constants.%C.e83 impls @Y, @Y(constants.%Self.as_type)> [symbolic = %Z_where.type.loc10_19.3 (constants.%Z_where.type.a0f3c6.2)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !members:
|
|
// CHECK:STDOUT: .Self = %Self
|
|
// CHECK:STDOUT: .Z = <poisoned>
|
|
// CHECK:STDOUT: .C = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT: .Z = <poisoned>
|
|
// CHECK:STDOUT: .C = <poisoned>
|
|
// CHECK:STDOUT: .Y = <poisoned>
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: !requires:
|
|
// CHECK:STDOUT: @N.WithSelf.Self.as_type.impls.Z_where.type.require {
|
|
// CHECK:STDOUT: require @N.WithSelf.Self.as_type.impls.Z_where.type.require.%Self.as_type.loc10_11.1 impls @N.WithSelf.Self.as_type.impls.Z_where.type.require.%Z_where.type.loc10_19.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: generic require @N.WithSelf.Self.as_type.impls.Z_where.type.require(@N.%Self: %N.type) {
|
|
// CHECK:STDOUT: %Self: %N.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d87)]
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.2: type = facet_access_type %Self [symbolic = %Self.as_type.loc10_11.2 (constants.%Self.as_type)]
|
|
// CHECK:STDOUT: %C.loc10_19: type = class_type @C, @C(%Self.as_type.loc10_11.2) [symbolic = %C.loc10_19 (constants.%C.e83)]
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.3: type = facet_type <@Z where %C.loc10_19 impls @Y, @Y(%Self.as_type.loc10_11.2)> [symbolic = %Z_where.type.loc10_19.3 (constants.%Z_where.type.a0f3c6.2)]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @N.WithSelf(constants.%Self.d87) {}
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @N.WithSelf.Self.as_type.impls.Z_where.type.require(constants.%Self.d87) {
|
|
// CHECK:STDOUT: %Self => constants.%Self.d87
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.2 => constants.%Self.as_type
|
|
// CHECK:STDOUT: %C.loc10_19 => constants.%C.e83
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.3 => constants.%Z_where.type.a0f3c6.2
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @N.WithSelf(constants.%T.013) {
|
|
// CHECK:STDOUT: !definition:
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: specific @N.WithSelf.Self.as_type.impls.Z_where.type.require(constants.%T.013) {
|
|
// CHECK:STDOUT: %Self => constants.%T.013
|
|
// CHECK:STDOUT: %Self.as_type.loc10_11.2 => constants.%T.as_type
|
|
// CHECK:STDOUT: %C.loc10_19 => constants.%C.7bd
|
|
// CHECK:STDOUT: %Z_where.type.loc10_19.3 => constants.%Z_where.type.a0f3c6.3
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|