terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.82k stars 248 forks source link

Incomplete method name when class definition has generics as type with extends in Java #310

Closed cg122 closed 3 years ago

cg122 commented 3 years ago

Please see the following failed test:

def test_generic_type_with_extends(self):
        result = get_java_function_list("class B<T extends C> {void fun(T t) {}}")
         # actual "B<T::fun"
        self.assertEqual("B<T>::fun", result[0].name) 
terryyin commented 3 years ago

@cg122 hmm, what about removing the template part to make it like B::fun? Would it be good enough?

cg122 commented 3 years ago

@terryyin I think it would be enough as we are also trying to keep function name the simplest form.

terryyin commented 3 years ago

This one is fixed and I will look at the others soon.