Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
e8293e17
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,发现更多精彩内容 >>
提交
e8293e17
编写于
6月 02, 2016
作者:
C
Charles Stoner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change BadExpression parameter from BoundNode[] to ImmutableArray<BoundNode>
上级
e3f0ca3e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
15 deletion
+7
-15
src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
+7
-15
未找到文件。
src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
浏览文件 @
e8293e17
...
...
@@ -112,7 +112,7 @@ private BoundBadExpression BadExpression(CSharpSyntaxNode syntax, BoundNode chil
/// <summary>
/// Generates a new <see cref="BoundBadExpression"/> with no known type, and the given bound children.
/// </summary>
private
BoundBadExpression
BadExpression
(
CSharpSyntaxNode
syntax
,
params
BoundNode
[]
childNodes
)
private
BoundBadExpression
BadExpression
(
CSharpSyntaxNode
syntax
,
ImmutableArray
<
BoundNode
>
childNodes
)
{
return
BadExpression
(
syntax
,
LookupResultKind
.
Empty
,
ImmutableArray
<
Symbol
>.
Empty
,
childNodes
);
}
...
...
@@ -133,14 +133,6 @@ protected BoundBadExpression BadExpression(CSharpSyntaxNode syntax, LookupResult
return
BadExpression
(
syntax
,
lookupResultKind
,
ImmutableArray
<
Symbol
>.
Empty
,
childNode
);
}
/// <summary>
/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookup resultKind and the given bound children.
/// </summary>
protected
BoundBadExpression
BadExpression
(
CSharpSyntaxNode
syntax
,
LookupResultKind
lookupResultKind
,
params
BoundNode
[]
childNodes
)
{
return
BadExpression
(
syntax
,
lookupResultKind
,
ImmutableArray
<
Symbol
>.
Empty
,
childNodes
);
}
/// <summary>
/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookupResultKind and given symbols for GetSemanticInfo API.
/// </summary>
...
...
@@ -170,12 +162,12 @@ private BoundBadExpression BadExpression(CSharpSyntaxNode syntax, LookupResultKi
/// Generates a new <see cref="BoundBadExpression"/> with no known type, given lookupResultKind and given symbols for GetSemanticInfo API,
/// and the given bound children.
/// </summary>
private
BoundBadExpression
BadExpression
(
CSharpSyntaxNode
syntax
,
LookupResultKind
resultKind
,
ImmutableArray
<
Symbol
>
symbols
,
params
BoundNode
[]
childNodes
)
private
BoundBadExpression
BadExpression
(
CSharpSyntaxNode
syntax
,
LookupResultKind
resultKind
,
ImmutableArray
<
Symbol
>
symbols
,
ImmutableArray
<
BoundNode
>
childNodes
)
{
return
new
BoundBadExpression
(
syntax
,
resultKind
,
symbols
,
ImmutableArray
.
Create
(
childNodes
)
,
childNodes
,
CreateErrorType
());
}
...
...
@@ -655,8 +647,8 @@ private BoundExpression BindTupleExpression(TupleExpressionSyntax node, Diagnost
{
// this should be a parse error already.
var
args
=
numElements
==
1
?
new
BoundExpression
[]
{
BindValue
(
arguments
[
0
].
Expression
,
diagnostics
,
BindValueKind
.
RValue
)
}
:
SpecializedCollections
.
EmptyArray
<
BoundExpression
>()
;
ImmutableArray
.
Create
<
BoundNode
>(
BindValue
(
arguments
[
0
].
Expression
,
diagnostics
,
BindValueKind
.
RValue
))
:
ImmutableArray
<
BoundNode
>.
Empty
;
return
BadExpression
(
node
,
args
);
}
...
...
@@ -674,7 +666,7 @@ private BoundExpression BindTupleExpression(TupleExpressionSyntax node, Diagnost
int
countOfExplicitNames
=
0
;
// prepare and check element names and types
for
(
int
i
=
0
,
l
=
numElements
;
i
<
l
;
i
++)
for
(
int
i
=
0
;
i
<
numElements
;
i
++)
{
ArgumentSyntax
argumentSyntax
=
arguments
[
i
];
string
name
=
null
;
...
...
@@ -6156,7 +6148,7 @@ private BoundExpression BindPointerElementAccess(ExpressionSyntax node, BoundExp
{
Error
(
diagnostics
,
ErrorCode
.
ERR_PtrIndexSingle
,
node
);
}
return
new
BoundPointerElementAccess
(
node
,
expr
,
BadExpression
(
node
,
BuildArgumentsForErrorRecovery
(
analyzedArguments
).
ToArray
(
)),
CheckOverflowAtRuntime
,
pointedAtType
,
hasErrors
:
true
);
return
new
BoundPointerElementAccess
(
node
,
expr
,
BadExpression
(
node
,
StaticCast
<
BoundNode
>.
From
(
BuildArgumentsForErrorRecovery
(
analyzedArguments
)
)),
CheckOverflowAtRuntime
,
pointedAtType
,
hasErrors
:
true
);
}
if
(
pointedAtType
.
SpecialType
==
SpecialType
.
System_Void
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录