| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index a1b5c73528b189f07185d76fe5aa556489569503..20ab695405b4df8ebd5c0bf1a742b9424a1f3918 100644
|
| --- a/runtime/vm/parser.cc
|
| +++ b/runtime/vm/parser.cc
|
| @@ -12588,16 +12588,10 @@ bool Parser::AreFunctionInstantiatorsRequired() const {
|
| bool Parser::InGenericFunctionScope() const {
|
| if (!innermost_function().IsNull()) {
|
| // With one more free tag bit in Function, we could cache this information.
|
| - if (innermost_function().IsGeneric()) {
|
| + if (innermost_function().IsGeneric() ||
|
| + innermost_function().HasGenericParent()) {
|
| return true;
|
| }
|
| - Function& parent = Function::Handle(innermost_function().parent_function());
|
| - while (!parent.IsNull()) {
|
| - if (parent.IsGeneric()) {
|
| - return true;
|
| - }
|
| - parent = parent.parent_function();
|
| - }
|
| }
|
| return false;
|
| }
|
|
|