diff options
author | Paul Phillips <paulp@improving.org> | 2012-12-05 12:34:13 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-12-05 13:13:55 -0800 |
commit | c42c1742e26dc47f940e4003e4ca25e8c738796d (patch) | |
tree | 637acdd45dbf93ba87ae6cb67d4237da652ac8c1 /test/files/neg | |
parent | 4b2330b3d3db4263a8b1e19b792596dd60d79045 (diff) | |
parent | b84ecc5d1afcb71dd4047de9f1cc49060835d3df (diff) | |
download | scala-c42c1742e26dc47f940e4003e4ca25e8c738796d.tar.gz scala-c42c1742e26dc47f940e4003e4ca25e8c738796d.tar.bz2 scala-c42c1742e26dc47f940e4003e4ca25e8c738796d.zip |
Merge branch 'merge-2.10-wip' into merge-2.10
* merge-2.10-wip:
Fixing OSGi distribution.
Fix for rangepos crasher.
SI-6685 fixes error handling in typedApply
Test cases for SI-5726, SI-5733, SI-6320, SI-6551, SI-6722.
Asserts about Tree qualifiers.
Fix for SI-6731, dropped trees in selectDynamic.
neg test added
SI-5753 macros cannot be loaded when inherited from a class or a trait
Take advantage of the margin stripping interpolator.
Adds a margin stripping string interpolator.
SI-6718 fixes a volatile test
Mark pattern matcher synthetics as SYNTHETIC.
Set symbol flags at creation.
Fix for SI-6687, wrong isVar logic.
Fix for SI-6706, Symbol breakage under GC.
findEntry implementation code more concise and DRYer.
Fix for SI-6357, cycle with value classes.
Refactoring of adaptMethod
SI-6677 Insert required cast in `new qual.foo.T`
Conflicts:
src/compiler/scala/tools/nsc/transform/Erasure.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/internal/SymbolTable.scala
src/reflect/scala/reflect/internal/util/package.scala
test/files/neg/gadts1.check
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/gadts1.check | 4 | ||||
-rw-r--r-- | test/files/neg/t5753.check | 4 | ||||
-rw-r--r-- | test/files/neg/t5753.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t5753/Impls$class.class | bin | 0 -> 626 bytes | |||
-rw-r--r-- | test/files/neg/t5753/Impls.class | bin | 0 -> 866 bytes | |||
-rw-r--r-- | test/files/neg/t5753/Impls_Macros_1.scala | 6 | ||||
-rw-r--r-- | test/files/neg/t5753/Test_2.scala | 11 |
7 files changed, 24 insertions, 2 deletions
diff --git a/test/files/neg/gadts1.check b/test/files/neg/gadts1.check index a61231a27a..9b7ea5556a 100644 --- a/test/files/neg/gadts1.check +++ b/test/files/neg/gadts1.check @@ -1,6 +1,6 @@ -gadts1.scala:20: error: class Cell of type Test.Cell does not take type parameters. +gadts1.scala:20: error: Test.Cell[a] does not take parameters case Cell[a](x: Int) => c.x = 5 - ^ + ^ gadts1.scala:20: error: type mismatch; found : Int(5) required: a diff --git a/test/files/neg/t5753.check b/test/files/neg/t5753.check new file mode 100644 index 0000000000..76602de17d --- /dev/null +++ b/test/files/neg/t5753.check @@ -0,0 +1,4 @@ +Test_2.scala:9: error: macro implementation not found: foo (the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them) + println(foo(42)) + ^ +one error found diff --git a/test/files/neg/t5753.flags b/test/files/neg/t5753.flags new file mode 100644 index 0000000000..cd66464f2f --- /dev/null +++ b/test/files/neg/t5753.flags @@ -0,0 +1 @@ +-language:experimental.macros
\ No newline at end of file diff --git a/test/files/neg/t5753/Impls$class.class b/test/files/neg/t5753/Impls$class.class Binary files differnew file mode 100644 index 0000000000..476329174e --- /dev/null +++ b/test/files/neg/t5753/Impls$class.class diff --git a/test/files/neg/t5753/Impls.class b/test/files/neg/t5753/Impls.class Binary files differnew file mode 100644 index 0000000000..dfcf89ed44 --- /dev/null +++ b/test/files/neg/t5753/Impls.class diff --git a/test/files/neg/t5753/Impls_Macros_1.scala b/test/files/neg/t5753/Impls_Macros_1.scala new file mode 100644 index 0000000000..1d9c26458c --- /dev/null +++ b/test/files/neg/t5753/Impls_Macros_1.scala @@ -0,0 +1,6 @@ +import scala.reflect.macros.{Context => Ctx} + +trait Impls { +def impl(c: Ctx)(x: c.Expr[Any]) = x +} + diff --git a/test/files/neg/t5753/Test_2.scala b/test/files/neg/t5753/Test_2.scala new file mode 100644 index 0000000000..2369b18e76 --- /dev/null +++ b/test/files/neg/t5753/Test_2.scala @@ -0,0 +1,11 @@ +import scala.reflect.macros.{Context => Ctx} + +object Macros extends Impls { + def foo(x: Any) = macro impl +} + +object Test extends App { + import Macros._ + println(foo(42)) +} + |