mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:58:29 +00:00
In DeclarationResolver, handle generic function-typed parameters.
R=brianwilkerson@google.com Review URL: https://codereview.chromium.org/2441483002 .
This commit is contained in:
parent
bf43e4b43e
commit
4729ba0055
|
@ -528,7 +528,8 @@ class ElementWalker {
|
|||
*/
|
||||
ElementWalker.forParameter(ParameterElement element)
|
||||
: element = element,
|
||||
_parameters = element.parameters;
|
||||
_parameters = element.parameters,
|
||||
_typeParameters = element.typeParameters;
|
||||
|
||||
/**
|
||||
* Creates an [ElementWalker] which walks the child elements of a typedef
|
||||
|
|
|
@ -2424,6 +2424,9 @@ import 'package:crypto/crypto.dart';
|
|||
}
|
||||
|
||||
void test_resolveCompilationUnit_existingElementModel() {
|
||||
prepareAnalysisContext(new AnalysisOptionsImpl()
|
||||
..enableGenericMethods = true
|
||||
..strongMode = true);
|
||||
Source source = addSource(
|
||||
'/test.dart',
|
||||
r'''
|
||||
|
@ -2470,6 +2473,8 @@ class ClassTwo {
|
|||
void topLevelFunctionWithLocalFunction() {
|
||||
void localFunction({bool b: false}) {}
|
||||
}
|
||||
|
||||
void functionWithGenericFunctionTypedParam/*<S>*/(/*=T*/ pf/*<T>*/(/*=T*/ e)) {}
|
||||
''');
|
||||
context.resolveCompilationUnit2(source, source);
|
||||
LibraryElement firstElement = context.computeLibraryElement(source);
|
||||
|
|
Loading…
Reference in a new issue