Decide how to handle unreachable resolve cases
This commit is contained in:
@@ -169,7 +169,7 @@ pub fn expr<'db>(
|
||||
use ir::ExprKind::*;
|
||||
let kind = match &expr.kind {
|
||||
// directly translate existing value definitions
|
||||
// TODO: symbols are unresolved, handle unreachability better?
|
||||
// symbols are unreachable, so we can ignore them
|
||||
Value(value) => Value(value.clone()),
|
||||
|
||||
// recursively descend into unary operations
|
||||
@@ -212,14 +212,8 @@ pub fn expr<'db>(
|
||||
ast::ExprExtra::Aggregate(agg) => todo!(),
|
||||
},
|
||||
|
||||
// TODO: handle unreachability better?
|
||||
Variable(idx) => Variable(*idx),
|
||||
|
||||
// TODO: handle unreachability better?
|
||||
Load { relation, query } => Load {
|
||||
relation: *relation,
|
||||
query: query.clone(),
|
||||
},
|
||||
// other variants should be unreachable
|
||||
other => unreachable!("unreachable AST expression kind: {other:#?}"),
|
||||
};
|
||||
|
||||
// construct converted expression
|
||||
@@ -230,7 +224,6 @@ pub fn expr<'db>(
|
||||
}
|
||||
|
||||
/// Resolve a reference to a relation by name.
|
||||
// TODO: track incrementally?
|
||||
pub fn relation_name<'db>(db: &'db dyn Database, name: ast::Name) -> RelationLabel<'db> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user