Finding an implicit variable

Report a typo

Let's assume that there is a function in the scope that accepts an implicit header for the request:

def printRequest(request: String)(implicit header: String): Unit = println(s"$request,$header")

What happens if we try to compile the following code?

{
  implicit val header: String = "Content-Type: text/html"
}
printRequest("data:42")
Select one option from the list

Create a free account to access the full topic