Skip to content

Commit d21db7f

Browse files
authored
Merge pull request #9249 from aldenml/doc-fix
minor doc fix in safe-initialization.md, making code accurate and equals to actual test
2 parents 3112800 + f58a002 commit d21db7f

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)