lovubuntu / checker-framework

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

Incorrect annotations on nested class receivers #352

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.

class Outer {

    class Nested {
        @Untainted Outer context(@Untainted Outer.@Untainted Nested this) {
            return Outer.this;
        }
    }
}

OuterThisBug.java:8: error: [return.type.incompatible] incompatible types in 
return.
            return Outer.this;
                               ^
  found   : /*DECL*/ @Tainted Outer
  required: @Untainted Outer
1 error

What is the expected output? What do you see instead?
The type of the returned Outer should come from context's receiver.

What version of the product are you using? On what operating system?
Checker Framework revision 261dee828a0a

Please provide any additional information below.

Original issue reported on code.google.com by mcart...@cs.washington.edu on 4 Sep 2014 at 7:41

GoogleCodeExporter commented 9 years ago
Test file: checkers/tests/nullness/java8/lambda/Receivers.java:12

Original comment by mcart...@cs.washington.edu on 8 Sep 2014 at 11:01

GoogleCodeExporter commented 9 years ago

Original comment by mcart...@cs.washington.edu on 22 Jan 2015 at 12:58