checker-framework icon indicating copy to clipboard operation
checker-framework copied to clipboard

Improve inference of type arguments for raw types

Open smillst opened this issue 9 years ago • 4 comments

Type argument inference for raw types should be improved and the "ignoreRawTypeArguments" option should be made optional again.

smillst avatar Mar 28 '16 22:03 smillst

See pull request #637 .

smillst avatar Mar 29 '16 21:03 smillst

Also, checker/jtreg/rawtypes/RawTypeFail.java should be re-enabled and expanded.

smillst avatar Mar 30 '16 15:03 smillst

~~The following code crashes when -AignoreRawTypeArguments=false is used:~~ No longer crashes Nov. 12, 2019.

import java.util.Collections;
import java.util.Vector;

public class SortVector {
    void test() {
        Vector vector = new Vector();
        Collections.sort(vector);
    }
}

~~javacheck -processor tainting SortVector.java -AprintErrorStack -AignoreRawTypeArguments=false~~ javacheck -processor tainting SortVector.java -AprintErrorStack -AignoreRawTypeArguments=false -AconservativeUninferredTypeArguments

smillst avatar May 22 '17 20:05 smillst

Additional test case for raw types: https://github.com/typetools/checker-framework/issues/2880

smillst avatar Nov 12 '19 22:11 smillst