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

Side by Side Diff: pkg/front_end/testcases/prefer_baseclass.dart

Issue 3006963002: Add missing copyright on test cases. (Closed)
Patch Set: Created 3 years, 3 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/front_end/testcases/override.dart ('k') | pkg/front_end/testcases/redirecting_factory.dart » ('j') | 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
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.
4
1 class A {} 5 class A {}
2 6
3 class B {} 7 class B {}
4 8
5 class AB1 extends A implements B {} 9 class AB1 extends A implements B {}
6 10
7 class AB2 extends A implements B {} 11 class AB2 extends A implements B {}
8 12
9 class BA1 extends B implements A {} 13 class BA1 extends B implements A {}
10 14
11 class BA2 extends B implements A {} 15 class BA2 extends B implements A {}
12 16
13 takeSubclassOfA(obj) { 17 takeSubclassOfA(obj) {
14 // The analysis should at least infer that 'obj' is a subclass of A, 18 // The analysis should at least infer that 'obj' is a subclass of A,
15 // When the upper bound is ambiguous, it should use the common superclass, if 19 // When the upper bound is ambiguous, it should use the common superclass, if
16 // there is one besides Object. 20 // there is one besides Object.
17 } 21 }
18 22
19 takeSubclassOfB(obj) { 23 takeSubclassOfB(obj) {
20 // Likewise, the analysis should infer that 'obj' is a subclass of B. 24 // Likewise, the analysis should infer that 'obj' is a subclass of B.
21 } 25 }
22 26
23 main() { 27 main() {
24 takeSubclassOfA(new AB1()); 28 takeSubclassOfA(new AB1());
25 takeSubclassOfA(new AB2()); 29 takeSubclassOfA(new AB2());
26 30
27 takeSubclassOfB(new BA1()); 31 takeSubclassOfB(new BA1());
28 takeSubclassOfB(new BA2()); 32 takeSubclassOfB(new BA2());
29 } 33 }
OLDNEW
« no previous file with comments | « pkg/front_end/testcases/override.dart ('k') | pkg/front_end/testcases/redirecting_factory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698