aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-03-07 13:13:27 +0100
committerGuillaume Martres <smarter@ubuntu.com>2017-03-07 13:21:29 +0100
commit094cd9ff3b07536f75f3a233606823ae5478d542 (patch)
treee6309f4df17f9b91cbf46482762146b8ff0741ae /tests/pos
parent06d3f7aefa620ce006008955203d7f8f8dc7b605 (diff)
downloaddotty-094cd9ff3b07536f75f3a233606823ae5478d542.tar.gz
dotty-094cd9ff3b07536f75f3a233606823ae5478d542.tar.bz2
dotty-094cd9ff3b07536f75f3a233606823ae5478d542.zip
Fix #2056: Backend crash when inlined method contains try
In various places we do "case EmptyTree =>", since Tree#equals uses reference equality this means that EmptyTree should never be copied, otherwise some other code path will be taken.
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/i2056.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/pos/i2056.scala b/tests/pos/i2056.scala
new file mode 100644
index 000000000..c4d020fb6
--- /dev/null
+++ b/tests/pos/i2056.scala
@@ -0,0 +1,13 @@
+object Test {
+ inline def crash() = {
+ try {
+ println("hi")
+ } catch {
+ case e: Exception =>
+ }
+ }
+
+ def main(args: Array[String]): Unit = {
+ crash()
+ }
+}