Closed
Description
I have gotten an unexpected compilation error when setting up a template project to try out dotty and following the Akka documentation at http://doc.akka.io/docs/akka-http/current/scala/http/introduction.html#using-akka-http
I set up the dependencies described and added withDottyCompat
to my library dependencies in my build.sbt
and also made sure to define crossScalaVersions
as per the Dotty example project.
I then get an compilation error for the following line of code:
complete(HttpEntity(ContentTypes.`text/html(UTF-8)`, "<h1>Say hello to akka-http</h1>"))
The error I get is
[error] -- [E008] Member Not Found Error: /Users/ ... /TestService.scala:27:43
[error] 27 | complete(HttpEntity(ContentTypes.`text/html(UTF-8)`, "<h1>Say hello to akka-http</h1>"))
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] |value `text$u002Fhtml(UTF-8)` is not a member of akka.http.scaladsl.model.ContentTypes
If I change the signature (via content assist) to
complete(HttpEntity(ContentTypes.text$divhtml$u0028UTF$minus8$u0029, "<h1>Say hello to akka-http</h1>"))
Dotty can now compile the project just fine.
Metadata
Metadata
Assignees
Labels
No labels