File tree Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -590,6 +590,18 @@ class CyclicInitializationError extends Error {
590590}
591591
592592/**
593- * Error thrown when a late field is set or get when it shouldn't be.
593+ * Error thrown when a late variable is accessed in an invalid manner.
594+ *
595+ * A late variable must be initialized before it's read.
596+ * If a late variable has no initializer expression and has not
597+ * been written to, then reading it will throw a
598+ * late initialization error.
599+ *
600+ * A late final variable with no initializer expression may only
601+ * be written to once.
602+ * If it is written to again, the writing will throw a
603+ * late initialization error.
594604 */
595- class LateInitializationError extends Error {}
605+ abstract class LateInitializationError extends Error {
606+ factory LateInitializationError ._() => throw UnsupportedError ("" );
607+ }
Original file line number Diff line number Diff line change @@ -592,6 +592,18 @@ class CyclicInitializationError extends Error {
592592}
593593
594594/**
595- * Error thrown when a late field is set or get when it shouldn't be.
595+ * Error thrown when a late variable is accessed in an invalid manner.
596+ *
597+ * A late variable must be initialized before it's read.
598+ * If a late variable has no initializer expression and has not
599+ * been written to, then reading it will throw a
600+ * late initialization error.
601+ *
602+ * A late final variable with no initializer expression may only
603+ * be written to once.
604+ * If it is written to again, the writing will throw a
605+ * late initialization error.
596606 */
597- class LateInitializationError extends Error {}
607+ abstract class LateInitializationError extends Error {
608+ factory LateInitializationError ._() => throw UnsupportedError ("" );
609+ }
You can’t perform that action at this time.
0 commit comments