Skip to content

Commit 8d31b5a

Browse files
authored
Merge pull request #2512 from artemkorsakov/patch-1
Update types-union.md
2 parents b8cbb22 + be6e87a commit 8d31b5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_overviews/scala3-book/types-union.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ val password = Password(123) // password: Password = Password(123)
7676
This REPL example shows how a union type can be used when binding a variable to the result of an `if`/`else` expression:
7777

7878
````
79-
scala> val a = if (true) name else password
79+
scala> val a = if true then name else password
8080
val a: Object = Username(Eve)
8181
82-
scala> val b: Password | Username = if (true) name else password
82+
scala> val b: Password | Username = if true then name else password
8383
val b: Password | Username = Username(Eve)
8484
````
8585

0 commit comments

Comments
 (0)