| 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 5c2115375e9ad5dc509ab715173f111565e506b0..6c992f6654fd75c32bbefd244316ff96d96e3095 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
|
| @@ -8,7 +8,9 @@ import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind;
|
|
|
| import '../combinator.dart' show Combinator;
|
|
|
| -import '../errors.dart' show internalError;
|
| +import '../errors.dart' show inputError, internalError;
|
| +
|
| +import '../export.dart' show Export;
|
|
|
| import '../messages.dart' show warning;
|
|
|
| @@ -320,11 +322,13 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
|
|
|
| void validatePart() {
|
| if (parts.isNotEmpty) {
|
| - internalError("Part with parts: $uri");
|
| + inputError(fileUri, -1,
|
| + "A file that's a part of a library can't have parts itself.");
|
| }
|
| if (exporters.isNotEmpty) {
|
| - internalError(
|
| - "${exporters.first.exporter.uri} attempts to export the part $uri.");
|
| + Export export = exporters.first;
|
| + inputError(
|
| + export.fileUri, export.charOffset, "A part can't be exported.");
|
| }
|
| }
|
|
|
|
|