       id = (ctx.definitionName() and ctx.definitionId()) ?
         (ctx.currentDeclarationId symbol) ? ctx.freshId()
       type = toConstrained ctx.freshTypeVariable star
-      # ctx.bindTypeVariables [type.type.name]
+      ctx.bindTypeVariables [type.type.name]
       ctx.addToDefinedNames {name: symbol, id: id, type: type}
       type: type
       id: id

      # Check the declared type
      declaredType = ctx.type name
      explicitType = freshInstance ctx, declaredType
      updatedDeclaredType = quantifyUnbound ctx, (substitute ctx.substitution, explicitType)
      unify ctx, currentType.type, explicitType.type
      unifiedType = substitute ctx.substitution, explicitType
      inferredType = quantifyUnbound ctx, unifiedType


  definedNames = ctx.definedNames()

  # Make sure deferred names are added to scope so they are compiled within functions
  if ctx.shouldDefer()
    shouldDeclareFinally = ctx.isDeclared ctx.deferReason()[1]
