Support for as operator and user-defined As impls. (#1476)

This commit is contained in:
Richard Smith
2022-07-21 13:16:18 -07:00
committed by GitHub
parent a96ae98155
commit 93e19649aa
20 changed files with 208 additions and 12 deletions
@@ -30,10 +30,6 @@ class Integer {
var int: i32;
}
impl Integer as ImplicitAs(Integer) {
fn Convert[me: Self]() -> Integer { return me; }
}
fn Main() -> i32 {
var i: Integer = {.int = 1};
var c: Cell(Integer) = Cell(Integer).Create(i);