8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57cd003 commit 3f66eebCopy full SHA for 3f66eeb
src/test/scala/net/codingwell/scalaguice/TypeLiteralSpec.scala
@@ -126,6 +126,9 @@ class TypeLiteralSpec extends AnyFunSpec with Matchers {
126
// Scala 2 represents it as Function1[Function0[Unit],String]
127
// Scala 3 represents it as just Function1[Unit,String]
128
typeLiteral[(=> Unit) => String] shouldEqual new TypeLiteral[(=> Unit) => String] {}
129
+ // In Scala 3 the parenthesis are not optional, otherwise it isn't a function
130
+ typeLiteral[(() => Unit) => String] shouldEqual new TypeLiteral[(() => Unit) => String] {}
131
+ typeLiteral[Function1[Function0[Unit],String]] shouldEqual new TypeLiteral[(() => Unit) => String] {}
132
}
133
134
it("should handle complex type") {
0 commit comments