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

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

Issue 1052243002: Implement the new '??=' operator in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Library used by if_null_assignment_behavior_test.dart, which
6 // imports it using the prefix "h.".
7
8 library lib;
9
10 import "package:expect/expect.dart";
11
12 List<String> operations = [];
13
14 var xGetValue = null;
15
16 get x {
17 operations.add('h.x');
18 var tmp = xGetValue;
19 xGetValue = null;
20 return tmp;
21 }
22
23 void set x(value) {
24 operations.add('h.x=$value');
25 }
26
27 class C {
28 static var xGetValue = null;
29
30 static get x {
31 operations.add('h.C.x');
32 var tmp = xGetValue;
33 xGetValue = null;
34 return tmp;
35 }
36
37 static void set x(value) {
38 operations.add('h.C.x=$value');
39 }
40 }
OLDNEW
« no previous file with comments | « tests/language/if_null_assignment_behavior_test.dart ('k') | tests/language/if_null_assignment_static_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698