 
   definedNames = ctx.definedNames()
 
-  # log "is deferriing", (print pattern), ctx.shouldDefer()
   # Make sure deferred names are added to scope so they are compiled within functions
   if ctx.shouldDefer()
     shouldDeclareFinally = ctx.isDeclared ctx.deferReason()[1]

    log (collapse toHtml compiled.ast)
    if _notEmpty compiled.subs
      log map formatFail, compiled.subs
    if result isnt (got = eval compiled.compiled)
      log "'#{testName}' expected", result, "got", got
    else
      success = yes
  catch e
    logError "Error in test |#{testName}|\n#{teaSource}\n", e
  success

  inferredType = freshInstance ctx, canonicalType
  ctx.extendSubstitution matchType inferredType.type, (substitute ctx.substitution, type).type
  reduceConstraints ctx, inferredType.constraints
  (substitute ctx.substitution, inferredType).constraints

irReference = (name, type, scopeIndex) ->
