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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/annotations.dart

Issue 3007533002: Address additional comments on nullability (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/reify_coercions.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/private/annotations.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/annotations.dart b/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
index f900aec3112c5ce6ca223003002e9231014d84c8..3999f7c77ced7de8bd98fcd5cfb8bac0939e6c46 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
@@ -9,8 +9,11 @@ class ForceInline {
const ForceInline();
}
-/// Marks a variable or API to be non-nullable
-/// Currently unchecked
+/// Marks a variable or API to be non-nullable.
+/// ****CAUTION******
+/// This is currently unchecked, and hence should never be used
+/// on any public interface where user code could subclass, implement,
+/// or otherwise cause the contract to be violated.
/// TODO(leafp): Consider adding static checking and exposing
/// this to user code.
class NotNull {
@@ -22,6 +25,9 @@ const notNull = const NotNull();
/// Tells the development compiler to check a variable for null at its
/// declaration point, and then to assume that the variable is non-null
/// from that point forward.
+/// ****CAUTION******
+/// This is currently unchecked, and hence will not catch re-assignments
+/// of a variable with null
class NullCheck {
const NullCheck();
}
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/reify_coercions.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698