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

Side by Side Diff: tests/language/vm/unique_selector_test.dart

Issue 2412653002: VM Propagate receiver type from calls to unique selectors in AOT compilation. (Closed)
Patch Set: addressed comments, added test Created 4 years, 2 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 | « runtime/vm/precompiler.cc ('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) 2016, 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 import "package:expect/expect.dart";
6
7 class A {
8 _unique_method() => "foo";
9 bar() => "A";
10 }
11
12 class B {
13 noSuchMethod(invocation) => "nsm";
14 bar() => "B";
15 }
16
17 confuse(x) {
18 try {
19 throw x;
20 } catch (e) {
21 return e;
22 }
23 return null;
24 }
25
26 main() {
27 var a = confuse(new A());
28 Expect.equals("foo", a._unique_method());
29 Expect.equals("A", a.bar());
30
31 var b = confuse(new B());
32 Expect.equals("nsm", b._unique_method());
33 Expect.equals("B", b.bar()); // Don't propagate type A to b.
34 }
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698