Skip to content

Commit a734bb6

Browse files
committed
pat-lam: something
1 parent f784e8b commit a734bb6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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

+2-5
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,6 @@ public ExprResolver(@NotNull Context ctx, boolean allowGeneralizing) {
115115
return switch (pre(expr)) {
116116
case Expr.Do doExpr ->
117117
doExpr.update(apply(SourcePos.NONE, doExpr.bindName()), bind(doExpr.binds(), MutableValue.create(ctx)));
118-
case Expr.Lambda lam -> {
119-
var mCtx = MutableValue.create(ctx);
120-
mCtx.update(ctx -> ctx.bind(lam.ref()));
121-
yield lam.update(lam.body().descent(enter(mCtx.get())));
122-
}
123118
case Expr.IrrefutableLam lam -> lam.update(clause(ImmutableSeq.empty(), lam.clause()));
124119
case Expr.DepType depType -> {
125120
var mCtx = MutableValue.create(ctx);
@@ -202,6 +197,8 @@ public ExprResolver(@NotNull Context ctx, boolean allowGeneralizing) {
202197
yield match.update(discriminant, clauses, returns);
203198
}
204199

200+
// Expr.Lambda is a desugar target, which is produced after resolving.
201+
case Expr.Lambda _ -> Panic.unreachable();
205202
case Expr newExpr -> newExpr.descent(this);
206203
};
207204
}

0 commit comments

Comments
 (0)