From 008db876bdabd9fab76b421186649763440a5c73 Mon Sep 17 00:00:00 2001 From: Marya <111139605+MaryaBelanger@users.noreply.github.com> Date: Thu, 30 May 2024 10:10:03 -0700 Subject: [PATCH] Clarify confusing wording in Classes > Instance variables (#5849) Fixes #5824 --- examples/misc/lib/language_tour/classes/point_this.dart | 2 +- src/content/language/classes.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/misc/lib/language_tour/classes/point_this.dart b/examples/misc/lib/language_tour/classes/point_this.dart index a2135e9737..7f819e3a38 100644 --- a/examples/misc/lib/language_tour/classes/point_this.dart +++ b/examples/misc/lib/language_tour/classes/point_this.dart @@ -11,6 +11,6 @@ class Point { // OK, can access `this` in `late` initializer: late double? z = this.x; - // OK, `this.fieldName` is a parameter declaration, not an expression: + // OK, `this.x` and `this.y` are parameter declarations, not expressions: Point(this.x, this.y); } diff --git a/src/content/language/classes.md b/src/content/language/classes.md index d0263bd1ab..850a6e1f23 100644 --- a/src/content/language/classes.md +++ b/src/content/language/classes.md @@ -212,7 +212,7 @@ class Point { // OK, can access `this` in `late` initializer: late double? z = this.x; - // OK, `this.fieldName` is a parameter declaration, not an expression: + // OK, `this.x` and `this.y` are parameter declarations, not expressions: Point(this.x, this.y); } ```