                 fullMethodString = inline.reverse().reduce (previous,current) ->
                     previous.trim()+current.trim()
 
-                return fullMethodString.match(fullMethodRegex)[0]
+                if m = fullMethodString.match(fullMethodRegex)
+                    return m[0]
 
          return ''
 

            if matches = line.match(regex)
                isValid = matches[1].split('\\').map(
                    (item) ->
                        item.split(';')[0].split(' as ')[0] == objectType
                ).filter(
                    (item) -> item == true
                )
                console.log isValid, objectType, matches[1].match(objectType)
                if isValid.length > 0
                    return @fetchAndResolveDependencies(matches[1].match(objectType),prefix,resolve)



        currentMethodParams = @getMethodParams(editor,bufferPosition)

        unless currentMethodParams is undefined
            for param in currentMethodParams
                if prefix.indexOf(param.varName) == 0
                    unless param.objectType is undefined
                        regex = "\\$#{param.varName.substr(1)}\\-\\>"
                        return if prefix.match(regex) then param.objectType else false

    getMethodParams: (editor,bufferPosition) ->

