Basic check support for adapters. (#3874)

No support is provided yet for converting between a type and an adapter
for that type.
This commit is contained in:
Richard Smith
2024-04-10 09:57:48 +00:00
committed by GitHub
parent e8430dda81
commit 28ceb4dd4e
19 changed files with 1642 additions and 43 deletions
+3
View File
@@ -221,6 +221,7 @@ static auto GetTypePrecedence(InstKind kind) -> int {
case PointerType::Kind:
return -2;
case AdaptDecl::Kind:
case AddrOf::Kind:
case AddrPattern::Kind:
case ArrayIndex::Kind:
@@ -477,6 +478,7 @@ static auto StringifyTypeExprImpl(const SemIR::File& outer_sem_ir,
}
break;
}
case AdaptDecl::Kind:
case AddrOf::Kind:
case AddrPattern::Kind:
case ArrayIndex::Kind:
@@ -560,6 +562,7 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory {
while (true) {
auto untyped_inst = ir->insts().Get(inst_id);
CARBON_KIND_SWITCH(untyped_inst) {
case AdaptDecl::Kind:
case Assign::Kind:
case BaseDecl::Kind:
case Branch::Kind: