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

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

Issue 11416004: Reject deprecated language features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: abstract class in resolver test Created 8 years, 1 month 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/dart2js.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart b/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart
index 474cdad82e98686f9aab2e68ffbfadea6deb3d36..fdc98b98d75ebfc62bb5d64d45a9ebe0a746e949 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -165,6 +165,10 @@ void compile(List<String> argv) {
new OptionHandler('--disallow-unsafe-eval', passThrough),
new OptionHandler('--analyze-all', passThrough),
new OptionHandler('--enable-native-live-type-analysis', passThrough),
+ new OptionHandler('--reject-deprecated-language-features', passThrough),
+ new OptionHandler('--report-sdk-use-of-deprecated-language-features',
+ passThrough),
+
// The following two options must come last.
new OptionHandler('-.*', (String argument) {
helpAndFail('Error: Unknown option "$argument".');
@@ -418,7 +422,22 @@ be removed in a future version:
Disables dynamic generation of code in the generated output. This is
necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/).
This flag is not continuously tested. Please report breakages and we
- will fix them as soon as possible.''');
+ will fix them as soon as possible.
+
+ --reject-deprecated-language-features
+ Reject deprecated language features. Without this option, the
+ compiler will accept language features that are no longer valid
+ according to The Dart Programming Language Specification, version
+ 0.12, M1.
+
+ --report-sdk-use-of-deprecated-language-features
+ Report use of deprecated features in Dart platform libraries.
+ Without this option, the compiler will silently accept use of
+ deprecated language features from these libraries. The option
+ --reject-deprecated-language-features controls if these usages are
+ reported as errors or warnings.
+
+'''.trim());
}
void helpAndExit(bool verbose) {

Powered by Google App Engine
This is Rietveld 408576698