Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
c4a5bbe0
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,发现更多精彩内容 >>
提交
c4a5bbe0
编写于
9月 28, 2017
作者:
M
Manish Vasani
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add unit tests for IArrayElementReferenceExpression and make the API public again
Fixes #22006
上级
dc4b052f
变更
15
展开全部
隐藏空白更改
内联
并排
Showing
15 changed file
with
1715 addition
and
23 deletion
+1715
-23
src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IArrayElementReferenceExpression.cs
...ation/IOperationTests_IArrayElementReferenceExpression.cs
+916
-0
src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IObjectCreationExpression.cs
...c/IOperation/IOperationTests_IObjectCreationExpression.cs
+2
-2
src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.cs
...ic/IOperation/IOperationTests_IWhileUntilLoopStatement.cs
+1
-1
src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs
...ilers/Core/Portable/Generated/Operations.xml.Generated.cs
+1
-3
src/Compilers/Core/Portable/Operations/IArrayElementReferenceExpression.cs
...e/Portable/Operations/IArrayElementReferenceExpression.cs
+1
-1
src/Compilers/Core/Portable/Operations/OperationCloner.cs
src/Compilers/Core/Portable/Operations/OperationCloner.cs
+1
-1
src/Compilers/Core/Portable/Operations/OperationKind.cs
src/Compilers/Core/Portable/Operations/OperationKind.cs
+2
-3
src/Compilers/Core/Portable/Operations/OperationVisitor.cs
src/Compilers/Core/Portable/Operations/OperationVisitor.cs
+2
-4
src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
+6
-0
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_ArrayCreationAndInitializer.vb
...IOperation/IOperationTests_ArrayCreationAndInitializer.vb
+3
-3
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IArrayElementReferenceExpression.vb
...ation/IOperationTests_IArrayElementReferenceExpression.vb
+775
-0
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IForLoopStatement.vb
.../Semantic/IOperation/IOperationTests_IForLoopStatement.vb
+2
-2
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.vb
...ic/IOperation/IOperationTests_IWhileUntilLoopStatement.vb
+1
-1
src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs
...t/Utilities/Portable/Compilation/OperationTreeVerifier.cs
+1
-1
src/Test/Utilities/Portable/Compilation/TestOperationWalker.cs
...est/Utilities/Portable/Compilation/TestOperationWalker.cs
+1
-1
未找到文件。
src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IArrayElementReferenceExpression.cs
0 → 100644
浏览文件 @
c4a5bbe0
此差异已折叠。
点击以展开。
src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IObjectCreationExpression.cs
浏览文件 @
c4a5bbe0
...
...
@@ -350,13 +350,13 @@ static void Main()
Initializer: IObjectOrCollectionInitializerExpression (OperationKind.ObjectOrCollectionInitializerExpression, Type: System.Int32[]) (Syntax: '{ [0] = 1, [1] = 2 }')
Initializers(2):
ISimpleAssignmentExpression (OperationKind.SimpleAssignmentExpression, Type: System.Int32) (Syntax: '[0] = 1')
Left: IArrayElementReferenceExpression (OperationKind.
None
) (Syntax: '[0]')
Left: IArrayElementReferenceExpression (OperationKind.
ArrayElementReferenceExpression, Type: System.Int32
) (Syntax: '[0]')
Array reference: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: System.Int32[]) (Syntax: 'a')
Indices(1):
ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 0) (Syntax: '0')
Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1')
ISimpleAssignmentExpression (OperationKind.SimpleAssignmentExpression, Type: System.Int32) (Syntax: '[1] = 2')
Left: IArrayElementReferenceExpression (OperationKind.
None
) (Syntax: '[1]')
Left: IArrayElementReferenceExpression (OperationKind.
ArrayElementReferenceExpression, Type: System.Int32
) (Syntax: '[1]')
Array reference: IInstanceReferenceExpression (OperationKind.InstanceReferenceExpression, Type: System.Int32[]) (Syntax: 'a')
Indices(1):
ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1')
...
...
src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.cs
浏览文件 @
c4a5bbe0
...
...
@@ -42,7 +42,7 @@ static void Main()
IExpressionStatement (OperationKind.ExpressionStatement) (Syntax: 'sum += ids[i];')
Expression: ICompoundAssignmentExpression (BinaryOperatorKind.Add) (OperationKind.CompoundAssignmentExpression, Type: System.Int32) (Syntax: 'sum += ids[i]')
Left: ILocalReferenceExpression: sum (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'sum')
Right: IArrayElementReferenceExpression (OperationKind.
None
) (Syntax: 'ids[i]')
Right: IArrayElementReferenceExpression (OperationKind.
ArrayElementReferenceExpression, Type: System.Int32
) (Syntax: 'ids[i]')
Array reference: ILocalReferenceExpression: ids (OperationKind.LocalReferenceExpression, Type: System.Int32[]) (Syntax: 'ids')
Indices(1):
ILocalReferenceExpression: i (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'i')
...
...
src/Compilers/Core/Portable/Generated/Operations.xml.Generated.cs
浏览文件 @
c4a5bbe0
...
...
@@ -311,9 +311,7 @@ public LazyArrayCreationExpression(Lazy<ImmutableArray<IOperation>> dimensionSiz
internal
abstract
partial
class
BaseArrayElementReferenceExpression
:
Operation
,
IArrayElementReferenceExpression
{
protected
BaseArrayElementReferenceExpression
(
SemanticModel
semanticModel
,
SyntaxNode
syntax
,
ITypeSymbol
type
,
Optional
<
object
>
constantValue
,
bool
isImplicit
)
:
// https://github.com/dotnet/roslyn/issues/22006
//base(OperationKind.ArrayElementReferenceExpression, semanticModel, syntax, type, constantValue, isImplicit)
base
(
OperationKind
.
None
,
semanticModel
,
syntax
,
type
,
constantValue
,
isImplicit
)
base
(
OperationKind
.
ArrayElementReferenceExpression
,
semanticModel
,
syntax
,
type
,
constantValue
,
isImplicit
)
{
}
...
...
src/Compilers/Core/Portable/Operations/IArrayElementReferenceExpression.cs
浏览文件 @
c4a5bbe0
...
...
@@ -11,7 +11,7 @@ namespace Microsoft.CodeAnalysis.Semantics
/// This interface is reserved for implementation by its associated APIs. We reserve the right to
/// change it in the future.
/// </remarks>
internal
interface
IArrayElementReferenceExpression
:
IOperation
// https://github.com/dotnet/roslyn/issues/22006
public
interface
IArrayElementReferenceExpression
:
IOperation
{
/// <summary>
/// Array to be indexed.
...
...
src/Compilers/Core/Portable/Operations/OperationCloner.cs
浏览文件 @
c4a5bbe0
...
...
@@ -190,7 +190,7 @@ public override IOperation VisitOmittedArgumentExpression(IOmittedArgumentExpres
return
new
OmittedArgumentExpression
(((
Operation
)
operation
).
SemanticModel
,
operation
.
Syntax
,
operation
.
Type
,
operation
.
ConstantValue
,
operation
.
IsImplicit
);
}
internal
override
IOperation
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
,
object
argument
)
public
override
IOperation
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
,
object
argument
)
{
return
new
ArrayElementReferenceExpression
(
Visit
(
operation
.
ArrayReference
),
VisitArray
(
operation
.
Indices
),
((
Operation
)
operation
).
SemanticModel
,
operation
.
Syntax
,
operation
.
Type
,
operation
.
ConstantValue
,
operation
.
IsImplicit
);
}
...
...
src/Compilers/Core/Portable/Operations/OperationKind.cs
浏览文件 @
c4a5bbe0
...
...
@@ -76,9 +76,8 @@ public enum OperationKind
ConversionExpression
=
0x102
,
/// <summary>Indicates an <see cref="IInvocationExpression"/>.</summary>
InvocationExpression
=
0x103
,
// https://github.com/dotnet/roslyn/issues/22006
// /// <summary>Indicates an <see cref="IArrayElementReferenceExpression"/>.</summary>
// ArrayElementReferenceExpression = 0x104,
/// <summary>Indicates an <see cref="IArrayElementReferenceExpression"/>.</summary>
ArrayElementReferenceExpression
=
0x104
,
/// <summary>Indicates an <see cref="ILocalReferenceExpression"/>.</summary>
LocalReferenceExpression
=
0x105
,
/// <summary>Indicates an <see cref="IParameterReferenceExpression"/>.</summary>
...
...
src/Compilers/Core/Portable/Operations/OperationVisitor.cs
浏览文件 @
c4a5bbe0
...
...
@@ -189,8 +189,7 @@ public virtual void VisitOmittedArgumentExpression(IOmittedArgumentExpression op
DefaultVisit
(
operation
);
}
// https://github.com/dotnet/roslyn/issues/22006
internal
virtual
void
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
)
public
virtual
void
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
)
{
DefaultVisit
(
operation
);
}
...
...
@@ -682,8 +681,7 @@ public virtual TResult VisitOmittedArgumentExpression(IOmittedArgumentExpression
return
DefaultVisit
(
operation
,
argument
);
}
// https://github.com/dotnet/roslyn/issues/22006
internal
virtual
TResult
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
,
TArgument
argument
)
public
virtual
TResult
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
,
TArgument
argument
)
{
return
DefaultVisit
(
operation
,
argument
);
}
...
...
src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
浏览文件 @
c4a5bbe0
...
...
@@ -57,6 +57,7 @@ Microsoft.CodeAnalysis.OperationKind.AnonymousFunctionExpression = 273 -> Micros
Microsoft.CodeAnalysis.OperationKind.AnonymousObjectCreationExpression = 287 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.Argument = 1031 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ArrayCreationExpression = 276 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ArrayElementReferenceExpression = 260 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.ArrayInitializer = 1029 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.AwaitExpression = 279 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.BinaryOperatorExpression = 270 -> Microsoft.CodeAnalysis.OperationKind
...
...
@@ -207,6 +208,9 @@ Microsoft.CodeAnalysis.Semantics.IArgument.Value.get -> Microsoft.CodeAnalysis.I
Microsoft.CodeAnalysis.Semantics.IArrayCreationExpression
Microsoft.CodeAnalysis.Semantics.IArrayCreationExpression.DimensionSizes.get -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.IOperation>
Microsoft.CodeAnalysis.Semantics.IArrayCreationExpression.Initializer.get -> Microsoft.CodeAnalysis.Semantics.IArrayInitializer
Microsoft.CodeAnalysis.Semantics.IArrayElementReferenceExpression
Microsoft.CodeAnalysis.Semantics.IArrayElementReferenceExpression.ArrayReference.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.IArrayElementReferenceExpression.Indices.get -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.IOperation>
Microsoft.CodeAnalysis.Semantics.IArrayInitializer
Microsoft.CodeAnalysis.Semantics.IArrayInitializer.ElementValues.get -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.IOperation>
Microsoft.CodeAnalysis.Semantics.IAssignmentExpression
...
...
@@ -504,6 +508,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitAnonymousFunction
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitAnonymousObjectCreationExpression(Microsoft.CodeAnalysis.Semantics.IAnonymousObjectCreationExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitArgument(Microsoft.CodeAnalysis.Semantics.IArgument operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitArrayCreationExpression(Microsoft.CodeAnalysis.Semantics.IArrayCreationExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitArrayElementReferenceExpression(Microsoft.CodeAnalysis.Semantics.IArrayElementReferenceExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitArrayInitializer(Microsoft.CodeAnalysis.Semantics.IArrayInitializer operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitAwaitExpression(Microsoft.CodeAnalysis.Semantics.IAwaitExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitBinaryOperatorExpression(Microsoft.CodeAnalysis.Semantics.IBinaryOperatorExpression operation) -> void
...
...
@@ -590,6 +595,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.Vi
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitAnonymousObjectCreationExpression(Microsoft.CodeAnalysis.Semantics.IAnonymousObjectCreationExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitArgument(Microsoft.CodeAnalysis.Semantics.IArgument operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitArrayCreationExpression(Microsoft.CodeAnalysis.Semantics.IArrayCreationExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitArrayElementReferenceExpression(Microsoft.CodeAnalysis.Semantics.IArrayElementReferenceExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitArrayInitializer(Microsoft.CodeAnalysis.Semantics.IArrayInitializer operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitAwaitExpression(Microsoft.CodeAnalysis.Semantics.IAwaitExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitBinaryOperatorExpression(Microsoft.CodeAnalysis.Semantics.IBinaryOperatorExpression operation, TArgument argument) -> TResult
...
...
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_ArrayCreationAndInitializer.vb
浏览文件 @
c4a5bbe0
...
...
@@ -278,7 +278,7 @@ End Class]]>.Value
IArrayCreationExpression
(
OperationKind
.
ArrayCreationExpression
,
Type
:
System
.
Int32
(),
IsInvalid
)
(
Syntax
:
'New Integer(x(0)) {1, 2}')
Dimension
Sizes
(
1
):
IBinaryOperatorExpression
(
BinaryOperatorKind
.
Add
,
Checked
)
(
OperationKind
.
BinaryOperatorExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'x(0)')
Left
:
IArrayElementReferenceExpression
(
OperationKind
.
None
)
(
Syntax
:
'x(0)')
Left
:
IArrayElementReferenceExpression
(
OperationKind
.
ArrayElementReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'x(0)')
Array
reference
:
ILocalReferenceExpression
:
x
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'x')
Indices
(
1
):
ILiteralExpression
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
Int32
,
Constant
:
0
)
(
Syntax
:
'0')
...
...
@@ -565,13 +565,13 @@ End Class]]>.Value
IArrayCreationExpression
(
OperationKind
.
ArrayCreationExpression
,
Type
:
System
.
Int32
(,))
(
Syntax
:
'New Integer ... ), x(1)) {}')
Dimension
Sizes
(
2
):
IBinaryOperatorExpression
(
BinaryOperatorKind
.
Add
,
Checked
)
(
OperationKind
.
BinaryOperatorExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'x(0)')
Left
:
IArrayElementReferenceExpression
(
OperationKind
.
None
)
(
Syntax
:
'x(0)')
Left
:
IArrayElementReferenceExpression
(
OperationKind
.
ArrayElementReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'x(0)')
Array
reference
:
IParameterReferenceExpression
:
x
(
OperationKind
.
ParameterReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'x')
Indices
(
1
):
ILiteralExpression
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
Int32
,
Constant
:
0
)
(
Syntax
:
'0')
Right
:
ILiteralExpression
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
Int32
,
Constant
:
1
)
(
Syntax
:
'x(0)')
IBinaryOperatorExpression
(
BinaryOperatorKind
.
Add
,
Checked
)
(
OperationKind
.
BinaryOperatorExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'x(1)')
Left
:
IArrayElementReferenceExpression
(
OperationKind
.
None
)
(
Syntax
:
'x(1)')
Left
:
IArrayElementReferenceExpression
(
OperationKind
.
ArrayElementReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'x(1)')
Array
reference
:
IParameterReferenceExpression
:
x
(
OperationKind
.
ParameterReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'x')
Indices
(
1
):
ILiteralExpression
(
OperationKind
.
LiteralExpression
,
Type
:
System
.
Int32
,
Constant
:
1
)
(
Syntax
:
'1')
...
...
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IArrayElementReferenceExpression.vb
0 → 100644
浏览文件 @
c4a5bbe0
此差异已折叠。
点击以展开。
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IForLoopStatement.vb
浏览文件 @
c4a5bbe0
...
...
@@ -41,7 +41,7 @@ IForToLoopStatement (LoopKind.ForTo) (OperationKind.LoopStatement) (Syntax: 'For
Instance
Receiver
:
null
Arguments
(
1
):
IArgument
(
ArgumentKind
.
Explicit
,
Matching
Parameter
:
value
)
(
OperationKind
.
Argument
)
(
Syntax
:
'myarray(i)')
IArrayElementReferenceExpression
(
OperationKind
.
None
)
(
Syntax
:
'myarray(i)')
IArrayElementReferenceExpression
(
OperationKind
.
ArrayElementReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'myarray(i)')
Array
reference
:
ILocalReferenceExpression
:
myarray
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'myarray')
Indices
(
1
):
ILocalReferenceExpression
:
i
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'i')
...
...
@@ -91,7 +91,7 @@ IForToLoopStatement (LoopKind.ForTo) (OperationKind.LoopStatement) (Syntax: 'For
Instance
Receiver
:
null
Arguments
(
1
):
IArgument
(
ArgumentKind
.
Explicit
,
Matching
Parameter
:
value
)
(
OperationKind
.
Argument
)
(
Syntax
:
'myarray(i)')
IArrayElementReferenceExpression
(
OperationKind
.
None
)
(
Syntax
:
'myarray(i)')
IArrayElementReferenceExpression
(
OperationKind
.
ArrayElementReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'myarray(i)')
Array
reference
:
ILocalReferenceExpression
:
myarray
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'myarray')
Indices
(
1
):
ILocalReferenceExpression
:
i
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'i')
...
...
src/Compilers/VisualBasic/Test/Semantic/IOperation/IOperationTests_IWhileUntilLoopStatement.vb
浏览文件 @
c4a5bbe0
...
...
@@ -39,7 +39,7 @@ IDoLoopStatement (DoLoopKind: DoWhileBottomLoop) (LoopKind.Do) (OperationKind.Lo
IExpressionStatement
(
OperationKind
.
ExpressionStatement
)
(
Syntax
:
'sum += ids(i)')
Expression
:
ICompoundAssignmentExpression
(
BinaryOperatorKind
.
Add
,
Checked
)
(
OperationKind
.
CompoundAssignmentExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'sum += ids(i)')
Left
:
ILocalReferenceExpression
:
sum
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'sum')
Right
:
IArrayElementReferenceExpression
(
OperationKind
.
None
)
(
Syntax
:
'ids(i)')
Right
:
IArrayElementReferenceExpression
(
OperationKind
.
ArrayElementReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'ids(i)')
Array
reference
:
ILocalReferenceExpression
:
ids
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
())
(
Syntax
:
'ids')
Indices
(
1
):
ILocalReferenceExpression
:
i
(
OperationKind
.
LocalReferenceExpression
,
Type
:
System
.
Int32
)
(
Syntax
:
'i')
...
...
src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs
浏览文件 @
c4a5bbe0
...
...
@@ -727,7 +727,7 @@ public override void VisitOmittedArgumentExpression(IOmittedArgumentExpression o
LogCommonPropertiesAndNewLine
(
operation
);
}
internal
override
void
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
)
public
override
void
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
)
{
LogString
(
nameof
(
IArrayElementReferenceExpression
));
LogCommonPropertiesAndNewLine
(
operation
);
...
...
src/Test/Utilities/Portable/Compilation/TestOperationWalker.cs
浏览文件 @
c4a5bbe0
...
...
@@ -245,7 +245,7 @@ public override void VisitOmittedArgumentExpression(IOmittedArgumentExpression o
base
.
VisitOmittedArgumentExpression
(
operation
);
}
internal
override
void
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
)
public
override
void
VisitArrayElementReferenceExpression
(
IArrayElementReferenceExpression
operation
)
{
base
.
VisitArrayElementReferenceExpression
(
operation
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录