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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/library_loader.dart

Issue 11464025: dart2js: complain about missing part-of tags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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: dart/sdk/lib/_internal/compiler/implementation/library_loader.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/library_loader.dart b/dart/sdk/lib/_internal/compiler/implementation/library_loader.dart
index 6a247e209c633f2df7c821a03215fdccb00968a8..2e94322f48e33710c1738b3edf75f0271046530f 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -268,7 +268,18 @@ class LibraryLoaderTask extends LibraryLoader {
Script sourceScript = compiler.readScript(path, part);
CompilationUnitElement unit =
new CompilationUnitElement(sourceScript, library);
- compiler.withCurrentElement(unit, () => compiler.scanner.scan(unit));
+ compiler.withCurrentElement(unit, () {
+ compiler.scanner.scan(unit);
+ if (!library.isPlatformLibrary && unit.partTag == null) {
+ compiler.withCurrentElement(library, () {
+ compiler.onDeprecatedFeature(part, 'missing part-of tag');
ngeoffray 2012/12/10 13:06:51 Should onDeprecatedFeature check isPlatformLibrary
ahe 2012/12/10 13:29:33 Done.
+ });
+ compiler.reportMessage(
+ compiler.spanFromElement(unit),
+ MessageKind.MISSING_PART_OF_TAG.error([]),
+ api.Diagnostic.INFO);
+ }
+ });
}
/**

Powered by Google App Engine
This is Rietveld 408576698