blob: 58cbb4c13298cecd6f5557428deca06c66396050 [file] [log] [blame]
// Copyright (c) 2015, the Dart Team. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in
// the LICENSE file.
// @dart = 2.9
import "package:expect/expect.dart";
confuse(x) => [1, 'x', true, null, x].last;
Iterable<int> foo() sync* {
var a = confuse(1);
if (a < 10) {
yield 2;
}
}
main() {
Expect.listEquals([2], foo().toList());
}