               body: [(jsReturn (jsNew identifier, paramNames))])])
         else
           (jsNew identifier, []))
-      constrFunction = dictConstructorFunction identifier, paramNames
+      constrFunction = dictConstructorFunction constr.symbol, paramNames
       accessors = dictAccessors constr.symbol, identifier, paramNames, defs.length
       (concat [constrFunction, accessors, [constrValue]]))
 

      # """var #{instanceName} = new #{className}(#{listOf methods});"""
      (jsVarDeclaration (validIdentifier instanceName),
        (irDefinition (new Constrained freshConstraints, (tupleOfTypes methodTypes).type),
          (jsNew className, (join superClassInstances, methods))))

# Makes sure methods are typed explicitly and returns the instance constraint
# with renamed type variables to avoid clashes

  paramAssigns = allFieldNames.map (name) ->
    (jsAssignStatement (jsAccess "this", name), (validIdentifier name))
  constrFn = (jsFunction
    name: (validIdentifier dictName)
    params: (map validIdentifier, allFieldNames)
    body: paramAssigns)
  # Not necessary
