Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SI-7519: Additional test case covering sbt/sbt#914

(cherry picked from commit e72c32d)
  • Loading branch information...
commit 50c8b39ec4e795b6de7b8ebeb6e20bf5c4b7f9e0 1 parent ce74bb0
@harrah harrah authored retronym committed
View
4 test/files/neg/t7519-b.check
@@ -0,0 +1,4 @@
+Use_2.scala:6: error: No implicit view available from String => K.
+ val x: Q = ex.Mac.mac("asdf")
+ ^
+one error found
View
14 test/files/neg/t7519-b/Mac_1.scala
@@ -0,0 +1,14 @@
+// get expected error message without package declaration
+package ex
+
+import scala.language.experimental.macros
+import scala.reflect.macros._
+
+object IW {
+ def foo(a: String): String = ???
+}
+object Mac {
+ def mac(s: String): String = macro macImpl
+ def macImpl(c: Context)(s: c.Expr[String]): c.Expr[String] =
+ c.universe.reify(IW.foo(s.splice))
+}
View
8 test/files/neg/t7519-b/Use_2.scala
@@ -0,0 +1,8 @@
+trait Q
+trait K
+
+object Use {
+ implicit def cd[T](p: T)(implicit ev: T => K): Q = ???
+ val x: Q = ex.Mac.mac("asdf")
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.