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

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

Issue 2757143002: The parameter of synthetic setters should inherit 'covariant'. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_common.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/src/dart/analysis/driver.dart'; 8 import 'package:analyzer/src/dart/analysis/driver.dart';
9 import 'package:test_reflective_loader/test_reflective_loader.dart'; 9 import 'package:test_reflective_loader/test_reflective_loader.dart';
10 10
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 } 1523 }
1524 abstract class B { 1524 abstract class B {
1525 void set x(int _); 1525 void set x(int _);
1526 } 1526 }
1527 class C implements A, B { 1527 class C implements A, B {
1528 int get x {} 1528 int get x {}
1529 } 1529 }
1530 '''); 1530 ''');
1531 } 1531 }
1532 1532
1533 @failingTest
1534 test_instanceField_inheritsCovariant_fromSetter_field() async { 1533 test_instanceField_inheritsCovariant_fromSetter_field() async {
1535 var library = await _encodeDecodeLibrary(r''' 1534 var library = await _encodeDecodeLibrary(r'''
1536 abstract class A { 1535 abstract class A {
1537 num get x; 1536 num get x;
1538 void set x(covariant num _); 1537 void set x(covariant num _);
1539 } 1538 }
1540 class B implements A { 1539 class B implements A {
1541 int x; 1540 int x;
1542 } 1541 }
1543 '''); 1542 ''');
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 2195
2197 Future<LibraryElement> _encodeDecodeLibrary(String text) async { 2196 Future<LibraryElement> _encodeDecodeLibrary(String text) async {
2198 String path = _p('/test.dart'); 2197 String path = _p('/test.dart');
2199 provider.newFile(path, text); 2198 provider.newFile(path, text);
2200 UnitElementResult result = await driver.getUnitElement(path); 2199 UnitElementResult result = await driver.getUnitElement(path);
2201 return result.element.library; 2200 return result.element.library;
2202 } 2201 }
2203 2202
2204 String _p(String path) => provider.convertPath(path); 2203 String _p(String path) => provider.convertPath(path);
2205 } 2204 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_common.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698