blob: 2efee9907c247d54ead92a7152a3152960618ac0 [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.md file.
# Compile an application with a class in a file, then initializing from that
# dill, compile a version that doesn't use the file, finally update it so it
# does use the file (and Class). If the initially unused file is reused it
# should not cause any problems at any point, including being handled properly
# by the class hierarchy.
type: newworld
worlds:
- entry: main.dart
sources:
main.dart: |
import "foo.dart";
main() {
Foo foo = new Foo();
foo.foo();
}
foo.dart: |
class Foo {
foo() {
print("Foo!");
}
}
expectedLibraryCount: 2
- entry: main.dart
invalidate:
- main.dart
sources:
main.dart: |
main() {
print("hello from main");
}
foo.dart: |
class Foo {
foo() {
print("Foo!");
}
}
expectedLibraryCount: 1
expectInitializeFromDill: true
- entry: main.dart
worldType: updated
invalidate:
- main.dart
sources:
main.dart: |
import "foo.dart";
main() {
Foo foo = new Foo();
foo.foo();
}
expectedLibraryCount: 2