Skip to content

Commit 1251b97

Browse files
retronymadriaanm
authored andcommitted
SI-7185 Avoid NPE in TreeInfo.isExprSafeToInline
We got there typechecking code with a redundant layer of Block. We can't express that in source code, so we test this with manual tree construction and with XML literals, which as reported produce such trees.
1 parent 7f8a3fb commit 1251b97

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test/files/neg/t7185.check

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
t7185.scala:2: error: overloaded method value apply with alternatives:
2+
(f: scala.xml.Node => Boolean)scala.xml.NodeSeq <and>
3+
(i: Int)scala.xml.Node
4+
cannot be applied to ()
5+
<e></e>()
6+
^
7+
one error found

test/files/neg/t7185.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
object Test {
2+
<e></e>()
3+
}

0 commit comments

Comments
 (0)