Files
sdk/pkg/front_end/testcases/inference/try_finally.dart
T
Paul Berry 7553b2e75c Implement type inference for try/catch blocks.
Note that the types of the exception and stack trace variables are set
in the BodyBuilder since they do not depend on inference of other
parts of the function.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2954823002 .
2017-06-26 08:57:00 -07:00

18 lines
390 B
Dart

// Copyright (c) 2017, 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;
void test(void f()) {
try {
var /*@type=int*/ x = 0;
f();
} finally {
var /*@type=int*/ x = 0;
}
}
main() {}