blob: a6b962331950982f8d4a0aa71e18fdfd1d57c7f3 [file] [log] [blame]
// Copyright (c) 2013, 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.
// @dart = 2.9
// Test that engines will not infer that [a] is always of type int.
var a = foo();
foo() {
() => 42;
if (true) throw 'Sorry';
return 42;
}
main() {
try {
a;
} catch (e) {
// Ignore.
}
if (a is num) throw 'Test failed';
}