Skip to content

Commit

Permalink
Avoid NPE when printing TyperStates
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Oct 4, 2017
1 parent 9a96ce3 commit 539c203
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/core/TyperState.scala
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,6 @@ class TyperState(previous: TyperState /* | Null */) extends DotClass with Showab

override def toText(printer: Printer): Text = constraint.toText(printer)

def hashesStr: String = hashCode.toString + " -> " + previous.hashesStr
def hashesStr: String =
if (previous == null) "" else hashCode.toString + " -> " + previous.hashesStr
}

0 comments on commit 539c203

Please sign in to comment.