From ccb5decafc7eedc30ff2439ada34ef61b62a809a Mon Sep 17 00:00:00 2001 From: mattzhou-db <110490023+mattzhou-db@users.noreply.github.com> Date: Wed, 17 Aug 2022 17:21:53 -0700 Subject: [PATCH 1/2] Update comment in example code Help clarify that x is set to 1, and y is set to default value. This comment is more explicit in what x and y are set to. --- _tour/classes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_tour/classes.md b/_tour/classes.md index 79b04b5c37..fb77fa4b6e 100644 --- a/_tour/classes.md +++ b/_tour/classes.md @@ -101,7 +101,7 @@ Constructors can have optional parameters by providing a default value like so: class Point(var x: Int = 0, var y: Int = 0) val origin = new Point // x and y are both set to 0 -val point1 = new Point(1) // y is set to 0 +val point1 = new Point(1) // x is set to 1 and y is set to 0 println(point1) // prints (1, 0) ``` {% endtab %} From 00a3688f3a9d572ce2620dd076099db169e32b49 Mon Sep 17 00:00:00 2001 From: mattzhou-db <110490023+mattzhou-db@users.noreply.github.com> Date: Mon, 19 Sep 2022 15:22:46 -0700 Subject: [PATCH 2/2] Update Scala 3 code snippet. Update Scala 3 code snippet to include more descriptive comment. --- _tour/classes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_tour/classes.md b/_tour/classes.md index fb77fa4b6e..be64ca7284 100644 --- a/_tour/classes.md +++ b/_tour/classes.md @@ -111,7 +111,7 @@ println(point1) // prints (1, 0) class Point(var x: Int = 0, var y: Int = 0) val origin = Point() // x and y are both set to 0 -val point1 = Point(1) // y is set to 0 +val point1 = Point(1) // x is set to 1 and y is set to 0 println(point1) // prints (1, 0) ``` {% endtab %}