Allow simple uses of Self in impls. (#3824)

Per #3714, some of the details here are not yet settled. In particular,
we might want `Self` to come into scope at the start of the definition,
not at the `as` keyword. However, this change allows us to accept the
uncontroversial examples.
This commit is contained in:
Richard Smith
2024-03-27 22:52:45 +00:00
committed by GitHub
parent a79027120a
commit e8cc089b2b
6 changed files with 240 additions and 71 deletions
-1
View File
@@ -81,7 +81,6 @@ static auto BuildInterfaceDecl(Context& context,
// there was an error in the qualifier, we will have lost track of the
// interface name here. We should keep track of it even if the name is
// invalid.
// TODO: should have a `Self` type id member
interface_decl.interface_id = context.interfaces().Add(
{.name_id = name_context.name_id_for_new_inst(),
.enclosing_scope_id = name_context.enclosing_scope_id_for_new_inst(),