(d *funcDecl, variant *funcDef, inType super.Type)
| 117 | } |
| 118 | |
| 119 | func (r *resolver) resolveVariant(d *funcDecl, variant *funcDef, inType super.Type) { |
| 120 | save := r.t.scope |
| 121 | r.t.scope = NewScope(d.scope) |
| 122 | defer func() { |
| 123 | r.t.scope = save |
| 124 | }() |
| 125 | r.t.enterScope() |
| 126 | for _, lambda := range variant.lambdas { |
| 127 | r.t.scope.BindSymbol(lambda.param, &funcParamLambda{param: lambda.param, id: lambda.id}) |
| 128 | } |
| 129 | for _, param := range variant.params { |
| 130 | r.t.scope.BindSymbol(param, funcParamValue{}) |
| 131 | } |
| 132 | variant.body, _ = r.t.expr(d.lambda.Expr, inType) |
| 133 | r.t.exitScope() |
| 134 | } |
| 135 | |
| 136 | func (r *resolver) resolveFixed(d *funcDecl, tag string, inType super.Type) *funcDef { |
| 137 | save := r.t.scope |
no test coverage detected