diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2017-02-21 16:02:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-21 16:02:11 +0100 |
commit | c96a9779891729981bb7644132d131de8e57c492 (patch) | |
tree | 704e0b473a41131ff6dfcde2e4b203d28df4512c /test | |
parent | 76bfb9e0e5f38ce264f2a03490731f5865fa468f (diff) | |
parent | f85c62e33e6ec7e84ed5946f1d72f3f74941ab9e (diff) | |
download | scala-c96a9779891729981bb7644132d131de8e57c492.tar.gz scala-c96a9779891729981bb7644132d131de8e57c492.tar.bz2 scala-c96a9779891729981bb7644132d131de8e57c492.zip |
Merge pull request #5658 from retronym/topic/hashhash
Fix erasure of the qualifier of ##
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/hash-hash-hash-hash.scala | 5 | ||||
-rw-r--r-- | test/files/run/unit-block-hash-hash.scala | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/hash-hash-hash-hash.scala b/test/files/run/hash-hash-hash-hash.scala new file mode 100644 index 0000000000..08793871a7 --- /dev/null +++ b/test/files/run/hash-hash-hash-hash.scala @@ -0,0 +1,5 @@ +object Test { + def main(args: Array[String]): Unit = { + assert(1.##.## == 1) // was java.lang.NoSuchMethodError: java.lang.Object.$hash$hash()I + } +} diff --git a/test/files/run/unit-block-hash-hash.scala b/test/files/run/unit-block-hash-hash.scala new file mode 100644 index 0000000000..2708810a71 --- /dev/null +++ b/test/files/run/unit-block-hash-hash.scala @@ -0,0 +1,12 @@ +object Ex extends Exception +object Test { + def ex: Any = throw Ex + def main(args: Array[String]): Unit = { + try { + { ex; () }.## + sys.error("no exception was thrown") + } catch { + case `Ex` => + } + } +}
\ No newline at end of file |