| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * This file is read by 'mirrors_test.dart'. | 6 * This file is read by 'mirrors_test.dart'. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 library mirrors_helper; | 9 library mirrors_helper; |
| 10 | 10 |
| 11 typedef E Func<E,F extends Foo>(F f); | 11 typedef E Func<E, F extends Foo>(F f); |
| 12 | 12 |
| 13 main() { | 13 main() {} |
| 14 | |
| 15 } | |
| 16 | 14 |
| 17 /// Singleline doc comment. | 15 /// Singleline doc comment. |
| 18 @Metadata(null) | 16 @Metadata(null) |
| 19 // Singleline comment 1. | 17 // Singleline comment 1. |
| 20 // Singleline comment 2. | 18 // Singleline comment 2. |
| 21 @Metadata(true) | 19 @Metadata(true) |
| 22 @Metadata(false) | 20 @Metadata(false) |
| 23 @Metadata(0) | 21 @Metadata(0) |
| 24 @Metadata(1.5) | 22 @Metadata(1.5) |
| 25 @Metadata("Foo") | 23 @Metadata("Foo") |
| 26 @Metadata(const ["Foo"]) | 24 @Metadata(const ["Foo"]) |
| 27 @Metadata(const {'foo':"Foo"}) | 25 @Metadata(const {'foo': "Foo"}) |
| 28 @metadata | 26 @metadata |
| 29 /** Multiline doc comment. */ | 27 /** Multiline doc comment. */ |
| 30 /* Multiline comment. */ class Foo { | 28 /* Multiline comment. */ class Foo { |
| 31 m(@metadata a) {} | 29 m(@metadata a) {} |
| 32 } | 30 } |
| 33 | 31 |
| 32 abstract class Bar<E> {} |
| 34 | 33 |
| 35 abstract class Bar<E> { | 34 class Baz<E, F extends Foo> implements Bar<E> { |
| 36 | |
| 37 } | |
| 38 | |
| 39 class Baz<E,F extends Foo> implements Bar<E> { | |
| 40 Baz(); | 35 Baz(); |
| 41 const Baz.named(); | 36 const Baz.named(); |
| 42 factory Baz.factory() => new Baz<E,F>(); | 37 factory Baz.factory() => new Baz<E, F>(); |
| 43 | 38 |
| 44 static method1(e) {} | 39 static method1(e) {} |
| 45 void method2(E e, [F f = null]) {} | 40 void method2(E e, [F f = null]) {} |
| 46 Baz<E,F> method3(E func1(F f), Func<E,F> func2) => null; | 41 Baz<E, F> method3(E func1(F f), Func<E, F> func2) => null; |
| 47 | 42 |
| 48 bool operator==(Object other) => false; | 43 bool operator ==(Object other) => false; |
| 49 int operator-() => 0; | 44 int operator -() => 0; |
| 50 operator$foo() {} | 45 operator$foo() {} |
| 51 } | 46 } |
| 52 | 47 |
| 53 class Boz extends Foo { | 48 class Boz extends Foo { |
| 54 var field1; | 49 var field1; |
| 55 int _field2; | 50 int _field2; |
| 56 final String field3 = "field3"; | 51 final String field3 = "field3"; |
| 57 | 52 |
| 58 int get field2 => _field2; | 53 int get field2 => _field2; |
| 59 void set field2(int value) { | 54 void set field2(int value) { |
| 60 _field2 = value; | 55 _field2 = value; |
| 61 } | 56 } |
| 62 } | 57 } |
| 63 | 58 |
| 64 class _PrivateClass { | 59 class _PrivateClass { |
| 65 var _privateField; | 60 var _privateField; |
| 66 get _privateGetter => _privateField; | 61 get _privateGetter => _privateField; |
| 67 void set _privateSetter(value) => _privateField = value; | 62 void set _privateSetter(value) => _privateField = value; |
| 68 void _privateMethod() {} | 63 void _privateMethod() {} |
| 69 _PrivateClass._privateConstructor(); | 64 _PrivateClass._privateConstructor(); |
| 70 factory _PrivateClass._privateFactoryConstructor() => null; | 65 factory _PrivateClass._privateFactoryConstructor() => null; |
| 71 } | 66 } |
| 72 | 67 |
| 73 const metadata = const Metadata(null); | 68 const metadata = const Metadata(null); |
| 74 | 69 |
| 75 class Metadata { | 70 class Metadata { |
| 76 final data; | 71 final data; |
| 77 const Metadata(this.data); | 72 const Metadata(this.data); |
| 78 } | 73 } |
| OLD | NEW |