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 library test.declarations_model; |
| 6 |
| 7 var libraryVariable; |
| 8 get libraryGetter => null; |
| 9 set librarySetter(x) => x; |
| 10 libraryMethod() => null; |
| 11 |
| 12 var _libraryVariable; |
| 13 get _libraryGetter => null; |
| 14 set _librarySetter(x) => x; |
| 15 _libraryMethod() => null; |
| 16 |
| 17 typedef bool Predicate(dynamic); |
| 18 |
| 19 abstract class Interface<I> { |
| 20 operator /(x) => null; |
| 21 |
| 22 var interfaceInstanceVariable; |
| 23 get interfaceInstanceGetter; |
| 24 set interfaceInstanceSetter(x); |
| 25 interfaceInstanceMethod(); |
| 26 |
| 27 var _interfaceInstanceVariable; |
| 28 get _interfaceInstanceGetter; |
| 29 set _interfaceInstanceSetter(x); |
| 30 _interfaceInstanceMethod(); |
| 31 |
| 32 static var interfaceStaticVariable; |
| 33 static get interfaceStaticGetter => null; |
| 34 static set interfaceStaticSetter(x) => x; |
| 35 static interfaceStaticMethod() => null; |
| 36 |
| 37 static var _interfaceStaticVariable; |
| 38 static get _interfaceStaticGetter => null; |
| 39 static set _interfaceStaticSetter(x) => x; |
| 40 static _interfaceStaticMethod() => null; |
| 41 } |
| 42 |
| 43 class Mixin<M> { |
| 44 operator *(x) => null; |
| 45 |
| 46 var mixinInstanceVariable; |
| 47 get mixinInstanceGetter => null; |
| 48 set mixinInstanceSetter(x) => x; |
| 49 mixinInstanceMethod() => null; |
| 50 |
| 51 var _mixinInstanceVariable; |
| 52 get _mixinInstanceGetter => null; |
| 53 set _mixinInstanceSetter(x) => x; |
| 54 _mixinInstanceMethod() => null; |
| 55 |
| 56 static var mixinStaticVariable; |
| 57 static get mixinStaticGetter => null; |
| 58 static set mixinStaticSetter(x) => x; |
| 59 static mixinStaticMethod() => null; |
| 60 |
| 61 static var _mixinStaticVariable; |
| 62 static get _mixinStaticGetter => null; |
| 63 static set _mixinStaticSetter(x) => x; |
| 64 static _mixinStaticMethod() => null; |
| 65 } |
| 66 |
| 67 class Superclass<S> { |
| 68 operator -(x) => null; |
| 69 |
| 70 var inheritedInstanceVariable; |
| 71 get inheritedInstanceGetter => null; |
| 72 set inheritedInstanceSetter(x) => x; |
| 73 inheritedInstanceMethod() => null; |
| 74 |
| 75 var _inheritedInstanceVariable; |
| 76 get _inheritedInstanceGetter => null; |
| 77 set _inheritedInstanceSetter(x) => x; |
| 78 _inheritedInstanceMethod() => null; |
| 79 |
| 80 static var inheritedStaticVariable; |
| 81 static get inheritedStaticGetter => null; |
| 82 static set inheritedStaticSetter(x) => x; |
| 83 static inheritedStaticMethod() => null; |
| 84 |
| 85 static var _inheritedStaticVariable; |
| 86 static get _inheritedStaticGetter => null; |
| 87 static set _inheritedStaticSetter(x) => x; |
| 88 static _inheritedStaticMethod() => null; |
| 89 |
| 90 Superclass.inheritedGenerativeConstructor(this.inheritedInstanceVariable); |
| 91 Superclass.inheritedRedirectingConstructor(x) |
| 92 : this.inheritedGenerativeConstructor(x * 2); |
| 93 factory Superclass.inheritedNormalFactory(y) => |
| 94 new Superclass.inheritedRedirectingConstructor(y * 3); |
| 95 factory Superclass.inheritedRedirectingFactory(z) = |
| 96 Superclass<S>.inheritedNormalFactory; |
| 97 |
| 98 Superclass._inheritedGenerativeConstructor(this._inheritedInstanceVariable); |
| 99 Superclass._inheritedRedirectingConstructor(x) |
| 100 : this._inheritedGenerativeConstructor(x * 2); |
| 101 factory Superclass._inheritedNormalFactory(y) => |
| 102 new Superclass._inheritedRedirectingConstructor(y * 3); |
| 103 factory Superclass._inheritedRedirectingFactory(z) = |
| 104 Superclass<S>._inheritedNormalFactory; |
| 105 } |
| 106 |
| 107 abstract class Class<C> extends Superclass<C> |
| 108 with Mixin<C> |
| 109 implements Interface<C> { |
| 110 operator +(x) => null; |
| 111 |
| 112 abstractMethod(); |
| 113 |
| 114 var instanceVariable; |
| 115 get instanceGetter => null; |
| 116 set instanceSetter(x) => x; |
| 117 instanceMethod() => null; |
| 118 |
| 119 var _instanceVariable; |
| 120 get _instanceGetter => null; |
| 121 set _instanceSetter(x) => x; |
| 122 _instanceMethod() => null; |
| 123 |
| 124 static var staticVariable; |
| 125 static get staticGetter => null; |
| 126 static set staticSetter(x) => x; |
| 127 static staticMethod() => null; |
| 128 |
| 129 static var _staticVariable; |
| 130 static get _staticGetter => null; |
| 131 static set _staticSetter(x) => x; |
| 132 static _staticMethod() => null; |
| 133 |
| 134 Class.generativeConstructor(this.instanceVariable) |
| 135 : super.inheritedGenerativeConstructor(0); |
| 136 Class.redirectingConstructor(x) : this.generativeConstructor(x * 2); |
| 137 factory Class.normalFactory(y) => new ConcreteClass(y * 3); |
| 138 factory Class.redirectingFactory(z) = Class<C>.normalFactory; |
| 139 |
| 140 Class._generativeConstructor(this._instanceVariable) |
| 141 : super._inheritedGenerativeConstructor(0); |
| 142 Class._redirectingConstructor(x) : this._generativeConstructor(x * 2); |
| 143 factory Class._normalFactory(y) => new ConcreteClass(y * 3); |
| 144 factory Class._redirectingFactory(z) = Class<C>._normalFactory; |
| 145 } |
| 146 |
| 147 // This is just here as a target of Class's factories to appease the analyzer. |
| 148 class ConcreteClass<CC> extends Class<CC> { |
| 149 abstractMethod() {} |
| 150 |
| 151 operator /(x) => null; |
| 152 |
| 153 var interfaceInstanceVariable; |
| 154 get interfaceInstanceGetter => null; |
| 155 set interfaceInstanceSetter(x) => null; |
| 156 interfaceInstanceMethod() => null; |
| 157 |
| 158 var _interfaceInstanceVariable; |
| 159 get _interfaceInstanceGetter => null; |
| 160 set _interfaceInstanceSetter(x) => null; |
| 161 _interfaceInstanceMethod() => null; |
| 162 |
| 163 ConcreteClass(x) : super.generativeConstructor(x); |
| 164 } |
| 165 |
| 166 class _PrivateClass {} |
OLD | NEW |