An alias to by-name type.
An alias to by-name type.
Unlike by-name types created from keyword =>
, this => alias can be used for type parameters.
import com.thoughtworks.feature.ByName.`=>` "val keywordByNameList = List.empty[=> Int]" shouldNot compile "val boxedByNameList = List.empty[`=>`[Int]]" should compile,
Unlike by-name types created from keyword =>
, this => alias can be used for return types.
import com.thoughtworks.feature.ByName.`=>` "def keywordByName: => Int = ???" shouldNot compile "def boxedByName: `=>`[Int] = ???" should compile