Skip to content

Commit f769f29

Browse files
committed
Unit is not Unit
scala.Unit is companion object of `()` ``` Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112). Type in expressions for evaluation. Or try :help. scala> val a = () a: Unit = () scala> val b = Unit b: Unit.type = object scala.Unit scala> a == b <console>:14: warning: comparing values of types Unit and Unit.type using `==' will always yield false a == b ^ res1: Boolean = false ```
1 parent bbe3f68 commit f769f29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/gitbucket/gist/controller/GistController.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ trait GistControllerBase extends ControllerBase {
254254
.setOutputStream(response.getOutputStream)
255255
.call()
256256

257-
Unit
257+
()
258258
}
259259
}
260260

0 commit comments

Comments
 (0)