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 + } + } +}