From e271f44be2ba03b944a958940067be690b0b3034 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 18 Jan 2021 11:12:56 +0100 Subject: [PATCH] Update creator-applications.md One can not easily identify the start of the "code section" in "same as new StringBuilder()". Instead, use a colon to separate words from code. --- .../docs/reference/other-new-features/creator-applications.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/reference/other-new-features/creator-applications.md b/docs/docs/reference/other-new-features/creator-applications.md index 387202720f9c..219fb16d2ea0 100644 --- a/docs/docs/reference/other-new-features/creator-applications.md +++ b/docs/docs/reference/other-new-features/creator-applications.md @@ -12,8 +12,8 @@ Scala 3 generalizes this scheme to all concrete classes. Example: class StringBuilder(s: String): def this() = this("") -StringBuilder("abc") // same as new StringBuilder("abc") -StringBuilder() // same as new StringBuilder() +StringBuilder("abc") // old: new StringBuilder("abc") +StringBuilder() // old: new StringBuilder() ``` This works since a companion object with two `apply` methods