mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 12:41:06 +01:00
Every test that used `addr` before #6283 should be using `ref` after this PR. In most cases that was done in #6283, but this PR transitions a few that I missed in that first pass. In addition, #6283 cloned the old `addr` tests from `foo.carbon` to `foo_addr.carbon` in order to maintain test coverage during the transition; this PR removes those cloned tests.
26 lines
1.3 KiB
Plaintext
26 lines
1.3 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/interface/fail_todo_generic_default_fn.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_todo_generic_default_fn.carbon
|
|
|
|
interface I(T:! type) {
|
|
// TODO: Use `default` here.
|
|
fn F[ref self: Self]() -> Self*;
|
|
}
|
|
|
|
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+7]]:16: error: duplicate name `F` being declared in the same scope [NameDeclDuplicate]
|
|
// CHECK:STDERR: fn I(T:! type).F[ref self: Self]() -> Self* { return &self; }
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE-6]]:3: note: name is previously declared here [NameDeclPrevious]
|
|
// CHECK:STDERR: fn F[ref self: Self]() -> Self*;
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
fn I(T:! type).F[ref self: Self]() -> Self* { return &self; }
|