         else
           (jsNew identifier, []))
       constrFunction = dictConstructorFunction identifier, paramNames
-      accessors = dictAccessors constr.symbol, identifier, paramNames
+      accessors = dictAccessors constr.symbol, identifier, paramNames, defs.length
       (concat [constrFunction, accessors, [constrValue]]))
 
 findDataType = (ctx, typeArgLists, typeParams, dataName) ->

  # [(jsVarDeclaration dictName, (iife [constrFn, (jsReturn dictName)]))]
  [constrFn]

dictAccessors = (constrName, dictName, fieldNames) ->
  accessors = fieldNames.map (name) ->
    accessorName = "#{dictName}-#{name}"
    errorMessage = "throw new Error('Expected #{constrName},

    (jsVarDeclaration (validIdentifier accessorName), (jsFunction
      name: (validIdentifier accessorName)
      params: ["dict"]
      body: [if numConstructors > 1
          (jsConditional [
            ["dict instanceof #{validIdentifier constrName}",
              [(jsReturn (jsAccess "dict", name))]]], errorMessage)
        else
          (jsReturn (jsAccess "dict", name))]))

requireName = (ctx, message) ->
  if ctx.isAtDefinition()
