8000 Merge pull request #1912 from poslegm/patch-1 · rpridemore/docs.scala-lang@c69c5cd · GitHub
[go: up one dir, main page]

Skip to content

Commit c69c5cd

Browse files
authored
Merge pull request scala#1912 from poslegm/patch-1
Fixed typo
2 parents e3edf8a + 288b3d8 commit c69c5cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_overviews/scala3-book/types-dependent-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The following calls to method `get` would now type check:
3333
```scala
3434
val db: DB = ...
3535
val res1: Option[String] = db.get(Name)
36-
val res2: Option[String] = db.get(Age)
36+
val res2: Option[Int] = db.get(Age)
3737
```
3838
Calling the method `db.get(Name)` returns a value of type `Option[String]`, while calling `db.get(Age)` returns a value of type `Option[Int]`.
3939
The return type _depends_ on the concrete type of the argument passed to `get`---hence the name _dependent type_.

0 commit comments

Comments
 (0)
0