Files
carbon-lang/toolchain/check/testdata/operators/overloaded/binary_op.carbon.tmpl
T
Geoff Romer 57a2715f10 Remove support for addr (#6375)
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.
2025-11-18 19:48:58 +00:00

37 lines
791 B
Cheetah

// 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/full.carbon
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
//
// AUTOUPDATE
HEADER
package User;
class C {};
impl C as Core.INTERFACEWith(C) where .Result = C {
fn Op[self: C](other: C) -> C {
return {};
}
}
impl C as Core.INTERFACEAssignWith(C) {
fn Op[ref self: C](other: C) {}
}
fn TestOp(a: C, b: C) -> C {
//@dump-sem-ir-begin
return a OP b;
//@dump-sem-ir-end
}
fn TestAssign(a: C*, b: C) {
//@dump-sem-ir-begin
*a OP= b;
//@dump-sem-ir-end
}