diff --git a/build.sbt b/build.sbt index 62de604..372fd29 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ name := "better-monadic-for" organization := "com.olegpy" -version := "0.2.4" +version := "0.3.0-M1" licenses += ("MIT", url("http://opensource.org/licenses/MIT")) homepage := Some(url("http://github.com/oleg-py/better-monadic-for")) diff --git a/src/main/scala/com/olegpy/bm4/ImplicitPatterns.scala b/src/main/scala/com/olegpy/bm4/ImplicitPatterns.scala index 3e97857..ac675e7 100644 --- a/src/main/scala/com/olegpy/bm4/ImplicitPatterns.scala +++ b/src/main/scala/com/olegpy/bm4/ImplicitPatterns.scala @@ -14,7 +14,7 @@ trait ImplicitPatterns extends TreeUtils { self => object ImplicitPatternDefinition { lazy val ut = new NoTupleBinding { val noTupling: Boolean = false - lazy val global = self.global + lazy val global: self.global.type = self.global } def embedImplicitDefs(tupler: Tree, defns: List[ValDef]): Tree = { @@ -81,8 +81,12 @@ trait ImplicitPatterns extends TreeUtils { self => def unapply(arg: Tree): Option[TermName] = arg match { // TODO: support implicit0(x: Type) case q"implicit0(${t: TermName})" if t != termNames.WILDCARD => Some(t) - case q"implicit0($_)" => abort("implicit pattern only supports identifier pattern") - case q"implicit0(..$_)" => abort("implicit pattern only accepts a single parameter") + case q"implicit0($_)" => + reporter.error(arg.pos, "implicit pattern only supports identifier pattern") + None + case q"implicit0(..$_)" => + reporter.error(arg.pos, "implicit pattern only accepts a single parameter") + None case _ => None } }