Skip to content

Commit f58a002

Browse files
committed
minor doc fix in safe-initialization.md, making code accurate and equals to actual test
1 parent 3112800 commit f58a002

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/reference/other-new-features/safe-initialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Given the following code snippet:
1616
``` Scala
1717
abstract class AbstractFile {
1818
def name: String
19-
val extension: String = Path.extension(name)
19+
val extension: String = name.substring(4)
2020
}
2121

2222
class RemoteFile(url: String) extends AbstractFile {

0 commit comments

Comments
 (0)