macwire icon indicating copy to clipboard operation
macwire copied to clipboard

Error:(14, 26) Cannot find a value of type: [com.softwaremill.tagging.@@[Berry,Blue]] val basket = wire[Basket]

Open TommyJohnDub opened this issue 6 years ago • 1 comments

I'm copying and pasting the tagging example from the docs into my IntelliJ Scratch file and I get a compiler error. I'm using Macwire 2.2.2 and Scala 2.11.8.

import com.softwaremill.macwire._
import com.softwaremill.tagging._

class Berry()
trait Black
trait Blue

case class Basket(blueberry: Berry @@ Blue, blackberry: Berry @@ Black)

lazy val blueberry = wire[Berry].taggedWith[Blue]
lazy val blackberry = wire[Berry].taggedWith[Black]
lazy val basket = wire[Basket]

Error Message

Error:(14, 26) Cannot find a value of type: [com.softwaremill.tagging.@@[Berry,Blue]]
val basket = wire[Basket]

Any ideas what I'm doing wrong?

TommyJohnDub avatar Aug 07 '19 16:08 TommyJohnDub

Could you try in a regular scala file, not intellij scratch? I remember having problems with them

adamw avatar Aug 19 '19 14:08 adamw