mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-02 08:15:50 +01:00
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).
29 lines
492 B
Cheetah
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;
|
|
}
|