Explorer

core.type-check-value-not-function

description
Rejects a function written as a value (a variable, part reference or record field of a function type that is not called). Functions are only called, and a function argument is written as a lambda
type
Fn(result: @core.type-result, env: @core.type-env) -> @core.type-result
expression
fn(result$0, env$1) =>
  match $0 {
    #ok(value_type$2) =>
      match @core.type-resolve(type: $2, env: $1) {
        #function(function_type$3) =>
          #error(#function_not_called({actual: $2})),
        #builtin(name$4) =>
          #error(#function_not_called({actual: $2})),
        _ =>
          $0
      },
    #error(error$5) =>
      $0
  }
visibility
public
core.type-check-value-not-function (project definy, branch auto-release, snapshot oiQgPqhJm-TbM4kexXeRHBaJB_tS7gwBSewII64P-44)
id: T_dJ_jhP6uZi9GFdVqd0nDPurfh32zVlo7VldxHe-_4
content hash: CM_endnZpYHKkcCG10O2lPDAhXTS14yG8NAr6OeLDas