Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: pkg/analyzer/test/src/summary/linker_test.dart

Issue 2974803002: Store FunctionType(s) of local functions by value. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/src/summary/linker_test.dart
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index 38796c203823736d90caf85d085c37faea3d34e5..a91267dd795e579ed65d041dc58f88d049d42527 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -818,28 +818,6 @@ var x = {
expect(libraryCycle.libraries, [testLibrary]);
}
- void test_malformed_function_reference() {
- // Create a corrupted package bundle in which the inferred type of `x`
- // refers to a non-existent local function.
- var bundle = createPackageBundle('var x = () {}', path: '/a.dart');
- expect(bundle.linkedLibraries, hasLength(1));
- expect(bundle.linkedLibraries[0].units, hasLength(1));
- for (LinkedReferenceBuilder ref
- in bundle.linkedLibraries[0].units[0].references) {
- if (ref.kind == ReferenceKind.function) {
- ref.localIndex = 1234;
- }
- }
- addBundle('/a.ds', bundle);
- createLinker('''
-import 'a.dart';
-var y = x;
-''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
- expect(_getVariable(library.getContainedName('y')).inferredType.toString(),
- 'dynamic');
- }
-
void test_multiplyInheritedExecutable_differentSignatures() {
createLinker('''
class B {

Powered by Google App Engine
This is Rietveld 408576698