When checking builder setter parameters, use the final type. The final type is the type after type-variable substitution. Report this type in error messages, since it may not be obvious.

(See AutoValueNotEclipseTest for an example of the problem this is fixing.)

Fix CompileWithEclipseTest so that it actually does exclude AutoValueNotEclipseTest.java from the compilation, as intended. Move the existing test within that file into AutoValueTest.java, since apparently the Eclipse bug it was provoking has been fixed. Add the test for the bug being fixed here into AutoValueNotEclipseTest.java, because it hits another Eclipse bug.

Fixes https://github.com/google/auto/issues/802.

RELNOTES=Fixed an issue with type checking of setter parameters in the presence of inheritance and generics.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=287580372
4 files changed
tree: 6c4dbd17dd38ce66bc09828b7a0982d3709f65b6
  1. common/
  2. factory/
  3. service/
  4. util/
  5. value/
  6. .gitignore
  7. .travis.yml
  8. build-pom.xml
  9. CONTRIBUTING.md
  10. LICENSE
  11. pom.xml
  12. README.md
README.md

Auto

Build Status

A collection of source code generators for Java.

Auto‽

Java is full of code that is mechanical, repetitive, typically untested and sometimes the source of subtle bugs. Sounds like a job for robots!

The Auto subprojects are a collection of code generators that automate those types of tasks. They create the code you would have written, but without the bugs.

Save time. Save code. Save sanity.

Subprojects

License

Copyright 2013 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.