diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-17 10:15:15 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-17 10:15:15 -0700 |
commit | 66603a2c003852d39faec20a9763fb0e25049cf4 (patch) | |
tree | 0939e2ca36fe2f678d09209605c00b2b0d3f89f4 /test/files/run/t6353.scala | |
parent | cc94a21b694e132c945eafa9022b3a6e19e804fb (diff) | |
parent | dbe7ef94dd5ea031b1d9e65a6843ff2ff5b28fe5 (diff) | |
download | scala-66603a2c003852d39faec20a9763fb0e25049cf4.tar.gz scala-66603a2c003852d39faec20a9763fb0e25049cf4.tar.bz2 scala-66603a2c003852d39faec20a9763fb0e25049cf4.zip |
Merge pull request #1321 from namin/apply-dynamic-sugar
Fixed SI-6353: applyDynamic with sugared applications
Diffstat (limited to 'test/files/run/t6353.scala')
-rw-r--r-- | test/files/run/t6353.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t6353.scala b/test/files/run/t6353.scala new file mode 100644 index 0000000000..112241a3c4 --- /dev/null +++ b/test/files/run/t6353.scala @@ -0,0 +1,12 @@ +import language.dynamics + +object Test extends App { + val x = new X(3) + val y = x(9) + class X(i: Int) extends Dynamic { + def applyDynamic(name: String)(in: Int): Int = { + println(s"applyDynamic($name)($in)") + i + in + } + } +} |