Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
12f6478f
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,发现更多精彩内容 >>
未验证
提交
12f6478f
编写于
5月 02, 2018
作者:
C
Charles Stoner
提交者:
GitHub
5月 02, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fewer TypeSymbolWithAnnotations implementations (#26528)
上级
df9a74d1
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
65 addition
and
327 deletion
+65
-327
src/Compilers/CSharp/Portable/Symbols/SymbolWithAnnotations.cs
...ompilers/CSharp/Portable/Symbols/SymbolWithAnnotations.cs
+52
-315
src/Compilers/CSharp/Test/Semantic/Semantics/StaticNullChecking_FlowAnalysis.cs
...est/Semantic/Semantics/StaticNullChecking_FlowAnalysis.cs
+12
-12
src/Compilers/Core/Portable/SymbolDisplay/SymbolDisplayFormat.cs
...pilers/Core/Portable/SymbolDisplay/SymbolDisplayFormat.cs
+1
-0
未找到文件。
src/Compilers/CSharp/Portable/Symbols/SymbolWithAnnotations.cs
浏览文件 @
12f6478f
此差异已折叠。
点击以展开。
src/Compilers/CSharp/Test/Semantic/Semantics/StaticNullChecking_FlowAnalysis.cs
浏览文件 @
12f6478f
...
...
@@ -1955,19 +1955,19 @@ class C
{
static void F1(A<object>? x1, B<object?> y1)
{
(x1 ?? y1)/*T:B<object?>
!
*/.F.ToString();
(x1 ?? y1)/*T:B<object?>*/.F.ToString();
}
static void F2(A<object?>? x2, B<object> y2)
{
(x2 ?? y2)/*T:B<object!>
!
*/.F.ToString();
(x2 ?? y2)/*T:B<object!>*/.F.ToString();
}
static void F3(A<object> x3, B<object?>? y3)
{
(y3 ?? x3)/*T:B<object?>
!
*/.F.ToString();
(y3 ?? x3)/*T:B<object?>*/.F.ToString();
}
static void F4(A<object?> x4, B<object>? y4)
{
(y4 ?? x4)/*T:B<object!>
!
*/.F.ToString();
(y4 ?? x4)/*T:B<object!>*/.F.ToString();
}
static void F5(A<object>? x5, B<object?>? y5)
{
...
...
@@ -1984,22 +1984,22 @@ static void F6(A<object?>? x6, B<object>? y6)
comp
.
VerifyTypes
();
comp
.
VerifyDiagnostics
(
// (14,10): warning CS8619: Nullability of reference types in value of type 'A<object>' doesn't match target type 'B<object?>'.
// (x1 ?? y1)/*T:B<object?>
!
*/.F.ToString();
// (x1 ?? y1)/*T:B<object?>*/.F.ToString();
Diagnostic
(
ErrorCode
.
WRN_NullabilityMismatchInAssignment
,
"x1"
).
WithArguments
(
"A<object>"
,
"B<object?>"
).
WithLocation
(
14
,
10
),
// (14,9): warning CS8602: Possible dereference of a null reference.
// (x1 ?? y1)/*T:B<object?>
!
*/.F.ToString();
Diagnostic
(
ErrorCode
.
WRN_NullReferenceReceiver
,
"(x1 ?? y1)/*T:B<object?>
!
*/.F"
).
WithLocation
(
14
,
9
),
// (x1 ?? y1)/*T:B<object?>*/.F.ToString();
Diagnostic
(
ErrorCode
.
WRN_NullReferenceReceiver
,
"(x1 ?? y1)/*T:B<object?>*/.F"
).
WithLocation
(
14
,
9
),
// (18,10): warning CS8619: Nullability of reference types in value of type 'A<object?>' doesn't match target type 'B<object>'.
// (x2 ?? y2)/*T:B<object!>
!
*/.F.ToString();
// (x2 ?? y2)/*T:B<object!>*/.F.ToString();
Diagnostic
(
ErrorCode
.
WRN_NullabilityMismatchInAssignment
,
"x2"
).
WithArguments
(
"A<object?>"
,
"B<object>"
).
WithLocation
(
18
,
10
),
// (22,16): warning CS8619: Nullability of reference types in value of type 'B<object>' doesn't match target type 'B<object?>'.
// (y3 ?? x3)/*T:B<object?>
!
*/.F.ToString();
// (y3 ?? x3)/*T:B<object?>*/.F.ToString();
Diagnostic
(
ErrorCode
.
WRN_NullabilityMismatchInAssignment
,
"x3"
).
WithArguments
(
"B<object>"
,
"B<object?>"
).
WithLocation
(
22
,
16
),
// (22,9): warning CS8602: Possible dereference of a null reference.
// (y3 ?? x3)/*T:B<object?>
!
*/.F.ToString();
Diagnostic
(
ErrorCode
.
WRN_NullReferenceReceiver
,
"(y3 ?? x3)/*T:B<object?>
!
*/.F"
).
WithLocation
(
22
,
9
),
// (y3 ?? x3)/*T:B<object?>*/.F.ToString();
Diagnostic
(
ErrorCode
.
WRN_NullReferenceReceiver
,
"(y3 ?? x3)/*T:B<object?>*/.F"
).
WithLocation
(
22
,
9
),
// (26,16): warning CS8619: Nullability of reference types in value of type 'B<object?>' doesn't match target type 'B<object>'.
// (y4 ?? x4)/*T:B<object!>
!
*/.F.ToString();
// (y4 ?? x4)/*T:B<object!>*/.F.ToString();
Diagnostic
(
ErrorCode
.
WRN_NullabilityMismatchInAssignment
,
"x4"
).
WithArguments
(
"B<object?>"
,
"B<object>"
).
WithLocation
(
26
,
16
),
// (30,10): warning CS8619: Nullability of reference types in value of type 'A<object>' doesn't match target type 'B<object?>?'.
// (x5 ?? y5)/*T:B<object?>?*/.Value.F.ToString();
...
...
src/Compilers/Core/Portable/SymbolDisplay/SymbolDisplayFormat.cs
浏览文件 @
12f6478f
...
...
@@ -50,6 +50,7 @@ public class SymbolDisplayFormat
parameterOptions
:
SymbolDisplayParameterOptions
.
IncludeParamsRefOut
|
SymbolDisplayParameterOptions
.
IncludeType
,
compilerInternalOptions
:
SymbolDisplayCompilerInternalOptions
.
IncludeNullableReferenceTypeModifier
,
// Not showing the name is important because we visit parameters to display their
// types. If we visited their types directly, we wouldn't get ref/out/params.
miscellaneousOptions
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录