lovubuntu / checker-framework

Automatically exported from code.google.com/p/checker-framework
0 stars 0 forks source link

Strange error: "required: ? extends S extends T extends Object" #312

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Test.java:

    import com.google.common.collect.Lists;
    import com.google.common.collect.Ordering;
    import java.util.List;
    class Test {
        void test() {
            List<String> list = Lists.newArrayList();
            Ordering.natural().reverse().sortedCopy(list);
        }
    }

export CLASSPATH=guava-16.0.1.jar
java -jar checkers.jar -processor checkers.nullness.NullnessChecker Test.java

Results in:

    Test.java:7: error: [type.argument.type.incompatible] incompatible types in type argument.
            Ordering.natural().reverse().sortedCopy(list);
                                                   ^
      found   : String
      required: ? extends S extends T extends Object
    1 error

I'm getting this error message in 1.7.5, I didn't see this previously in 1.7.2.

Original issue reported on code.google.com by trask.st...@gmail.com on 31 Mar 2014 at 6:46

GoogleCodeExporter commented 9 years ago

Original comment by michael.ernst@gmail.com on 15 Apr 2014 at 6:46

GoogleCodeExporter commented 9 years ago
Hi Trask,

I just tried this with Guava 16.0.1 and 17 and can't reproduce this problem. I 
hope this means recent changes fixed this :-)
I don't want to create a dependency on Guava, so I added a mock-up at:
https://code.google.com/p/checker-framework/source/browse/checker/tests/nullness
/generics/Issue312.java

Please do let us know if you're still seeing this issue.
cu, WMD.

Original comment by wdi...@gmail.com on 27 May 2014 at 11:03

GoogleCodeExporter commented 9 years ago
I'm still seeing this with 1.8.1, I'll re-test against the next release. Thanks.

Original comment by trask.st...@gmail.com on 28 May 2014 at 5:41

GoogleCodeExporter commented 9 years ago

Original comment by jtha...@cs.washington.edu on 3 Jun 2014 at 12:47

GoogleCodeExporter commented 9 years ago
This is fixed for me in 1.8.2.  Thanks.

Original comment by trask.st...@gmail.com on 5 Jun 2014 at 8:32