Skip to content

Commit

Permalink
pat-lam: something
Browse files Browse the repository at this point in the history
  • Loading branch information
HoshinoTented committed Jan 17, 2025
1 parent f784e8b commit a734bb6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions base/src/main/java/org/aya/resolve/visitor/ExprResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ public ExprResolver(@NotNull Context ctx, boolean allowGeneralizing) {
return switch (pre(expr)) {
case Expr.Do doExpr ->
doExpr.update(apply(SourcePos.NONE, doExpr.bindName()), bind(doExpr.binds(), MutableValue.create(ctx)));
case Expr.Lambda lam -> {
var mCtx = MutableValue.create(ctx);
mCtx.update(ctx -> ctx.bind(lam.ref()));
yield lam.update(lam.body().descent(enter(mCtx.get())));
}
case Expr.IrrefutableLam lam -> lam.update(clause(ImmutableSeq.empty(), lam.clause()));
case Expr.DepType depType -> {
var mCtx = MutableValue.create(ctx);
Expand Down Expand Up @@ -202,6 +197,8 @@ public ExprResolver(@NotNull Context ctx, boolean allowGeneralizing) {
yield match.update(discriminant, clauses, returns);
}

// Expr.Lambda is a desugar target, which is produced after resolving.
case Expr.Lambda _ -> Panic.unreachable();

Check warning on line 201 in base/src/main/java/org/aya/resolve/visitor/ExprResolver.java

View check run for this annotation

Codecov / codecov/patch

base/src/main/java/org/aya/resolve/visitor/ExprResolver.java#L201

Added line #L201 was not covered by tests
case Expr newExpr -> newExpr.descent(this);
};
}
Expand Down

0 comments on commit a734bb6

Please sign in to comment.