Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(796)

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart

Issue 2704753002: Implement line and column numbers. (Closed)
Patch Set: Change message. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
index 9f3a0c3f9e12246833b5c6b538a0f2d758ab3e0c..853c5993cc60573993707756ffb37ce1ebab0dd0 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_named_type_builder.dart
@@ -10,8 +10,8 @@ import 'package:kernel/ast.dart' show
Supertype,
VoidType;
-import '../errors.dart' show
- inputError;
+import '../messages.dart' show
+ warning;
import 'kernel_builder.dart' show
KernelClassBuilder,
@@ -30,18 +30,19 @@ class KernelNamedTypeBuilder
KernelInvalidTypeBuilder buildInvalidType(String name) {
// TODO(ahe): Record error instead of printing.
- print("$fileUri:$charOffset: Type not found: $name");
+ warning(fileUri, charOffset, "Type not found: '$name'.");
return new KernelInvalidTypeBuilder(name, charOffset, fileUri);
}
DartType handleMissingType() {
// TODO(ahe): Record error instead of printing.
- print("$fileUri:$charOffset: No type for: $name");
+ warning(fileUri, charOffset, "No type for: '$name'.");
return const DynamicType();
}
Supertype handleMissingSuperType() {
- throw inputError(fileUri, charOffset, "No type for: $name");
+ warning(fileUri, charOffset, "No type for: '$name'.");
+ return null;
}
DartType build() {

Powered by Google App Engine
This is Rietveld 408576698