Closed
Description
doc.NewFromFiles
calls ast.NewPackage
on the specified files. NewPackage
uses the Scope
field of ast.File
. However this field is unset if the syntactic identifier resolution (which was deprecated in #52463) is disabled, causing it to panic.
It should either not panic (e.g. by skipping the logic if Scope is nil, which I think causes it to work fine for NewFromFiles), or the precondition should be documented.