| Index: pkg/front_end/lib/src/fasta/source/source_library_builder.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
|
| index 6c992f6654fd75c32bbefd244316ff96d96e3095..5bc51159d49a3500ed579b5119c889c5adc8b744 100644
|
| --- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
|
| +++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
|
| @@ -334,7 +334,11 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
|
|
|
| void includeParts() {
|
| for (SourceLibraryBuilder<T, R> part in parts.toList()) {
|
| - includePart(part);
|
| + if (part == this) {
|
| + addCompileTimeError(-1, "A file can't be a part of itself.");
|
| + } else {
|
| + includePart(part);
|
| + }
|
| }
|
| }
|
|
|
|
|