blob: 1f79cf3640f50f35c75736d32eca3f0c2e5d1f40 [file] [log] [blame]
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/*@testedFeatures=inference*/
library test;
T f<T>() => null;
class A {}
A aTopLevel;
void set aTopLevelSetter(A value) {}
class C {
A aField;
void set aSetter(A value) {}
void test() {
A aLocal;
for (aLocal in /*@ typeArgs=Iterable<A*>* */ f()) {}
for (/*@target=C::aField*/ aField in /*@ typeArgs=Iterable<A*>* */ f()) {}
for (/*@target=C::aSetter*/ aSetter in /*@ typeArgs=Iterable<A*>* */ f()) {}
for (aTopLevel in /*@ typeArgs=Iterable<A*>* */ f()) {}
for (aTopLevelSetter in /*@ typeArgs=Iterable<A*>* */ f()) {}
}
}
main() {}