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/pos | |
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/pos')
-rw-r--r-- | test/files/pos/t5726.scala | 17 | ||||
-rw-r--r-- | test/files/pos/t6551.scala | 2 | ||||
-rw-r--r-- | test/files/pos/t6722.scala | 11 |
3 files changed, 29 insertions, 1 deletions
diff --git a/test/files/pos/t5726.scala b/test/files/pos/t5726.scala new file mode 100644 index 0000000000..b28ebd8674 --- /dev/null +++ b/test/files/pos/t5726.scala @@ -0,0 +1,17 @@ +import scala.language.dynamics + +class DynamicTest extends Dynamic { + def selectDynamic(name: String) = s"value of $name" + def updateDynamic(name: String)(value: Any) { + println(s"You have just updated property '$name' with value: $value") + } +} + +object MyApp extends App { + def testing() { + val test = new DynamicTest + test.firstName = "John" + } + + testing() +} diff --git a/test/files/pos/t6551.scala b/test/files/pos/t6551.scala index fb68663809..8bb396a19f 100644 --- a/test/files/pos/t6551.scala +++ b/test/files/pos/t6551.scala @@ -1,4 +1,4 @@ -import language.dynamics +import scala.language.dynamics object Test { def main(args: Array[String]) { diff --git a/test/files/pos/t6722.scala b/test/files/pos/t6722.scala new file mode 100644 index 0000000000..576746c915 --- /dev/null +++ b/test/files/pos/t6722.scala @@ -0,0 +1,11 @@ +import scala.language.dynamics + +class Dyn extends Dynamic { + def selectDynamic(s: String): Dyn = new Dyn + def get[T]: T = null.asInstanceOf[T] +} + +object Foo { + val dyn = new Dyn + dyn.foo.bar.baz.get[String] +} |