Skip to content

Commit 3e99401

Browse files
Geek-Joesarahhaggarty
authored andcommitted
Update kotlin-tour-intermediate-scope-functions.md
error message is wrong, and String? isn't inferred type in this case
1 parent 9ede0ac commit 3e99401

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/topics/tour/kotlin-tour-intermediate-scope-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ the `sendNotification()` function because this function doesn't expect that `add
7474
The compiler reports an error as a result:
7575

7676
```text
77-
Type mismatch: inferred type is String? but String was expected
77+
Argument type mismatch: actual type is 'String?', but 'String' was expected.
7878
```
7979

8080
From the beginner tour, you already know that you can perform a null check with an if condition or use the [Elvis operator `?:`](kotlin-tour-null-safety.md#use-elvis-operator).
@@ -537,4 +537,4 @@ fun main() {
537537

538538
## Next step
539539

540-
[Intermediate: Lambda expressions with receiver](kotlin-tour-intermediate-lambdas-receiver.md)
540+
[Intermediate: Lambda expressions with receiver](kotlin-tour-intermediate-lambdas-receiver.md)

0 commit comments

Comments
 (0)