Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
6e83358c
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,发现更多精彩内容 >>
提交
6e83358c
编写于
3月 10, 2017
作者:
V
vsadov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more refactoring
上级
6be3d452
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
281 addition
and
322 deletion
+281
-322
src/Compilers/CSharp/Portable/Binder/Binder.ValueChecks.cs
src/Compilers/CSharp/Portable/Binder/Binder.ValueChecks.cs
+275
-316
src/Compilers/CSharp/Portable/Binder/Binder_Deconstruct.cs
src/Compilers/CSharp/Portable/Binder/Binder_Deconstruct.cs
+1
-1
src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
+1
-1
src/Compilers/CSharp/Portable/Binder/Binder_Operators.cs
src/Compilers/CSharp/Portable/Binder/Binder_Operators.cs
+2
-2
src/Compilers/CSharp/Portable/Binder/Binder_Statements.cs
src/Compilers/CSharp/Portable/Binder/Binder_Statements.cs
+1
-1
src/ExpressionEvaluator/CSharp/Source/ExpressionCompiler/CompilationContext.cs
...or/CSharp/Source/ExpressionCompiler/CompilationContext.cs
+1
-1
未找到文件。
src/Compilers/CSharp/Portable/Binder/Binder.ValueChecks.cs
浏览文件 @
6e83358c
此差异已折叠。
点击以展开。
src/Compilers/CSharp/Portable/Binder/Binder_Deconstruct.cs
浏览文件 @
6e83358c
...
...
@@ -664,7 +664,7 @@ private BoundTupleLiteral DeconstructionVariablesAsTuple(CSharpSyntaxNode syntax
}
default
:
var
boundVariable
=
BindExpression
(
node
,
diagnostics
,
invoked
:
false
,
indexed
:
false
);
var
checkedVariable
=
CheckValue
(
boundVariable
,
BindValueKind
.
Assign
ment
,
diagnostics
);
var
checkedVariable
=
CheckValue
(
boundVariable
,
BindValueKind
.
Assign
able
,
diagnostics
);
if
(
expression
==
null
&&
checkedVariable
.
Kind
!=
BoundKind
.
DiscardExpression
)
{
expression
=
node
;
...
...
src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
浏览文件 @
6e83358c
...
...
@@ -3683,7 +3683,7 @@ private BoundExpression MakeBadExpressionForObjectCreation(ObjectCreationExpress
BoundKind
boundMemberKind
=
boundMember
.
Kind
;
SyntaxKind
rhsKind
=
namedAssignment
.
Right
.
Kind
();
bool
isRhsNestedInitializer
=
rhsKind
==
SyntaxKind
.
ObjectInitializerExpression
||
rhsKind
==
SyntaxKind
.
CollectionInitializerExpression
;
BindValueKind
valueKind
=
isRhsNestedInitializer
?
BindValueKind
.
RValue
:
BindValueKind
.
Assign
ment
;
BindValueKind
valueKind
=
isRhsNestedInitializer
?
BindValueKind
.
RValue
:
BindValueKind
.
Assign
able
;
ImmutableArray
<
BoundExpression
>
arguments
=
ImmutableArray
<
BoundExpression
>.
Empty
;
ImmutableArray
<
string
>
argumentNamesOpt
=
default
(
ImmutableArray
<
string
>);
...
...
src/Compilers/CSharp/Portable/Binder/Binder_Operators.cs
浏览文件 @
6e83358c
...
...
@@ -75,7 +75,7 @@ private BoundExpression BindCompoundAssignment(AssignmentExpressionSyntax node,
}
}
if
(
left
.
Kind
==
BoundKind
.
EventAccess
&&
!
CheckEventValueKind
((
BoundEventAccess
)
left
,
BindValueKind
.
Assign
ment
,
diagnostics
))
if
(
left
.
Kind
==
BoundKind
.
EventAccess
&&
!
CheckEventValueKind
((
BoundEventAccess
)
left
,
BindValueKind
.
Assign
able
,
diagnostics
))
{
// If we're in a place where the event can be assigned, then continue so that we give errors
// about the types and operator not lining up. Otherwise, just report that the event can't
...
...
@@ -2437,7 +2437,7 @@ private static BindValueKind GetBinaryAssignmentKind(SyntaxKind kind)
switch
(
kind
)
{
case
SyntaxKind
.
SimpleAssignmentExpression
:
return
BindValueKind
.
Assign
ment
;
return
BindValueKind
.
Assign
able
;
case
SyntaxKind
.
AddAssignmentExpression
:
case
SyntaxKind
.
AndAssignmentExpression
:
case
SyntaxKind
.
DivideAssignmentExpression
:
...
...
src/Compilers/CSharp/Portable/Binder/Binder_Statements.cs
浏览文件 @
6e83358c
...
...
@@ -1127,7 +1127,7 @@ private BoundExpression BindAssignment(AssignmentExpressionSyntax node, Diagnost
return
BindDeconstruction
(
node
,
diagnostics
);
}
var
op1
=
BindValue
(
node
.
Left
,
diagnostics
,
BindValueKind
.
Assign
ment
);
// , BIND_MEMBERSET);
var
op1
=
BindValue
(
node
.
Left
,
diagnostics
,
BindValueKind
.
Assign
able
);
// , BIND_MEMBERSET);
var
op2
=
BindValue
(
node
.
Right
,
diagnostics
,
BindValueKind
.
RValue
);
// , BIND_RVALUEREQUIRED);
if
(
op1
.
Kind
==
BoundKind
.
DiscardExpression
)
...
...
src/ExpressionEvaluator/CSharp/Source/ExpressionCompiler/CompilationContext.cs
浏览文件 @
6e83358c
...
...
@@ -616,7 +616,7 @@ private static bool IsAssignableExpression(Binder binder, BoundExpression expres
// Presumably, this is done to avoid producing a confusing error message about the
// field not being an lvalue.
var
diagnostics
=
DiagnosticBag
.
GetInstance
();
var
result
=
binder
.
CheckValueKind
(
expression
.
Syntax
,
expression
,
Binder
.
BindValueKind
.
Assign
ment
,
checkingReceiver
:
false
,
diagnostics
:
diagnostics
)
&&
var
result
=
binder
.
CheckValueKind
(
expression
.
Syntax
,
expression
,
Binder
.
BindValueKind
.
Assign
able
,
checkingReceiver
:
false
,
diagnostics
:
diagnostics
)
&&
!
diagnostics
.
HasAnyErrors
();
diagnostics
.
Free
();
return
result
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录