       try
         matcher = AbstractMatcher.getMatcher(signatureElement)
       catch e
-        throw new Error(ERRORS.UNSUPPORTED_SIGNATURE_ELEMENT)
+        throw new TypeError(ERRORS.UNSUPPORTED_SIGNATURE_ELEMENT)
       matcher.compile(signatureElement)
 
     @_signature = compiledSignature

        Object.defineProperty(overloadableFunction, property,
          value: Overloadable.prototype[property])

  constructor: (defaultFunction) ->
    if defaultFunction? and typeof defaultFunction isnt "function"
      throw new TypeError(ERRORS.INVALID_DEFAULT_FUNCTION)


    matchedFunction = @match(passedArguments...)
    return matchedFunction.apply(thisArg, passedArguments) if matchedFunction?

    throw new TypeError(ERRORS.NO_MATCHING_OVERLOADS)

  _getDefaultFunction: -> @_defaultFunction

