| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 } | 1305 } |
| 1306 return buildType(type); | 1306 return buildType(type); |
| 1307 } | 1307 } |
| 1308 | 1308 |
| 1309 /** | 1309 /** |
| 1310 * Resynthesize a [ParameterElement]. | 1310 * Resynthesize a [ParameterElement]. |
| 1311 */ | 1311 */ |
| 1312 ParameterElement buildParameter(UnlinkedParam serializedParameter) { | 1312 ParameterElement buildParameter(UnlinkedParam serializedParameter) { |
| 1313 ParameterElementImpl parameterElement; | 1313 ParameterElementImpl parameterElement; |
| 1314 if (serializedParameter.isInitializingFormal) { | 1314 if (serializedParameter.isInitializingFormal) { |
| 1315 parameterElement = new FieldFormalParameterElementImpl.forNameAndOffset( | 1315 parameterElement = new FieldFormalParameterElementImpl( |
| 1316 serializedParameter.name, serializedParameter.nameOffset) | 1316 serializedParameter.name, serializedParameter.nameOffset) |
| 1317 ..field = fields[serializedParameter.name]; | 1317 ..field = fields[serializedParameter.name]; |
| 1318 } else { | 1318 } else { |
| 1319 parameterElement = new ParameterElementImpl( | 1319 parameterElement = new ParameterElementImpl( |
| 1320 serializedParameter.name, serializedParameter.nameOffset); | 1320 serializedParameter.name, serializedParameter.nameOffset); |
| 1321 } | 1321 } |
| 1322 if (serializedParameter.isFunctionTyped) { | 1322 if (serializedParameter.isFunctionTyped) { |
| 1323 FunctionElementImpl parameterTypeElement = | 1323 FunctionElementImpl parameterTypeElement = |
| 1324 new FunctionElementImpl('', -1); | 1324 new FunctionElementImpl('', -1); |
| 1325 parameterTypeElement.synthetic = true; | 1325 parameterTypeElement.synthetic = true; |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1838 } | 1838 } |
| 1839 : () => this.element; | 1839 : () => this.element; |
| 1840 // TODO(paulberry): Is it a bug that we have to pass `false` for | 1840 // TODO(paulberry): Is it a bug that we have to pass `false` for |
| 1841 // isInstantiated? | 1841 // isInstantiated? |
| 1842 return new DeferredFunctionTypeImpl(computer, null, typeArguments, false); | 1842 return new DeferredFunctionTypeImpl(computer, null, typeArguments, false); |
| 1843 } else { | 1843 } else { |
| 1844 return null; | 1844 return null; |
| 1845 } | 1845 } |
| 1846 } | 1846 } |
| 1847 } | 1847 } |
| OLD | NEW |