| OLD | NEW |
| 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 } |
| OLD | NEW |