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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2655243007: Fix for invalid 'extends/implements/with SomeEnum'. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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 test.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
9 import 'package:analyzer/dart/constant/value.dart'; 9 import 'package:analyzer/dart/constant/value.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after
2915 } 2915 }
2916 2916
2917 test_enum_values() { 2917 test_enum_values() {
2918 checkLibrary('enum E { v1, v2 }'); 2918 checkLibrary('enum E { v1, v2 }');
2919 } 2919 }
2920 2920
2921 test_enums() { 2921 test_enums() {
2922 checkLibrary('enum E1 { v1 } enum E2 { v2 }'); 2922 checkLibrary('enum E1 { v1 } enum E2 { v2 }');
2923 } 2923 }
2924 2924
2925 test_error_extendsEnum() {
2926 checkLibrary('''
2927 enum E {a, b, c}
2928
2929 class M {}
2930
2931 class A extends E {
2932 foo() {}
2933 }
2934
2935 class B implements E, M {
2936 foo() {}
2937 }
2938
2939 class C extends Object with E, M {
2940 foo() {}
2941 }
2942
2943 class D = Object with M, E;
2944 ''');
2945 }
2946
2925 test_executable_parameter_type_typedef() { 2947 test_executable_parameter_type_typedef() {
2926 checkLibrary(r''' 2948 checkLibrary(r'''
2927 typedef F(int p); 2949 typedef F(int p);
2928 main(F f) {} 2950 main(F f) {}
2929 '''); 2951 ''');
2930 } 2952 }
2931 2953
2932 test_export_class() { 2954 test_export_class() {
2933 addLibrarySource('/a.dart', 'class C {}'); 2955 addLibrarySource('/a.dart', 'class C {}');
2934 checkLibrary('export "a.dart";'); 2956 checkLibrary('export "a.dart";');
(...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after
5017 fail('Unexpectedly tried to get unlinked summary for $uri'); 5039 fail('Unexpectedly tried to get unlinked summary for $uri');
5018 } 5040 }
5019 return serializedUnit; 5041 return serializedUnit;
5020 } 5042 }
5021 5043
5022 @override 5044 @override
5023 bool hasLibrarySummary(String uri) { 5045 bool hasLibrarySummary(String uri) {
5024 return true; 5046 return true;
5025 } 5047 }
5026 } 5048 }
OLDNEW
« pkg/analyzer/lib/src/summary/link.dart ('K') | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698