blob: 4e777d0165328734af9a647a4c4b02e6b9596a4d [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>() => throw '';
class A {}
A aTopLevel = throw '';
void set aTopLevelSetter(A value) {}
class C {
A aField = throw '';
void set aSetter(A value) {}
void test() {
A aLocal;
for (aLocal in /*@typeArgs=Iterable<A>*/ f()) {}
for (/*@target=C.aField*/ /*@target=C.aField*/ aField
in /*@typeArgs=Iterable<A>*/ f()) {}
for (/*@target=C.aSetter*/ /*@target=C.aSetter*/ aSetter
in /*@typeArgs=Iterable<A>*/ f()) {}
for (aTopLevel in /*@typeArgs=Iterable<A>*/ f()) {}
for (aTopLevelSetter in /*@typeArgs=Iterable<A>*/ f()) {}
}
}
main() {}