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
34
34
internal const string PSScriptRoot = "PSScriptRoot" ;
35
35
internal const string PSCommandPath = "PSCommandPath" ;
36
36
internal const string ExecutionContext = "ExecutionContext" ;
37
+ internal const string Matches = "Matches" ;
38
+ internal const string PSVersionTable = "PSVersionTable" ;
37
39
38
40
internal static readonly string [ ] InitializedVariables ;
39
41
@@ -63,7 +65,9 @@ static SpecialVars()
63
65
MyInvocation ,
64
66
PSScriptRoot ,
65
67
PSCommandPath ,
66
- ExecutionContext
68
+ ExecutionContext ,
69
+ Matches ,
70
+ PSVersionTable
67
71
} ;
68
72
internal static readonly Type [ ] AutomaticVariableTypes = new Type [ ]
69
73
{
@@ -76,7 +80,9 @@ static SpecialVars()
76
80
/* MyInvocation */ typeof ( InvocationInfo ) ,
77
81
/* PSScriptRoot */ typeof ( string ) ,
78
82
/* PSCommandPath */ typeof ( string ) ,
79
- /* ExecutionContext */ typeof ( EngineIntrinsics ) ,
83
+ /* ExecutionContext */ typeof ( EngineIntrinsics ) ,
84
+ /* Matches */ typeof ( System . Collections . Hashtable ) ,
85
+ /* PSVersionTable */ typeof ( System . Collections . Hashtable )
80
86
} ;
81
87
82
88
Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ function Test {
9
9
10
10
$a = 3 ;
11
11
12
+ " hi there!" -match " hi" | Out-Null ;
13
+ $matches [0 ];
14
+
15
+ $PSVersionTable ;
16
+
12
17
if ($true ) {
13
18
$a = 4 ;
14
19
$c = 3 ;
You can’t perform that action at this time.
0 commit comments