mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 10:54:49 +01:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user