mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 07:50:27 +00:00
Implement rename me -> self (#2444)
Implements change proposed in #1382 Replaces #1624
This commit is contained in:
1 parent
d1210c4a50
commit
9c8fd6864e
287 files changed
+1727
-1720
No files matched your search
+3
-3
@@ -11,19 +11,19 @@ package ExplorerTest api;
|
||||
|
||||
class One {
|
||||
impl One as ImplicitAs(i32) {
|
||||
fn Convert[me: Self]() -> i32 { return 1; }
|
||||
fn Convert[self: Self]() -> i32 { return 1; }
|
||||
}
|
||||
}
|
||||
|
||||
class Two {
|
||||
impl Two as ImplicitAs(i32) {
|
||||
fn Convert[me: Self]() -> i32 { return 2; }
|
||||
fn Convert[self: Self]() -> i32 { return 2; }
|
||||
}
|
||||
}
|
||||
|
||||
class N {
|
||||
impl N as ImplicitAs(i32) {
|
||||
fn Convert[me: Self]() -> i32 { return me.n; }
|
||||
fn Convert[self: Self]() -> i32 { return self.n; }
|
||||
}
|
||||
var n: i32;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ package ExplorerTest api;
|
||||
|
||||
class TypeLike {
|
||||
impl as ImplicitAs(Type) {
|
||||
fn Convert[me: Self]() -> Type { return i32; }
|
||||
fn Convert[self: Self]() -> Type { return i32; }
|
||||
}
|
||||
fn Make() -> Self { return {}; }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user