| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 engine.resolver_test; | 5 library engine.resolver_test; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/ast.dart'; | 9 import 'package:analyzer/src/generated/ast.dart'; |
| 10 import 'package:analyzer/src/generated/element.dart'; | 10 import 'package:analyzer/src/generated/element.dart'; |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 @override | 360 @override |
| 361 void set analysisOptions(AnalysisOptions options) { | 361 void set analysisOptions(AnalysisOptions options) { |
| 362 AnalysisOptions currentOptions = analysisOptions; | 362 AnalysisOptions currentOptions = analysisOptions; |
| 363 bool needsRecompute = currentOptions.analyzeFunctionBodiesPredicate != | 363 bool needsRecompute = currentOptions.analyzeFunctionBodiesPredicate != |
| 364 options.analyzeFunctionBodiesPredicate || | 364 options.analyzeFunctionBodiesPredicate || |
| 365 currentOptions.generateImplicitErrors != | 365 currentOptions.generateImplicitErrors != |
| 366 options.generateImplicitErrors || | 366 options.generateImplicitErrors || |
| 367 currentOptions.generateSdkErrors != options.generateSdkErrors || | 367 currentOptions.generateSdkErrors != options.generateSdkErrors || |
| 368 currentOptions.dart2jsHint != options.dart2jsHint || | 368 currentOptions.dart2jsHint != options.dart2jsHint || |
| 369 (currentOptions.hint && !options.hint) || | 369 (currentOptions.hint && !options.hint) || |
| 370 currentOptions.preserveComments != options.preserveComments; | 370 currentOptions.preserveComments != options.preserveComments || |
| 371 currentOptions.enableStrictCallChecks != options.enableStrictCallChecks; |
| 371 if (needsRecompute) { | 372 if (needsRecompute) { |
| 372 fail( | 373 fail( |
| 373 "Cannot set options that cause the sources to be reanalyzed in a test
context"); | 374 "Cannot set options that cause the sources to be reanalyzed in a test
context"); |
| 374 } | 375 } |
| 375 super.analysisOptions = options; | 376 super.analysisOptions = options; |
| 376 } | 377 } |
| 377 | 378 |
| 378 @override | 379 @override |
| 379 bool exists(Source source) => | 380 bool exists(Source source) => |
| 380 super.exists(source) || sourceFactory.dartSdk.context.exists(source); | 381 super.exists(source) || sourceFactory.dartSdk.context.exists(source); |
| (...skipping 13083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13464 // check propagated type | 13465 // check propagated type |
| 13465 FunctionType propagatedType = node.propagatedType as FunctionType; | 13466 FunctionType propagatedType = node.propagatedType as FunctionType; |
| 13466 expect(propagatedType.returnType, test.typeProvider.stringType); | 13467 expect(propagatedType.returnType, test.typeProvider.stringType); |
| 13467 } on AnalysisException catch (e, stackTrace) { | 13468 } on AnalysisException catch (e, stackTrace) { |
| 13468 thrownException[0] = new CaughtException(e, stackTrace); | 13469 thrownException[0] = new CaughtException(e, stackTrace); |
| 13469 } | 13470 } |
| 13470 } | 13471 } |
| 13471 return null; | 13472 return null; |
| 13472 } | 13473 } |
| 13473 } | 13474 } |
| OLD | NEW |