Skip to content

Commit

Permalink
Avoid a superfluous not-null assertion
Browse files Browse the repository at this point in the history
The `shouldBeInstanceOf` assertion with type `File` (not `File?`) implies
not-nullability.
  • Loading branch information
sschuberth authored and ajalt committed Jul 25, 2023
1 parent 1086b7f commit fe3ae86
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FileTypeTest {
class C : TestCommand() {
val x by option("-x", "--xx").file()
override fun run_() {
x!!.shouldBeInstanceOf<File>()
x.shouldBeInstanceOf<File>()
}
}

Expand Down

0 comments on commit fe3ae86

Please sign in to comment.