Implement rename me -> self (#2444)

Implements change proposed in #1382

Replaces #1624
This commit is contained in:
josh11b
2022-12-06 20:17:00 -08:00
committed by GitHub
parent d1210c4a50
commit 9c8fd6864e
287 changed files with 1727 additions and 1720 deletions
+7 -7
View File
@@ -12,16 +12,16 @@ package ExplorerTest api;
class Cell(T:! Type) {
fn Create(x: T) -> Cell(T) { return { .data = x }; }
fn Get[me: Self]() -> T {
return me.data;
fn Get[self: Self]() -> T {
return self.data;
}
fn Put[addr me: Self*](x: T) {
(*me).data = x;
fn Put[addr self: Self*](x: T) {
(*self).data = x;
}
fn Update[addr me: Self*, U:! ImplicitAs(T)](x: U) {
(*me).data = x;
fn Update[addr self: Self*, U:! ImplicitAs(T)](x: U) {
(*self).data = x;
}
fn CreateOther[me: Self, U:! Type](x: U) -> Cell(U) {
fn CreateOther[self: Self, U:! Type](x: U) -> Cell(U) {
return {.data = x};
}
var data: T;