Steps to reproduce
function A {
Write-Host "In A"
return "something"
}
# Here, A is called twice
$y = (A) ?? "blabla"
Expected behavior
The function A should be called only once.
Actual behavior
The function A is called twice.
Environment data
Name Value
---- -----
PSVersion 7.0.0
PSEdition Core
GitCommitId 7.0.0
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0