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

Side by Side Diff: sky/examples/fn/lib/fn.dart

Issue 973613004: Clean up some Dart idioms in fn (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/examples/fn/lib/component.dart ('k') | sky/examples/fn/lib/node.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 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
1 library fn; 5 library fn;
2 6
3 import 'dart:async'; 7 import 'dart:async';
4 import 'dart:collection'; 8 import 'dart:collection';
5 import 'dart:sky' as sky; 9 import 'dart:sky' as sky;
6 import 'reflect.dart' as reflect; 10 import 'reflect.dart' as reflect;
7 11
8 part 'component.dart'; 12 part 'component.dart';
9 part 'node.dart'; 13 part 'node.dart';
10 part 'style.dart'; 14 part 'style.dart';
11 15
12 bool _checkedMode; 16 bool _checkedMode;
13 17
14 bool debugWarnings() { 18 bool _debugWarnings() {
15 void testFn(double i) {} 19 void testFn(double i) {}
16 20
17 if (_checkedMode == null) { 21 if (_checkedMode == null) {
18 _checkedMode = false; 22 _checkedMode = false;
19 try { 23 try {
20 testFn('not a double'); 24 testFn('not a double');
21 } catch (ex) { 25 } catch (ex) {
22 _checkedMode = true; 26 _checkedMode = true;
23 } 27 }
24 } 28 }
25 29
26 return _checkedMode; 30 return _checkedMode;
27 } 31 }
OLDNEW
« no previous file with comments | « sky/examples/fn/lib/component.dart ('k') | sky/examples/fn/lib/node.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698