-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Right now, it returns null
. This can cause annoying follow-on errors, which have become more frequent since we sharpened equality checking with null
. See 8fca13d.
The right thing to do would be to let errorTerm
return a tree with an ErrorType
. I tried that, but, unfortunately, it breaks SignatureHelpTest in a way I cannot fix. So it would be good if somebody with more IDE knowledge could take this on. Here's what you need to do.
- Change
errorTermTree
in Parser.scala from
def errorTermTree: Literal = atSpan(in.offset) { Literal(Constant(null)) }
to
def errorTermTree: Tree = atSpan(in.offset) {
TypedSplice(Literal(Constant(null)).withType(Types.UnspecifiedErrorType))
}
- Fix the resulting breakage in SignatureHelp tests. It might be a test failure, or it might be an underlying failure in signatureHelp that somehow assumes that error trees have type
Null
.