Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
4243988d
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,发现更多精彩内容 >>
提交
4243988d
编写于
8月 10, 2017
作者:
H
Heejae Chang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
re-enabled assert we have disabled
上级
8dc7c976
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
40 deletion
+24
-40
src/Compilers/VisualBasic/Portable/Binding/Binder_Expressions.vb
...pilers/VisualBasic/Portable/Binding/Binder_Expressions.vb
+1
-5
src/Compilers/VisualBasic/Portable/Binding/Binder_Statements.vb
...mpilers/VisualBasic/Portable/Binding/Binder_Statements.vb
+23
-35
未找到文件。
src/Compilers/VisualBasic/Portable/Binding/Binder_Expressions.vb
浏览文件 @
4243988d
...
...
@@ -251,11 +251,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
' e.g. SyntaxKind.MidExpression is handled elsewhere
' NOTE: There were too many "else" cases to justify listing them explicitly and throwing on
' anything unexpected.
'
' PROTOTYPE(IOperation)
' re-enable the assert once this issue is fixed
' https://github.com/dotnet/roslyn/issues/21180
' Debug.Assert(node.ContainsDiagnostics, String.Format("Unexpected {0} syntax does not have diagnostics", node.Kind))
Debug
.
Assert
(
IsSemanticModelBinder
OrElse
node
.
ContainsDiagnostics
,
String
.
Format
(
"Unexpected {0} syntax does not have diagnostics"
,
node
.
Kind
))
Return
BadExpression
(
node
,
ImmutableArray
(
Of
BoundExpression
).
Empty
,
ErrorTypeSymbol
.
UnknownResultType
)
End
Select
...
...
src/Compilers/VisualBasic/Portable/Binding/Binder_Statements.vb
浏览文件 @
4243988d
...
...
@@ -65,11 +65,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Case
SyntaxKind
.
ElseIfStatement
' ElseIf without a preceding If.
'
' PROTOTYPE(IOperation)
' re-enable the assert once this issue is fixed
' https://github.com/dotnet/roslyn/issues/21180
' Debug.Assert(node.ContainsDiagnostics)
Debug
.
Assert
(
IsSemanticModelBinder
OrElse
node
.
ContainsDiagnostics
)
Dim
condition
=
BindBooleanExpression
(
DirectCast
(
node
,
ElseIfStatementSyntax
).
Condition
,
diagnostics
)
Return
New
BoundBadStatement
(
node
,
ImmutableArray
.
Create
(
Of
BoundNode
)(
condition
),
hasErrors
:
=
True
)
...
...
@@ -200,31 +196,27 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
' where only the ones that can appear in a method body have been selected).
'
' We simply need to ignore this, the error is already created by the parser.
'
' PROTOTYPE(IOperation)
' re-enable the assert once this issue is fixed
' https://github.com/dotnet/roslyn/issues/21180
'Debug.Assert(node.ContainsDiagnostics OrElse
' (node.IsMissing AndAlso
' (node.Parent.Kind = SyntaxKind.MultiLineSubLambdaExpression OrElse
' node.Parent.Kind = SyntaxKind.MultiLineFunctionLambdaExpression OrElse
' node.Parent.Kind = SyntaxKind.AddHandlerAccessorBlock OrElse
' node.Parent.Kind = SyntaxKind.RemoveHandlerAccessorBlock OrElse
' node.Parent.Kind = SyntaxKind.RaiseEventAccessorBlock OrElse
' node.Parent.Kind = SyntaxKind.MultiLineIfBlock OrElse
' node.Parent.Kind = SyntaxKind.ElseIfBlock OrElse
' node.Parent.Kind = SyntaxKind.ElseBlock OrElse
' node.Parent.Kind = SyntaxKind.SimpleDoLoopBlock OrElse
' node.Parent.Kind = SyntaxKind.DoWhileLoopBlock OrElse
' node.Parent.Kind = SyntaxKind.DoUntilLoopBlock OrElse
' node.Parent.Kind = SyntaxKind.WhileBlock OrElse
' node.Parent.Kind = SyntaxKind.WithBlock OrElse
' node.Parent.Kind = SyntaxKind.ForBlock OrElse
' node.Parent.Kind = SyntaxKind.ForEachBlock OrElse
' node.Parent.Kind = SyntaxKind.SyncLockBlock OrElse
' node.Parent.Kind = SyntaxKind.SelectBlock OrElse
' node.Parent.Kind = SyntaxKind.TryBlock OrElse
' node.Parent.Kind = SyntaxKind.UsingBlock)))
Debug
.
Assert
(
IsSemanticModelBinder
OrElse
node
.
ContainsDiagnostics
OrElse
(
node
.
IsMissing
AndAlso
(
node
.
Parent
.
Kind
=
SyntaxKind
.
MultiLineSubLambdaExpression
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
MultiLineFunctionLambdaExpression
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
AddHandlerAccessorBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
RemoveHandlerAccessorBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
RaiseEventAccessorBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
MultiLineIfBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
ElseIfBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
ElseBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
SimpleDoLoopBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
DoWhileLoopBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
DoUntilLoopBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
WhileBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
WithBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
ForBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
ForEachBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
SyncLockBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
SelectBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
TryBlock
OrElse
node
.
Parent
.
Kind
=
SyntaxKind
.
UsingBlock
)))
Return
New
BoundBadStatement
(
node
,
ImmutableArray
(
Of
BoundNode
).
Empty
,
hasErrors
:
=
True
)
...
...
@@ -272,11 +264,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
' not handling here and then throwing ExceptionUtilities.UnexpectedValue in the else case, but
' there are just too many statement SyntaxKinds in VB (e.g. declarations, statements corresponding
' to blocks handled above, etc).
'
' PROTOTYPE(IOperation)
' re-enable the assert once this issue is fixed
' https://github.com/dotnet/roslyn/issues/21180
' Debug.Assert(node.ContainsDiagnostics)
Debug
.
Assert
(
IsSemanticModelBinder
OrElse
node
.
ContainsDiagnostics
)
Return
New
BoundBadStatement
(
node
,
ImmutableArray
(
Of
BoundNode
).
Empty
,
hasErrors
:
=
True
)
End
Function
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录