   else
     # log name, "constraints", (substituteList ctx.substitution, constraints)
     {success, error} = deferConstraints ctx,
-      (substituteList ctx.substitution, constraints)
+      (substituteList ctx.substitution, constraints),
+      currentType
     if error
       ctx.extendSubstitution error
       return

    (map f lines))

  f (fn [x]
    x)

  expand (fn [x]
    gg

  """
  '3', 3

  'overloaded reference 2'
  """
  Mappable (class [wrapper]
    map (fn [what onto]
      (: (Fn (Fn a b) (wrapper a) (wrapper b)))))

  array-mappable (instance (Mappable Array)
    map (macro [what over]
      (: (Fn (Fn a b) (Array a) (Array b)))
      (Js.method over "map" {what})))

  Show (class [a]
    show (fn [x] (: (Fn a String))))

  show-string (instance (Show String)
    show (fn [x] x))

  g (fn [x]
    (map f {}))

  f (fn [x]
    ""
    y (show x))
  """
  '3', 3

  # TODO: support matching with the same name
  #       to implement this we need the iife to take as arguments all variables
