diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-19 04:07:48 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-19 04:07:48 -0700 |
commit | b9fd3f713d4c0122c1411315ad25049d117df57c (patch) | |
tree | 9d0ce1d9c26365e02822ffbe1888b1b5ea58e377 /test/files/neg/applydynamic_sip.scala | |
parent | eb49e8176f334eebc77072cc9334c7f1875b09a2 (diff) | |
parent | 08e5fd23e73bd2bcccc5f380c0a197d3bb900c02 (diff) | |
download | scala-b9fd3f713d4c0122c1411315ad25049d117df57c.tar.gz scala-b9fd3f713d4c0122c1411315ad25049d117df57c.tar.bz2 scala-b9fd3f713d4c0122c1411315ad25049d117df57c.zip |
Merge pull request #1343 from namin/dynamic-sig
Fixes SI-6354: improved error messages for Dynamic signature mismatches.
Diffstat (limited to 'test/files/neg/applydynamic_sip.scala')
-rw-r--r-- | test/files/neg/applydynamic_sip.scala | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/test/files/neg/applydynamic_sip.scala b/test/files/neg/applydynamic_sip.scala index 362461577b..ee4432ebe6 100644 --- a/test/files/neg/applydynamic_sip.scala +++ b/test/files/neg/applydynamic_sip.scala @@ -7,4 +7,27 @@ object Test extends App { qual.sel(a, a2: _*) qual.sel(arg = a, a2: _*) qual.sel(arg, arg2 = "a2", a2: _*) -}
\ No newline at end of file + + val bad1 = new Dynamic { + def selectDynamic(n: Int) = n + def applyDynamic(n: Int) = n + def applyDynamicNamed(n: Int) = n + def updateDynamic(n: Int) = n + + } + bad1.sel + bad1.sel(1) + bad1.sel(a = 1) + bad1.sel = 1 + + val bad2 = new Dynamic { + def selectDynamic = 1 + def applyDynamic = 1 + def applyDynamicNamed = 1 + def updateDynamic = 1 + } + bad2.sel + bad2.sel(1) + bad2.sel(a = 1) + bad2.sel = 1 +} |