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 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) : this.inheritedGenerativeConstr uctor(x*2); | |
|
Johnni Winther
2013/10/25 06:10:02
Long line ... and several below.
| |
| 92 factory Superclass.inheritedNormalFactory(y) => new Superclass.inheritedRedire ctingConstructor(y*3); | |
| 93 factory Superclass.inheritedRedirectingFactory(z) = Superclass.inheritedNormal Factory; | |
| 94 | |
| 95 Superclass._inheritedGenerativeConstructor(this._inheritedInstanceVariable); | |
| 96 Superclass._inheritedRedirectingConstructor(x) : this._inheritedGenerativeCons tructor(x*2); | |
| 97 factory Superclass._inheritedNormalFactory(y) => new Superclass._inheritedRedi rectingConstructor(y*3); | |
| 98 factory Superclass._inheritedRedirectingFactory(z) = Superclass._inheritedNorm alFactory; | |
| 99 } | |
| 100 | |
| 101 abstract class Class<C> extends Superclass<C> with Mixin<C> implements Interface <C> { | |
| 102 operator +(x) => null; | |
| 103 | |
| 104 abstractMethod(); | |
| 105 | |
| 106 var instanceVariable; | |
| 107 get instanceGetter => null; | |
| 108 set instanceSetter(x) => x; | |
| 109 instanceMethod() => null; | |
| 110 | |
| 111 var _instanceVariable; | |
| 112 get _instanceGetter => null; | |
| 113 set _instanceSetter(x) => x; | |
| 114 _instanceMethod() => null; | |
| 115 | |
| 116 static var staticVariable; | |
| 117 static get staticGetter => null; | |
| 118 static set staticSetter(x) => x; | |
| 119 static staticMethod() => null; | |
| 120 | |
| 121 static var _staticVariable; | |
| 122 static get _staticGetter => null; | |
| 123 static set _staticSetter(x) => x; | |
| 124 static _staticMethod() => null; | |
| 125 | |
| 126 Class.generativeConstructor(this.instanceVariable) : super.inheritedGenerative Constructor(0); | |
| 127 Class.redirectingConstructor(x) : this.generativeConstructor(x*2); | |
| 128 factory Class.normalFactory(y) => new ConcreteClass(y*3); | |
| 129 factory Class.redirectingFactory(z) = Class.normalFactory; | |
| 130 | |
| 131 Class._generativeConstructor(this._instanceVariable) : super._inheritedGenerat iveConstructor(0); | |
| 132 Class._redirectingConstructor(x) : this._generativeConstructor(x*2); | |
| 133 factory Class._normalFactory(y) => new ConcreteClass(y*3); | |
| 134 factory Class._redirectingFactory(z) = Class._normalFactory; | |
| 135 } | |
| 136 | |
| 137 // This is just here as a target of Class's factories to appease the analyzer. | |
| 138 class ConcreteClass<CC> extends Class<CC> { | |
| 139 abstractMethod() {} | |
| 140 | |
| 141 operator /(x) => null; | |
| 142 | |
| 143 var interfaceInstanceVariable; | |
| 144 get interfaceInstanceGetter => null; | |
| 145 set interfaceInstanceSetter(x) => null; | |
| 146 interfaceInstanceMethod() => null; | |
| 147 | |
| 148 var _interfaceInstanceVariable; | |
| 149 get _interfaceInstanceGetter => null; | |
| 150 set _interfaceInstanceSetter(x) => null; | |
| 151 _interfaceInstanceMethod() => null; | |
| 152 | |
| 153 ConcreteClass(x) : super.generativeConstructor(x); | |
| 154 } | |
| 155 | |
| 156 class _PrivateClass {} | |
| OLD | NEW |