Skip to content

Commit 4bf15fa

Browse files
Fix terminology for string literal in example explanation
Clarified that `"[Untitled]"` is a string literal, not a constant, aligning with Swift's terminology.
1 parent fe0121d commit 4bf15fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TSPL.docc/LanguageGuide/Initialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,7 @@ class UntitledDocument: Document {
24502450
In this case, if the `init(name:)` initializer of the superclass
24512451
were ever called with an empty string as the name,
24522452
the forced unwrapping operation would result in a runtime error.
2453-
However, because it's called with a string constant,
2453+
However, because it's called with a string literal,
24542454
you can see that the initializer won't fail,
24552455
so no runtime error can occur in this case.
24562456

0 commit comments

Comments
 (0)