Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
4e5f0baa
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,发现更多精彩内容 >>
未验证
提交
4e5f0baa
编写于
7月 19, 2017
作者:
F
Fredric Silberberg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update VB containing type logic, updated visitor.
上级
6d27d2bc
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
6 deletion
+20
-6
src/Compilers/Core/Portable/Operations/OperationKind.cs
src/Compilers/Core/Portable/Operations/OperationKind.cs
+1
-1
src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
+1
-1
src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory.vb
...lBasic/Portable/Operations/VisualBasicOperationFactory.vb
+10
-1
src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs
...t/Utilities/Portable/Compilation/OperationTreeVerifier.cs
+8
-3
未找到文件。
src/Compilers/Core/Portable/Operations/OperationKind.cs
浏览文件 @
4e5f0baa
...
...
@@ -139,7 +139,7 @@ public enum OperationKind
/// <summary>Indicates an <see cref="ITupleExpression"/>.</summary>
TupleExpression
=
0x124
,
/// <summary>Indicates an <see cref="IDynamicMemberReferenceExpression"/>.</summary>
Dynamic
Access
Expression
=
0x125
,
Dynamic
MemberReference
Expression
=
0x125
,
// Expressions that occur only in C#.
...
...
src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
浏览文件 @
4e5f0baa
...
...
@@ -66,7 +66,7 @@ Microsoft.CodeAnalysis.OperationKind.ConversionExpression = 258 -> Microsoft.Cod
Microsoft.CodeAnalysis.OperationKind.DeclarationPattern = 1040 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.DefaultCaseClause = 1042 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.DefaultValueExpression = 512 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.Dynamic
Access
Expression = 293 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.Dynamic
MemberReference
Expression = 293 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EmptyStatement = 9 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EndStatement = 81 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.EventAssignmentExpression = 283 -> Microsoft.CodeAnalysis.OperationKind
...
...
src/Compilers/VisualBasic/Portable/Operations/VisualBasicOperationFactory.vb
浏览文件 @
4e5f0baa
...
...
@@ -645,7 +645,16 @@ Namespace Microsoft.CodeAnalysis.Semantics
If
boundLateMemberAccess
.
TypeArgumentsOpt
IsNot
Nothing
Then
typeArguments
=
ImmutableArray
(
Of
ITypeSymbol
).
CastUp
(
boundLateMemberAccess
.
TypeArgumentsOpt
.
Arguments
)
End
If
Dim
containingType
As
ITypeSymbol
=
boundLateMemberAccess
.
ContainerTypeOpt
Dim
containingType
As
ITypeSymbol
=
Nothing
' If there's nothing being late-bound against, something is very wrong
Debug
.
Assert
(
boundLateMemberAccess
.
ReceiverOpt
IsNot
Nothing
OrElse
boundLateMemberAccess
.
ContainerTypeOpt
IsNot
Nothing
)
' Only set containing type if the container is set to something, and either there is no reciever, or the receiver's type
' does not match the type of the containing type.
If
(
boundLateMemberAccess
.
ContainerTypeOpt
IsNot
Nothing
AndAlso
(
boundLateMemberAccess
.
ReceiverOpt
Is
Nothing
OrElse
boundLateMemberAccess
.
ContainerTypeOpt
<>
boundLateMemberAccess
.
ReceiverOpt
.
Type
))
Then
containingType
=
boundLateMemberAccess
.
ContainerTypeOpt
End
If
Dim
syntax
As
SyntaxNode
=
boundLateMemberAccess
.
Syntax
Dim
type
As
ITypeSymbol
=
boundLateMemberAccess
.
Type
Dim
constantValue
As
[
Optional
]
(
Of
Object
)
=
ConvertToOptional
(
boundLateMemberAccess
.
ConstantValueOpt
)
...
...
src/Test/Utilities/Portable/Compilation/OperationTreeVerifier.cs
浏览文件 @
4e5f0baa
...
...
@@ -187,10 +187,10 @@ private void LogSymbol(ISymbol symbol, string header, bool logDisplayString = tr
LogString
(
$"
{
symbolStr
}
"
);
}
private
void
LogType
(
ITypeSymbol
type
)
private
void
LogType
(
ITypeSymbol
type
,
string
header
=
"Type"
)
{
var
typeStr
=
type
!=
null
?
type
.
ToTestDisplayString
()
:
"null"
;
LogString
(
$"
Type
:
{
typeStr
}
"
);
LogString
(
$"
{
header
}
:
{
typeStr
}
"
);
}
#
endregion
...
...
@@ -1051,7 +1051,12 @@ public override void VisitParenthesizedExpression(IParenthesizedExpression opera
public
override
void
VisitDynamicMemberReferenceExpression
(
IDynamicMemberReferenceExpression
operation
)
{
LogString
(
nameof
(
IDynamicMemberReferenceExpression
));
LogString
(
$" (Member name:
{
operation
.
MemberName
}
, Containing Type:
{(
object
)
operation
.
ContainingType
??
"null"
}
)"
);
// (Member Name: "quoted name", Containing Type: type)
LogString
(
" ("
);
LogConstant
((
object
)
operation
.
MemberName
,
"Member Name"
);
LogString
(
", "
);
LogType
(
operation
.
ContainingType
,
"Containing Type"
);
LogString
(
")"
);
LogCommonPropertiesAndNewLine
(
operation
);
if
(!
operation
.
TypeArguments
.
IsDefaultOrEmpty
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录