Closed hongxuchen closed 2 years ago
May I know why there are two candidate types in test_deduce_type_of_non_param_var?
https://github.com/multilang-depends/depends/blob/e5cb76afa0a102a92fa6b5b0bccd1805a556b7fb/src/test/java/depends/extractor/python/PythonParameterTypeDedudceTest.java#L99
class Type1: def f1_1(): pass def test(t1): t1.f1_1() t2 = t1
In the tested python code, I think that t1's type can be deduced as Type1 due to t1.f1_1(), and with t2 = t1, t2's type is also deduced the same as t1's. So I suppose that their deduced candidate type should both be only Type1.
t1
Type1
t1.f1_1()
t2 = t1
t2
Fixed. It is a design error. Thanks.
May I know why there are two candidate types in test_deduce_type_of_non_param_var?
https://github.com/multilang-depends/depends/blob/e5cb76afa0a102a92fa6b5b0bccd1805a556b7fb/src/test/java/depends/extractor/python/PythonParameterTypeDedudceTest.java#L99
In the tested python code, I think that
t1
's type can be deduced asType1
due tot1.f1_1()
, and witht2 = t1
,t2
's type is also deduced the same ast1
's. So I suppose that their deduced candidate type should both be onlyType1
.