Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests for upcoming #5059 and #5060 on member access and finding impl witnesses in facets #5054

Merged
merged 9 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions toolchain/check/testdata/facet/no_prelude/combine.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,16 @@ library "[[@TEST_NAME]]";

import Core;

// Non-instance versions of these tests are in
// .../interface/no_prelude/compound_member_access.carbon.

interface A {
fn G();
fn G[self: Self]();
}

class C {}
impl C as A {
fn G() {}
fn G[self: Self]() {}
}

fn F() {
Expand Down Expand Up @@ -116,13 +119,13 @@ import Core;

interface A {}
interface B {
fn G();
fn G[self: Self]();
}

class C {}
impl C as A {}
impl C as B {
fn G() {}
fn G[self: Self]() {}
}

fn F() {
Expand Down Expand Up @@ -164,10 +167,10 @@ import Core;
interface A {
}
interface B {
fn G();
fn G[self: Self]();
}

fn G[T:! A & B](t: T) {
fn H[T:! A & B](t: T) {
// CHECK:STDERR: fail_todo_generic_combine.carbon:[[@LINE+4]]:3: error: cannot access member of interface `B` in type `T` that does not implement that interface [MissingImplInMemberAccess]
// CHECK:STDERR: t.(B.G)();
// CHECK:STDERR: ^~~~~~~
Expand All @@ -178,26 +181,26 @@ fn G[T:! A & B](t: T) {
class C {}
impl C as A {}
impl C as B {
fn G() {}
fn G[self: Self]() {}
}

fn F() {
// CHECK:STDERR: fail_todo_generic_combine.carbon:[[@LINE+17]]:3: error: semantics TODO: `impl lookup for a FacetType with more than one interface` [SemanticsTodo]
// CHECK:STDERR: G({} as C);
// CHECK:STDERR: H({} as C);
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_todo_generic_combine.carbon:[[@LINE-18]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
// CHECK:STDERR: fn G[T:! A & B](t: T) {
// CHECK:STDERR: fn H[T:! A & B](t: T) {
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
// CHECK:STDERR: fail_todo_generic_combine.carbon:[[@LINE+10]]:3: error: cannot implicitly convert value of type `type` to `A & B` [ImplicitAsConversionFailure]
// CHECK:STDERR: G({} as C);
// CHECK:STDERR: H({} as C);
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_todo_generic_combine.carbon:[[@LINE+7]]:3: note: type `type` does not implement interface `Core.ImplicitAs(A & B)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: G({} as C);
// CHECK:STDERR: H({} as C);
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_todo_generic_combine.carbon:[[@LINE-28]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
// CHECK:STDERR: fn G[T:! A & B](t: T) {
// CHECK:STDERR: fn H[T:! A & B](t: T) {
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
G({} as C);
H({} as C);
}
263 changes: 0 additions & 263 deletions toolchain/check/testdata/impl/compound.carbon

This file was deleted.

Loading