Created
May 18, 2016 15:54
-
-
Save MasseGuillaume/bd1fced5651b6c545363382283c9735e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.scalakata._ | |
trait B | |
@instrument class Playground extends B { | |
1 | |
} | |
exception: scala.MatchError: List(class Playground extends B { | |
def <init>() = { | |
super.<init>(); | |
() | |
}; | |
1 | |
}) (of class scala.collection.immutable.$colon$colon) | |
^illegal inheritance; | |
self-type Playground does not conform to com.scalakata.Instrumented's selftype com.scalakata.Instrumented | |
^self constructor arguments cannot reference unconstructed `this` | |
^type mismatch; | |
found : scala.collection.mutable.Map[com.scalakata.RangePosition,com.scalakata.Render] | |
required: scala.collection.mutable.Map | |
^not found: value fresh$macro$5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c.Expr[Any]{ | |
try { | |
annottees.map(_.tree).toList match { | |
case q"class $name { ..$body }" :: Nil ⇒ { | |
// implementation... | |
} | |
} | |
} catch { | |
case scala.util.control.NonFatal(e) ⇒ { | |
c.error(c.enclosingPosition, s"exception: ${e.toString}") | |
q"..$annottees" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment