Files
carbon-lang/toolchain/check/testdata/operators/overloaded/binary_op.carbon.tmpl
T
Jon Ross-Perkins 3561ab5fae Switch the prelude to using 'export import'. (#3976)
Note, I assume this doesn't affect all the TODOs (like for i32.carbon),
but does cut some things down (and requires updating some tests that
have prelude name conflicts, but I think they were intended to be
updated this way).
2024-05-22 22:55:31 +00:00

29 lines
492 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
//
// AUTOUPDATE
HEADER
package User;
class C {};
impl C as Core.INTERFACE {
fn Op[self: C](other: C) -> C {
return {};
}
}
impl C as Core.INTERFACEAssign {
fn Op[addr self: C*](other: C) {}
}
fn TestOp(a: C, b: C) -> C {
return a OP b;
}
fn TestAssign(a: C*, b: C) {
*a OP= b;
}