From 1136f219e83a8888e6115ca2ea0a86f35011f505 Mon Sep 17 00:00:00 2001 From: Tom Grigg Date: Thu, 22 Oct 2020 10:35:51 -0700 Subject: [PATCH] Add regression test for #6655 Fixed by 2b52368 in #10014 --- tests/pos/i6655.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/pos/i6655.scala diff --git a/tests/pos/i6655.scala b/tests/pos/i6655.scala new file mode 100644 index 000000000000..ec1e6d7cc559 --- /dev/null +++ b/tests/pos/i6655.scala @@ -0,0 +1,10 @@ +class Test { + def foo(): Unit = { + val x: String|Null = ??? + if (x != null) { + val y = x.length + } else { + val y = x + } + } +}