From d92effc8a995086c1e0c4482f6163ef17b289ede Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Fri, 27 Dec 2013 22:29:54 +0300 Subject: SI-8006 prevents infinite applyDynamicNamed desugarings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since mkInvoke, the applyDynamic/selectDynamic/etc desugarer, is disconnected from typedNamedApply, the applyDynamicNamed argument rewriter, the latter doesn’t know whether it needs to apply the rewriting because the application has just been desugared or it needs to hold on because it’s already performed a desugaring on this tree. This commit introduces the attachment that links these translation facilities, preventing infinite applyDynamicNamed desugarings. --- test/files/neg/t8006.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/files/neg/t8006.scala (limited to 'test/files/neg/t8006.scala') diff --git a/test/files/neg/t8006.scala b/test/files/neg/t8006.scala new file mode 100644 index 0000000000..b2f71c1587 --- /dev/null +++ b/test/files/neg/t8006.scala @@ -0,0 +1,8 @@ +object X { + val d = new D + d.meth(value1 = 10, value2 = 100) // two arguments here, but only one is allowed +} +import language.dynamics +class D extends Dynamic { + def applyDynamicNamed(name: String)(value: (String, Any)) = name +} \ No newline at end of file -- cgit v1.2.3