Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
78bcc23a
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
78bcc23a
编写于
5月 16, 2017
作者:
H
Heejae Chang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed test failures
上级
ad664cec
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
20 addition
and
70 deletion
+20
-70
src/Compilers/CSharp/Portable/Operations/CSharpOperationFactory.cs
...lers/CSharp/Portable/Operations/CSharpOperationFactory.cs
+0
-17
src/Compilers/CSharp/Portable/Operations/CSharpOperationFactory_Methods.cs
...arp/Portable/Operations/CSharpOperationFactory_Methods.cs
+0
-11
src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs
...ilers/Core/Portable/Generated/Operations.xml.Generated.cs
+4
-4
src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory.vb
...lBasic/Portable/Operations/VisualBasicOperationFactory.vb
+1
-23
src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_Methods.vb
...ortable/Operations/VisualBasicOperationFactory_Methods.vb
+1
-1
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IObjectCreationExpression.vb
...c/IOperation/IOperationTests_IObjectCreationExpression.vb
+9
-9
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb
...peration/IOperationTests_IParameterReferenceExpression.vb
+5
-5
未找到文件。
src/Compilers/CSharp/Portable/Operations/CSharpOperationFactory.cs
浏览文件 @
78bcc23a
...
...
@@ -43,8 +43,6 @@ private static IOperation CreateInternal(BoundNode boundNode)
return
CreateBoundEventAccessOperation
((
BoundEventAccess
)
boundNode
);
case
BoundKind
.
EventAssignmentOperator
:
return
CreateBoundEventAssignmentOperatorOperation
((
BoundEventAssignmentOperator
)
boundNode
);
case
BoundKind
.
DelegateCreationExpression
:
return
CreateBoundDelegateCreationExpressionOperation
((
BoundDelegateCreationExpression
)
boundNode
);
case
BoundKind
.
Parameter
:
return
CreateBoundParameterOperation
((
BoundParameter
)
boundNode
);
case
BoundKind
.
Literal
:
...
...
@@ -288,21 +286,6 @@ private static IEventAssignmentExpression CreateBoundEventAssignmentOperatorOper
return
new
LazyEventAssignmentExpression
(
@event
,
eventInstance
,
handlerValue
,
adds
,
isInvalid
,
syntax
,
type
,
constantValue
);
}
private
static
IMethodBindingExpression
CreateBoundDelegateCreationExpressionOperation
(
BoundDelegateCreationExpression
boundDelegateCreationExpression
)
{
IMethodSymbol
method
=
boundDelegateCreationExpression
.
MethodOpt
;
bool
isVirtual
=
(
object
)
boundDelegateCreationExpression
.
MethodOpt
!=
null
&&
(
boundDelegateCreationExpression
.
MethodOpt
.
IsVirtual
||
boundDelegateCreationExpression
.
MethodOpt
.
IsAbstract
||
boundDelegateCreationExpression
.
MethodOpt
.
IsOverride
)
&&
!
boundDelegateCreationExpression
.
SuppressVirtualCalls
;
Lazy
<
IOperation
>
instance
=
new
Lazy
<
IOperation
>(()
=>
GetDelegateCreationInstance
(
boundDelegateCreationExpression
));
ISymbol
member
=
boundDelegateCreationExpression
.
MethodOpt
;
bool
isInvalid
=
boundDelegateCreationExpression
.
HasErrors
;
SyntaxNode
syntax
=
boundDelegateCreationExpression
.
Argument
.
Syntax
;
ITypeSymbol
type
=
boundDelegateCreationExpression
.
Type
;
Optional
<
object
>
constantValue
=
ConvertToOptional
(
boundDelegateCreationExpression
.
ConstantValue
);
return
new
LazyMethodBindingExpression
(
method
,
isVirtual
,
instance
,
member
,
isInvalid
,
syntax
,
type
,
constantValue
);
}
private
static
IParameterReferenceExpression
CreateBoundParameterOperation
(
BoundParameter
boundParameter
)
{
IParameterSymbol
parameter
=
boundParameter
.
ParameterSymbol
;
...
...
src/Compilers/CSharp/Portable/Operations/CSharpOperationFactory_Methods.cs
浏览文件 @
78bcc23a
...
...
@@ -191,17 +191,6 @@ private static IOperation CreateParamArray(IParameterSymbol parameter, Immutable
return
OperationFactory
.
CreateInvalidExpression
(
invocationSyntax
,
ImmutableArray
<
IOperation
>.
Empty
);
}
private
static
IOperation
GetDelegateCreationInstance
(
BoundDelegateCreationExpression
expression
)
{
BoundMethodGroup
methodGroup
=
expression
.
Argument
as
BoundMethodGroup
;
if
(
methodGroup
!=
null
)
{
return
Create
(
methodGroup
.
InstanceOpt
);
}
return
null
;
}
private
static
ImmutableArray
<
IOperation
>
GetObjectCreationMemberInitializers
(
BoundObjectCreationExpression
expression
)
{
return
BoundObjectCreationExpression
.
GetChildInitializers
(
expression
.
InitializerExpressionOpt
).
SelectAsArray
(
n
=>
Create
(
n
));
...
...
src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs
浏览文件 @
78bcc23a
...
...
@@ -2827,18 +2827,18 @@ internal sealed partial class ObjectCreationExpression : BaseObjectCreationExpre
/// </summary>
internal
sealed
partial
class
LazyObjectCreationExpression
:
BaseObjectCreationExpression
,
IHasArgumentsExpression
,
IObjectCreationExpression
{
private
readonly
Lazy
<
ImmutableArray
<
IOperation
>>
_lazy
Member
Initializers
;
private
readonly
Lazy
<
ImmutableArray
<
IOperation
>>
_lazyInitializers
;
private
readonly
Lazy
<
ImmutableArray
<
IArgument
>>
_lazyArgumentsInEvaluationOrder
;
public
LazyObjectCreationExpression
(
IMethodSymbol
constructor
,
Lazy
<
ImmutableArray
<
IOperation
>>
memberI
nitializers
,
Lazy
<
ImmutableArray
<
IArgument
>>
argumentsInEvaluationOrder
,
bool
isInvalid
,
SyntaxNode
syntax
,
ITypeSymbol
type
,
Optional
<
object
>
constantValue
)
:
base
(
constructor
,
isInvalid
,
syntax
,
type
,
constantValue
)
public
LazyObjectCreationExpression
(
IMethodSymbol
constructor
,
Lazy
<
ImmutableArray
<
IOperation
>>
i
nitializers
,
Lazy
<
ImmutableArray
<
IArgument
>>
argumentsInEvaluationOrder
,
bool
isInvalid
,
SyntaxNode
syntax
,
ITypeSymbol
type
,
Optional
<
object
>
constantValue
)
:
base
(
constructor
,
isInvalid
,
syntax
,
type
,
constantValue
)
{
_lazy
MemberInitializers
=
memberI
nitializers
;
_lazy
Initializers
=
i
nitializers
;
_lazyArgumentsInEvaluationOrder
=
argumentsInEvaluationOrder
;
}
/// <summary>
/// Explicitly-specified member initializers.
/// </summary>
public
override
ImmutableArray
<
IOperation
>
Initializers
=>
_lazy
Member
Initializers
.
Value
;
public
override
ImmutableArray
<
IOperation
>
Initializers
=>
_lazyInitializers
.
Value
;
/// <summary>
/// Arguments of the invocation, excluding the instance argument. Arguments are in evaluation order.
...
...
src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory.vb
浏览文件 @
78bcc23a
...
...
@@ -79,8 +79,6 @@ Namespace Microsoft.CodeAnalysis.Semantics
Return
CreateBoundPropertyAccessOperation
(
DirectCast
(
boundNode
,
BoundPropertyAccess
))
Case
BoundKind
.
EventAccess
Return
CreateBoundEventAccessOperation
(
DirectCast
(
boundNode
,
BoundEventAccess
))
Case
BoundKind
.
DelegateCreationExpression
Return
CreateBoundDelegateCreationExpressionOperation
(
DirectCast
(
boundNode
,
BoundDelegateCreationExpression
))
Case
BoundKind
.
FieldAccess
Return
CreateBoundFieldAccessOperation
(
DirectCast
(
boundNode
,
BoundFieldAccess
))
Case
BoundKind
.
ConditionalAccess
...
...
@@ -471,7 +469,7 @@ Namespace Microsoft.CodeAnalysis.Semantics
Dim
constructor
As
IMethodSymbol
=
boundObjectCreationExpression
.
ConstructorOpt
Dim
memberInitializers
As
Lazy
(
Of
ImmutableArray
(
Of
IOperation
))
=
New
Lazy
(
Of
ImmutableArray
(
Of
IOperation
))(
Function
()
Return
GetObjectCreation
Member
Initializers
(
boundObjectCreationExpression
)
Return
GetObjectCreationInitializers
(
boundObjectCreationExpression
)
End
Function
)
Debug
.
Assert
(
boundObjectCreationExpression
.
ConstructorOpt
IsNot
Nothing
OrElse
boundObjectCreationExpression
.
Arguments
.
IsEmpty
())
...
...
@@ -558,26 +556,6 @@ Namespace Microsoft.CodeAnalysis.Semantics
Return
New
LazyEventReferenceExpression
(
[
event
]
,
instance
,
member
,
isInvalid
,
syntax
,
type
,
constantValue
)
End
Function
Private
Shared
Function
CreateBoundDelegateCreationExpressionOperation
(
boundDelegateCreationExpression
As
BoundDelegateCreationExpression
)
As
IMethodBindingExpression
Dim
method
As
IMethodSymbol
=
boundDelegateCreationExpression
.
Method
Dim
isVirtual
As
Boolean
=
boundDelegateCreationExpression
.
Method
IsNot
Nothing
AndAlso
(
boundDelegateCreationExpression
.
Method
.
IsOverridable
OrElse
boundDelegateCreationExpression
.
Method
.
IsOverrides
OrElse
boundDelegateCreationExpression
.
Method
.
IsMustOverride
)
AndAlso
Not
boundDelegateCreationExpression
.
SuppressVirtualCalls
Dim
instance
As
Lazy
(
Of
IOperation
)
=
New
Lazy
(
Of
IOperation
)(
Function
()
If
boundDelegateCreationExpression
.
Method
.
IsShared
Then
Return
Nothing
Else
Return
Create
(
boundDelegateCreationExpression
.
ReceiverOpt
)
End
If
End
Function
)
Dim
member
As
ISymbol
=
boundDelegateCreationExpression
.
Method
Dim
isInvalid
As
Boolean
=
boundDelegateCreationExpression
.
HasErrors
Dim
syntax
As
SyntaxNode
=
boundDelegateCreationExpression
.
Syntax
Dim
type
As
ITypeSymbol
=
boundDelegateCreationExpression
.
Type
Dim
constantValue
As
[
Optional
]
(
Of
Object
)
=
ConvertToOptional
(
boundDelegateCreationExpression
.
ConstantValueOpt
)
Return
New
LazyMethodBindingExpression
(
method
,
isVirtual
,
instance
,
member
,
isInvalid
,
syntax
,
type
,
constantValue
)
End
Function
Private
Shared
Function
CreateBoundFieldAccessOperation
(
boundFieldAccess
As
BoundFieldAccess
)
As
IFieldReferenceExpression
Dim
field
As
IFieldSymbol
=
boundFieldAccess
.
FieldSymbol
Dim
instance
As
Lazy
(
Of
IOperation
)
=
New
Lazy
(
Of
IOperation
)(
...
...
src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory_Methods.vb
浏览文件 @
78bcc23a
...
...
@@ -164,7 +164,7 @@ Namespace Microsoft.CodeAnalysis.Semantics
Return
Nothing
End
Function
Private
Shared
Function
GetObjectCreation
Member
Initializers
(
expression
As
BoundObjectCreationExpression
)
As
ImmutableArray
(
Of
IOperation
)
Private
Shared
Function
GetObjectCreationInitializers
(
expression
As
BoundObjectCreationExpression
)
As
ImmutableArray
(
Of
IOperation
)
Return
If
(
expression
.
InitializerOpt
IsNot
Nothing
,
expression
.
InitializerOpt
.
Initializers
.
SelectAsArray
(
Function
(
n
)
Create
(
n
)),
ImmutableArray
(
Of
IOperation
).
Empty
)
End
Function
...
...
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IObjectCreationExpression.vb
浏览文件 @
78bcc23a
...
...
@@ -60,7 +60,7 @@ IBlockStatement (9 statements, 7 locals) (OperationKind.BlockStatement, IsInvali
Variables
:
Local_1
:
x3
As
F
Initializer
:
IObjectCreationExpression
(
Constructor
:
Sub
F
.
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
F
)
(
Syntax
:
'New F() Wit ... erty1 = ""}')
Initializers
(
1
):
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.Property1 = ""')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
F
.
Property1
As
System
.
String
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
String
)
(
Syntax
:
'Property1')
Left
:
IPropertyReferenceExpression
:
Property
F
.
Property1
As
System
.
String
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
String
)
(
Syntax
:
'Property1')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New F() Wit ... erty1 = ""}')
Right
:
ILiteralExpression
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
String
,
Constant
:
""
)
(
Syntax
:
'""')
IVariableDeclarationStatement
(
1
declarations
)
(
OperationKind
.
VariableDeclarationStatement
)
(
Syntax
:
'Dim x4 = Ne ... .Field = 2}')
...
...
@@ -68,7 +68,7 @@ IBlockStatement (9 statements, 7 locals) (OperationKind.BlockStatement, IsInvali
Variables
:
Local_1
:
x4
As
F
Initializer
:
IObjectCreationExpression
(
Constructor
:
Sub
F
.
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
F
)
(
Syntax
:
'New F() Wit ... .Field = 2}')
Initializers
(
2
):
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.Property1 = ""')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
F
.
Property1
As
System
.
String
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
String
)
(
Syntax
:
'Property1')
Left
:
IPropertyReferenceExpression
:
Property
F
.
Property1
As
System
.
String
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
String
)
(
Syntax
:
'Property1')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New F() Wit ... .Field = 2}')
Right
:
ILiteralExpression
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
String
,
Constant
:
""
)
(
Syntax
:
'""')
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'.Field = 2')
...
...
@@ -80,7 +80,7 @@ IBlockStatement (9 statements, 7 locals) (OperationKind.BlockStatement, IsInvali
Variables
:
Local_1
:
x5
As
F
Initializer
:
IObjectCreationExpression
(
Constructor
:
Sub
F
.
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
F
)
(
Syntax
:
'New F() Wit ... ld = True}}')
Initializers
(
1
):
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.Property2 ... eld = True}')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
F
.
Property2
As
B
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
B
)
(
Syntax
:
'Property2')
Left
:
IPropertyReferenceExpression
:
Property
F
.
Property2
As
B
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
B
)
(
Syntax
:
'Property2')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New F() Wit ... ld = True}}')
Right
:
IObjectCreationExpression
(
Constructor
:
Sub
B
.
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
B
)
(
Syntax
:
'New B() Wit ... eld = True}')
Initializers
(
1
):
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Boolean
)
(
Syntax
:
'.Field = True')
...
...
@@ -92,7 +92,7 @@ IBlockStatement (9 statements, 7 locals) (OperationKind.BlockStatement, IsInvali
Variables
:
Local_1
:
e1
As
F
Initializer
:
IObjectCreationExpression
(
Constructor
:
Sub
F
.
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
F
,
IsInvalid
)
(
Syntax
:
'New F() Wit ... perty2 = 1}')
Initializers
(
1
):
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
,
IsInvalid
)
(
Syntax
:
'.Property2 = 1')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
F
.
Property2
As
B
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
B
)
(
Syntax
:
'Property2')
Left
:
IPropertyReferenceExpression
:
Property
F
.
Property2
As
B
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
B
)
(
Syntax
:
'Property2')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New F() Wit ... perty2 = 1}')
Right
:
IConversionExpression
(
ConversionKind
.
Basic
,
Implicit
)
(
OperationKind
.
ConversionExpression
,
Type
:
B
,
IsInvalid
)
(
Syntax
:
'1')
ILiteralExpression
(
Text
:
1
)
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
Int32
,
Constant
:
1
)
(
Syntax
:
'1')
...
...
@@ -224,11 +224,11 @@ End Class]]>.Value
Dim
expectedOperationTree
=
<
!
[
CDATA
[
IObjectCreationExpression
(
Constructor
:
Sub
[
Class
]
.
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
[
Class
])
(
Syntax
:
'New [Class] ... }')
Initializers
(
4
):
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.X = x')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
X
As
System
.
Int32
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'X')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
X
As
System
.
Int32
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'X')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... }')
Right
:
IParameterReferenceExpression
:
x
(
OperationKind
.
ParameterReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'x')
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.Y = {x, y, 3}')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
Y
As
System
.
Int32
()
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'Y')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
Y
As
System
.
Int32
()
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'Y')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... }')
Right
:
IArrayCreationExpression
(
Element
Type
:
System
.
Int32
)
(
OperationKind
.
ArrayCreationExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'{x, y, 3}')
Dimension
Sizes
(
1
):
ILiteralExpression
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
Int32
,
Constant
:
3
)
(
Syntax
:
'{x, y, 3}')
...
...
@@ -237,7 +237,7 @@ IObjectCreationExpression (Constructor: Sub [Class]..ctor()) (OperationKind.Obje
ILocalReferenceExpression
:
y
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'y')
ILiteralExpression
(
Text
:
3
)
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
Int32
,
Constant
:
3
)
(
Syntax
:
'3')
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.Z = New Di ... om {{x, y}}')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
Z
As
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
)
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
))
(
Syntax
:
'Z')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
Z
As
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
)
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
))
(
Syntax
:
'Z')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... }')
Right
:
IObjectCreationExpression
(
Constructor
:
Sub
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
).
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
))
(
Syntax
:
'New Diction ... om {{x, y}}')
Initializers
(
1
):
IInvocationExpression
(
Sub
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
).
Add
(
key
As
System
.
Int32
,
value
As
System
.
Int32
))
(
OperationKind
.
InvocationExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'{x, y}')
...
...
@@ -247,11 +247,11 @@ IObjectCreationExpression (Constructor: Sub [Class]..ctor()) (OperationKind.Obje
IArgument
(
ArgumentKind
.
Explicit
,
Matching
Parameter
:
value
)
(
OperationKind
.
Argument
)
(
Syntax
:
'y')
ILocalReferenceExpression
:
y
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'y')
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.C = New [C ... .X = field}')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
C
As
[
Class
]
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
[
Class
])
(
Syntax
:
'C')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
C
As
[
Class
]
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
[
Class
])
(
Syntax
:
'C')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... }')
Right
:
IObjectCreationExpression
(
Constructor
:
Sub
[
Class
]
.
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
[
Class
])
(
Syntax
:
'New [Class] ... .X = field}')
Initializers
(
1
):
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.X = field')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
X
As
System
.
Int32
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'X')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
X
As
System
.
Int32
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'X')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... .X = field}')
Right
:
IFieldReferenceExpression
:
[
Class
].
field
As
System
.
Int32
(
OperationKind
.
FieldReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'field')
Instance
Receiver
:
IInstanceReferenceExpression
(
InstanceReferenceKind
.
Implicit
)
(
OperationKind
.
InstanceReferenceExpression
,
Type
:
[
Class
])
(
Syntax
:
'field')
...
...
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IParameterReferenceExpression.vb
浏览文件 @
78bcc23a
...
...
@@ -250,11 +250,11 @@ End Class]]>.Value
Dim
expectedOperationTree
=
<
!
[
CDATA
[
IObjectCreationExpression
(
Constructor
:
Sub
[
Class
]
.
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
[
Class
])
(
Syntax
:
'New [Class] ... }')
Initializers
(
4
):
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.X = x')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
X
As
System
.
Int32
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'X')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
X
As
System
.
Int32
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'X')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... }')
Right
:
IParameterReferenceExpression
:
x
(
OperationKind
.
ParameterReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'x')
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.Y = {x, y, 3}')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
Y
As
System
.
Int32
()
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'Y')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
Y
As
System
.
Int32
()
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'Y')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... }')
Right
:
IArrayCreationExpression
(
Element
Type
:
System
.
Int32
)
(
OperationKind
.
ArrayCreationExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'{x, y, 3}')
Dimension
Sizes
(
1
):
ILiteralExpression
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
Int32
,
Constant
:
3
)
(
Syntax
:
'{x, y, 3}')
...
...
@@ -263,7 +263,7 @@ IObjectCreationExpression (Constructor: Sub [Class]..ctor()) (OperationKind.Obje
IParameterReferenceExpression
:
y
(
OperationKind
.
ParameterReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'y')
ILiteralExpression
(
Text
:
3
)
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
Int32
,
Constant
:
3
)
(
Syntax
:
'3')
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.Z = New Di ... om {{x, y}}')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
Z
As
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
)
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
))
(
Syntax
:
'Z')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
Z
As
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
)
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
))
(
Syntax
:
'Z')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... }')
Right
:
IObjectCreationExpression
(
Constructor
:
Sub
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
).
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
))
(
Syntax
:
'New Diction ... om {{x, y}}')
Initializers
(
1
):
IInvocationExpression
(
Sub
System
.
Collections
.
Generic
.
Dictionary
(
Of
System
.
Int32
,
System
.
Int32
).
Add
(
key
As
System
.
Int32
,
value
As
System
.
Int32
))
(
OperationKind
.
InvocationExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'{x, y}')
...
...
@@ -273,11 +273,11 @@ IObjectCreationExpression (Constructor: Sub [Class]..ctor()) (OperationKind.Obje
IArgument
(
ArgumentKind
.
Explicit
,
Matching
Parameter
:
value
)
(
OperationKind
.
Argument
)
(
Syntax
:
'y')
IParameterReferenceExpression
:
y
(
OperationKind
.
ParameterReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'y')
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.C = New [C ... th {.X = z}')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
C
As
[
Class
]
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
[
Class
])
(
Syntax
:
'C')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
C
As
[
Class
]
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
[
Class
])
(
Syntax
:
'C')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... }')
Right
:
IObjectCreationExpression
(
Constructor
:
Sub
[
Class
]
.
.
ctor
())
(
OperationKind
.
ObjectCreationExpression
,
Type
:
[
Class
])
(
Syntax
:
'New [Class] ... th {.X = z}')
Initializers
(
1
):
IAssignmentExpression
(
OperationKind
.
AssignmentExpression
,
Type
:
System
.
Void
)
(
Syntax
:
'.X = z')
Left
:
I
Indexed
PropertyReferenceExpression
:
Property
[
Class
]
.
X
As
System
.
Int32
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'X')
Left
:
IPropertyReferenceExpression
:
Property
[
Class
]
.
X
As
System
.
Int32
(
OperationKind
.
PropertyReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'X')
Instance
Receiver
:
IOperation
:
(
OperationKind
.
None
)
(
Syntax
:
'New [Class] ... th {.X = z}')
Right
:
IParameterReferenceExpression
:
z
(
OperationKind
.
ParameterReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'z')
]]
>
.
Value
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录