af7359853f
The big change here is to ensure FunctionTypeImpl.typeArguments is always initialized to match the parameters. This was previously the case, because we'd explicitly use the class's type parameters. With generic methods, we can no longer rely exclusively on that source of type parameters. We take advantage of enclosingElement to compute typeParameters from all containing scopes that can have them. By tracking all of the typeParameters, this allows substitution to work later. Adds a few very basic tests. Please note that generic methods are not ready to use yet. In particular this doesn't yet do the correct substitutions in StaticTypeAnalyzer. It also doesn't include (mostly done) inference to infer type parameters from the argument types. Further, discovered a missing feature from the previous parser CL. And finally, it doesn't include the kind of ErrorVerifier checks we'll likely need. R=brianwilkerson@google.com, leafp@google.com Review URL: https://codereview.chromium.org/1434983006 .