Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 handling of unsupported operators. | |
| 6 | |
| 7 library unsupported_operators; | |
| 8 | |
| 9 class C { | |
| 10 m() { | |
| 11 print(super === null); /// 01: compile-time error | |
|
ahe
2013/08/06 14:48:40
print(
super === /// 01: compile-time error
null)
Johnni Winther
2013/08/07 06:56:25
Done.
| |
| 12 print(super !== null); /// 02: compile-time error | |
|
ahe
2013/08/06 14:48:40
Ditto.
Johnni Winther
2013/08/07 06:56:25
Done.
| |
| 13 } | |
| 14 } | |
| 15 | |
| 16 void main() { | |
| 17 new C().m(); /// 01: continued | |
|
ahe
2013/08/06 14:48:40
No need to use continue here.
Johnni Winther
2013/08/07 06:56:25
Done.
| |
| 18 new C().m(); /// 02: continued | |
| 19 print("foo" === null); /// 03: compile-time error | |
|
ahe
2013/08/06 14:48:40
print("foo"
=== null /// 03: compile-time error
);
Johnni Winther
2013/08/07 06:56:25
Done.
| |
| 20 print("foo" !== null); /// 04: compile-time error | |
|
ahe
2013/08/06 14:48:40
Ditto.
Johnni Winther
2013/08/07 06:56:25
Done.
| |
| 21 } | |
| OLD | NEW |