-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Languageparser, language semanticsparser, language semantics

Description
Steps to reproduce
Run this script (via PowerShell -File ....)
param(
[Parameter(Mandatory = $false)]
[string] $Foo = 'hi\{0}\hi' -f $PSScriptRoot
)
Write-Host $Foo
Function Bar {
param(
[Parameter(Mandatory = $false)]
[string] $Bar = $PSScriptRoot
)
Write-Host $Bar
}
Function Baz {
[CmdletBinding()]
param(
[Parameter(Mandatory = $false)]
[string] $Baz = $PSScriptRoot
)
Write-Host $Baz
}
Bar
Baz
Expected behavior
hi\C:\tmp\hi
C:\tmp
C:\tmp
Actual behavior
hi\\hi
C:\tmp
C:\tmp
Environment data
Name Value
---- -----
PSVersion 5.1.16353.1000
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16353.1000
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
[edited by @daxian-dbw to put the repro in code blocks]
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Languageparser, language semanticsparser, language semantics