Seriously, this one case might be a strong argument against autocasts
~~~
frontier_node = frontier_node.best_source.as(not null)
~~~
is auto-casted as
~~~
frontier_node = frontier_node.best_source.as(not null).as(N)
~~~
bun since the N is `nullable Node`, the not-null information was lost in the
cast.
Signed-off-by: Jean Privat <jean@pryen.org>
while frontier_node != self do
path.nodes.unshift(frontier_node)
- frontier_node = frontier_node.best_source.as(not null)
+ frontier_node = frontier_node.best_source
+ assert frontier_node != null
end
return path