bea7be00e1
Fix leak when generating incremental kernel files. Bug: https://github.com/dart-lang/sdk/issues/35092 Change-Id: Iaa112150501dd17d943a3747db3cacd2ee4464d2 Reviewed-on: https://dart-review.googlesource.com/c/84301 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
23 lines
599 B
Dart
23 lines
599 B
Dart
// 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.
|
|
|
|
// Verify creating an incremental kernel file twice generates the same bits.
|
|
|
|
import 'dart:async';
|
|
import 'snapshot_test_helper.dart';
|
|
|
|
int fib(int n) {
|
|
if (n <= 1) return 1;
|
|
return fib(n - 1) + fib(n - 2);
|
|
}
|
|
|
|
Future<void> main(List<String> args) async {
|
|
if (args.contains('--child')) {
|
|
print(fib(35));
|
|
return;
|
|
}
|
|
|
|
await checkDeterministicSnapshot("kernel", "");
|
|
}
|