summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-05-20 12:42:08 -0700
committerEugene Burmako <xeno.by@gmail.com>2013-05-20 12:42:08 -0700
commit779ec153fff82e111a8fdc7a982dbfe76af3a248 (patch)
treee0e72627bf54fa495e773798af13654dfe9541b6 /test/files
parent90e09642675562ddea0aa8181d0b7259ffe21f2d (diff)
parent658d90ace0068547d89ed398c6775d8cc8264ee0 (diff)
downloadscala-779ec153fff82e111a8fdc7a982dbfe76af3a248.tar.gz
scala-779ec153fff82e111a8fdc7a982dbfe76af3a248.tar.bz2
scala-779ec153fff82e111a8fdc7a982dbfe76af3a248.zip
Merge pull request #2506 from scalamacros/ticket/7461
c.typeCheck(silent = true) now suppresses ambiguous errors
Diffstat (limited to 'test/files')
-rw-r--r--test/files/pos/t7461.check0
-rw-r--r--test/files/pos/t7461/Macros_1.scala13
-rw-r--r--test/files/pos/t7461/Test_2.scala3
3 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/t7461.check b/test/files/pos/t7461.check
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/files/pos/t7461.check
diff --git a/test/files/pos/t7461/Macros_1.scala b/test/files/pos/t7461/Macros_1.scala
new file mode 100644
index 0000000000..353dec66d7
--- /dev/null
+++ b/test/files/pos/t7461/Macros_1.scala
@@ -0,0 +1,13 @@
+import scala.reflect.macros.Context
+import language.experimental.macros
+
+object Macros {
+ def impl(c: Context) = {
+ import c.universe._
+ val wut = c.typeCheck(Select(Literal(Constant(10)), newTermName("$minus")), silent = true)
+ // println(showRaw(wut, printIds = true, printTypes = true))
+ c.literalUnit
+ }
+
+ def foo = macro impl
+} \ No newline at end of file
diff --git a/test/files/pos/t7461/Test_2.scala b/test/files/pos/t7461/Test_2.scala
new file mode 100644
index 0000000000..3839659c9a
--- /dev/null
+++ b/test/files/pos/t7461/Test_2.scala
@@ -0,0 +1,3 @@
+class C {
+ def foo = Macros.foo
+} \ No newline at end of file