-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NullRefEx bug when accessing scriptFile.ReferencedFiles (#838)
* Fix NullRefEx bug when accessing scriptFile.ReferencedFilesThis happens because the ScriptFile ctor does not initialize all itspublic props. I added initialization for the other public propsexcept for the ScriptAst prop. I don't see an empty Ast. Perhaps nullis OK for this prop?This address vscode-powershell bug https://github.com/PowerShell/vscode-powershell/issues/1675Also, for the 2.0.0 branch, we should see if we can use Array.Empty<>()for initialization. It isn't availble to net45x. :-( * Revise ScriptFile prop init to happen within ParseFileContents & add tests
- Loading branch information
1 parent
3505902
commit 73044d1
Showing
2 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters