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

Side by Side Diff: tests/language/super_operator_index_test.dart

Issue 12334088: Stop creating selectors in the SSA builder that were already created by the resolver. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « tests/language/super_operator_index2_test.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
(Empty)
1 // Copyright (c) 2013, 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
5 // Test that we emit warnings for unresolved indexing operations on super.
6
7 class A {
8 operator[]=(a, b) {}
9 }
10
11 class B extends A {
12 foo() {
13 super[4] = 42;
14 super[4] += 5; /// 01: static type warning, runtime error
15 return super[2]; /// 02: static type warning, runtime error
16 }
17 }
18
19 class C {
20 operator[](a) {}
21 }
22
23 class D extends C {
24 foo() {
25 super[4] = 42; /// 03: static type warning, runtime error
26 super[4] += 5; /// 04: static type warning, runtime error
27 return super[2];
28 }
29 }
30
31 class E {
32 foo() {
33 super[4] = 42; /// 05: static type warning, runtime error
34 super[4] += 5; /// 06: static type warning, runtime error
35 return super[2]; /// 07: static type warning, runtime error
36 }
37 }
38
39 main() {
40 new B().foo();
41 new D().foo();
42 new E().foo();
43 }
OLDNEW
« no previous file with comments | « tests/language/super_operator_index2_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698