diff options
author | michelou <michelou@epfl.ch> | 2010-11-17 12:26:13 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2010-11-17 12:26:13 +0000 |
commit | c09f6173e96ec741c9b38edfee969ae8c6b74d4e (patch) | |
tree | 1f06579f72afa12092acd0b5bbb7c678291cf619 /test/files/detach-neg | |
parent | 363a1456f671323b35dcacf2c8b8eb39180b8a53 (diff) | |
download | scala-c09f6173e96ec741c9b38edfee969ae8c6b74d4e.tar.gz scala-c09f6173e96ec741c9b38edfee969ae8c6b74d4e.tar.bz2 scala-c09f6173e96ec741c9b38edfee969ae8c6b74d4e.zip |
updates Scala examples, added detach plugin
Diffstat (limited to 'test/files/detach-neg')
-rw-r--r-- | test/files/detach-neg/det_bar.check | 4 | ||||
-rw-r--r-- | test/files/detach-neg/det_bar.scala | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/detach-neg/det_bar.check b/test/files/detach-neg/det_bar.check new file mode 100644 index 0000000000..70b47581a5 --- /dev/null +++ b/test/files/detach-neg/det_bar.check @@ -0,0 +1,4 @@ +det_bar.scala:7: error: detach inapplicable for method bar + detach(bar) + ^ +one error found diff --git a/test/files/detach-neg/det_bar.scala b/test/files/detach-neg/det_bar.scala new file mode 100644 index 0000000000..1f4dd9e892 --- /dev/null +++ b/test/files/detach-neg/det_bar.scala @@ -0,0 +1,13 @@ +import scala.remoting._ +class A(y: Int) { + var z = 2 + var bar = (x: Int) => x + y + z + def foo(x: Int): Int = x + y + z + bar = (x: Int) => x * y + detach(bar) +} + +object test extends Application { + val a = new A(1) + println(a.bar(2)) +} |