File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ internal class SpecialVars
3434 internal const string PSScriptRoot = "PSScriptRoot" ;
3535 internal const string PSCommandPath = "PSCommandPath" ;
3636 internal const string ExecutionContext = "ExecutionContext" ;
37+ internal const string Matches = "Matches" ;
38+ internal const string PSVersionTable = "PSVersionTable" ;
3739
3840 internal static readonly string [ ] InitializedVariables ;
3941
@@ -63,7 +65,9 @@ static SpecialVars()
6365 MyInvocation ,
6466 PSScriptRoot ,
6567 PSCommandPath ,
66- ExecutionContext
68+ ExecutionContext ,
69+ Matches ,
70+ PSVersionTable
6771 } ;
6872 internal static readonly Type [ ] AutomaticVariableTypes = new Type [ ]
6973 {
@@ -76,7 +80,9 @@ static SpecialVars()
7680 /* MyInvocation */ typeof ( InvocationInfo ) ,
7781 /* PSScriptRoot */ typeof ( string ) ,
7882 /* PSCommandPath */ typeof ( string ) ,
79- /* ExecutionContext */ typeof ( EngineIntrinsics ) ,
83+ /* ExecutionContext */ typeof ( EngineIntrinsics ) ,
84+ /* Matches */ typeof ( System . Collections . Hashtable ) ,
85+ /* PSVersionTable */ typeof ( System . Collections . Hashtable )
8086 } ;
8187
8288
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ function Test {
99
1010$a = 3 ;
1111
12+ " hi there!" -match " hi" | Out-Null ;
13+ $matches [0 ];
14+
15+ $PSVersionTable ;
16+
1217if ($true ) {
1318 $a = 4 ;
1419 $c = 3 ;
You can’t perform that action at this time.
0 commit comments