Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
d1d5595a
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,发现更多精彩内容 >>
未验证
提交
d1d5595a
编写于
4月 02, 2019
作者:
D
dotnet-automerge-bot
提交者:
GitHub
4月 02, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #34703 from dotnet/merges/master-to-features/readonly-members
Merge master to features/readonly-members
上级
48ad407c
f78e5172
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
108 addition
and
15 deletion
+108
-15
docs/Language Feature Status.md
docs/Language Feature Status.md
+4
-4
src/EditorFeatures/CSharpTest/AutomaticCompletion/AutomaticBraceCompletionTests.cs
...Test/AutomaticCompletion/AutomaticBraceCompletionTests.cs
+3
-3
src/Workspaces/CSharp/Portable/Formatting/Rules/TokenBasedFormattingRule.cs
...arp/Portable/Formatting/Rules/TokenBasedFormattingRule.cs
+8
-0
src/Workspaces/CSharpTest/Formatting/FormattingTests.cs
src/Workspaces/CSharpTest/Formatting/FormattingTests.cs
+93
-8
未找到文件。
docs/Language Feature Status.md
浏览文件 @
d1d5595a
...
...
@@ -10,7 +10,7 @@ efforts behind them.
| Feature | Branch | State | Developers | Reviewer | LDM Champ |
| ------- | ------ | ----- | ---------- | -------- | --------- |
|
[
Default Interface Methods
](
https://github.com/dotnet/csharplang/blob/master/proposals/default-interface-methods.md
)
|
[
defaultInterfaceImplementation
](
https://github.com/dotnet/roslyn/tree/features/DefaultInterfaceImplementation
)
|
[
Prototype
](
https://github.com/dotnet/roslyn/issues/19217
)
|
[
AlekseyTs
](
https://github.com/AlekseyTs
)
|
[
gafter
](
https://github.com/gafter
)
|
[
gafter
](
https://github.com/gafter
)
|
|
[
Default Interface Methods
](
https://github.com/dotnet/csharplang/blob/master/proposals/default-interface-methods.md
)
|
[
defaultInterfaceImplementation
](
https://github.com/dotnet/roslyn/tree/features/DefaultInterfaceImplementation
)
|
[
Merged to dev16.1 preview2
](
https://github.com/dotnet/roslyn/issues/19217
)
|
[
AlekseyTs
](
https://github.com/AlekseyTs
)
|
[
gafter
](
https://github.com/gafter
)
|
[
gafter
](
https://github.com/gafter
)
|
|
[
Nullable reference type
](
https://github.com/dotnet/csharplang/blob/master/proposals/nullable-reference-types.md
)
|
[
NullableReferenceTypes
](
https://github.com/dotnet/roslyn/tree/features/NullableReferenceTypes
)
|
[
Merged to dev16.0 preview1
](
https://github.com/dotnet/roslyn/issues/22152
)
|
[
cston
](
https://github.com/cston
)
,
[
jcouv
](
https://github.com/jcouv
)
|
[
AlekseyTs
](
https://github.com/AlekseyTs
)
,
[
333fred
](
https://github.com/333fred
)
|
[
mattwar
](
https://github.com/mattwar
)
|
|
[
Recursive patterns
](
https://github.com/dotnet/csharplang/blob/master/proposals/patterns.md
)
|
[
recursive-patterns
](
https://github.com/dotnet/roslyn/tree/features/recursive-patterns
)
|
[
Merged to dev16.0 preview2
](
https://github.com/dotnet/roslyn/issues/25935
)
|
[
gafter
](
https://github.com/gafter
)
|
[
agocke
](
https://github.com/agocke
)
,
[
cston
](
https://github.com/cston
)
|
[
gafter
](
https://github.com/gafter
)
|
|
[
Async streams
](
https://github.com/dotnet/csharplang/blob/master/proposals/async-streams.md
)
|
[
async-streams
](
https://github.com/dotnet/roslyn/tree/features/async-streams
)
|
[
Merged to dev16.0 preview1
](
https://github.com/dotnet/roslyn/issues/24037
)
|
[
jcouv
](
https://github.com/jcouv
)
|
[
agocke
](
https://github.com/agocke
)
|
[
stephentoub
](
https://github.com/stephentoub
)
|
...
...
@@ -26,14 +26,14 @@ efforts behind them.
|
[
stackalloc in nested contexts
](
https://github.com/dotnet/csharplang/issues/1412
)
|
[
nested-stackalloc
](
https://github.com/dotnet/roslyn/tree/features/nested-stackalloc
)
|
[
In Progress
](
https://github.com/dotnet/roslyn/issues/28968
)
|
[
gafter
](
https://github.com/gafter
)
| - |
[
gafter
](
https://github.com/gafter
)
|
[
Unmanaged generic structs
](
https://github.com/dotnet/csharplang/issues/1744
)
| master |
[
Merged to dev16.1 preview1
](
https://github.com/dotnet/roslyn/issues/31374
)
|
[
RikkiGibson
](
https://github.com/RikkiGibson
)
| - |
[
jaredpar
](
https://github.com/jaredpar
)
|
|
[
Static local functions
](
https://github.com/dotnet/csharplang/issues/1565
)
| master |
[
Merged in dev16.0 preview2
](
https://github.com/dotnet/roslyn/issues/32069
)
|
[
cston
](
https://github.com/cston
)
|
[
jaredpar
](
https://github.com/jaredpar
)
|
[
jcouv
](
https://github.com/jcouv
)
|
[
Readonly members
](
https://github.com/dotnet/csharplang/issues/1710
)
|
[
readonly-members
](
https://github.com/dotnet/roslyn/tree/features/readonly-members
)
|
[
Prototype
](
https://github.com/dotnet/roslyn/issues/32911
)
|
[
RikkiGibson
](
https://github.com/RikkiGibson
)
| TBD |
[
jaredpar
](
https://github.com/jaredpar
)
|
[
Readonly members
](
https://github.com/dotnet/csharplang/issues/1710
)
|
[
readonly-members
](
https://github.com/dotnet/roslyn/tree/features/readonly-members
)
|
[
Merged to dev16.1 preview2
](
https://github.com/dotnet/roslyn/issues/32911
)
|
[
RikkiGibson
](
https://github.com/RikkiGibson
)
| TBD |
[
jaredpar
](
https://github.com/jaredpar
)
# VB 16.0
| Feature | Branch | State | Developers | Reviewer | LDM Champ |
| ------- | ------ | ----- | ---------- | -------- | --------- |
|
[
Line continuation comments
](
https://github.com/dotnet/vblang/issues/65
)
|
[
continuation-comments
](
https://github.com/dotnet/roslyn/tree/features/continuation-comments
)
|
Prototype
|
[
paul1956
](
https://github.com/paul1956
)
|
[
AlekseyTs
](
https://github.com/AlekseyTs
)
|
[
gafter
](
https://github.com/gafter
)
|
|
[
Relax null
coalesing operator requirements
](
https://github.com/dotnet/vblang/issues/339
)
|
[
null-operator-enhancements
](
https://github.com/dotnet/roslyn/tree/features/null-operator-enhancements
)
| In Progress
|
[
333fred
](
https://github.com/333fred
)
|
[
cston
](
https://github.com/cston
)
|
[
gafter
](
https://github.com/gafter
)
|
|
[
Line continuation comments
](
https://github.com/dotnet/vblang/issues/65
)
|
[
continuation-comments
](
https://github.com/dotnet/roslyn/tree/features/continuation-comments
)
|
Merged in 16.1 (preview2)
|
[
paul1956
](
https://github.com/paul1956
)
|
[
AlekseyTs
](
https://github.com/AlekseyTs
)
|
[
gafter
](
https://github.com/gafter
)
|
|
[
Relax null
-coalescing operator requirements
](
https://github.com/dotnet/vblang/issues/339
)
|
[
null-operator-enhancements
](
https://github.com/dotnet/roslyn/tree/features/null-operator-enhancements
)
| Merged in 16.0
|
[
333fred
](
https://github.com/333fred
)
|
[
cston
](
https://github.com/cston
)
|
[
gafter
](
https://github.com/gafter
)
|
# C# 7.3
...
...
src/EditorFeatures/CSharpTest/AutomaticCompletion/AutomaticBraceCompletionTests.cs
浏览文件 @
d1d5595a
...
...
@@ -388,7 +388,7 @@ class C
{
void M()
{
_ = this is {
}
_ = this is {}
}
}"
;
...
...
@@ -431,7 +431,7 @@ class C
{
void M()
{
_ = this is {
}
_ = this is {}
M();
}
}"
;
...
...
@@ -476,7 +476,7 @@ class C
{
void M()
{
_ = this is (1, 2) {
}
_ = this is (1, 2) {}
M();
}
}"
;
...
...
src/Workspaces/CSharp/Portable/Formatting/Rules/TokenBasedFormattingRule.cs
浏览文件 @
d1d5595a
...
...
@@ -257,6 +257,14 @@ public override AdjustSpacesOperation GetAdjustSpacesOperation(SyntaxToken previ
return
CreateAdjustSpacesOperation
(
0
,
AdjustSpacesOption
.
ForceSpacesIfOnSingleLine
);
}
// empty {} in pattern
if
(
previousToken
.
Kind
()
==
SyntaxKind
.
OpenBraceToken
&&
currentToken
.
Kind
()
==
SyntaxKind
.
CloseBraceToken
&&
currentToken
.
Parent
.
IsKind
(
SyntaxKindEx
.
PropertyPatternClause
))
{
return
CreateAdjustSpacesOperation
(
0
,
AdjustSpacesOption
.
ForceSpacesIfOnSingleLine
);
}
// attribute case
// , [
if
(
previousToken
.
Kind
()
==
SyntaxKind
.
CommaToken
&&
currentToken
.
Kind
()
==
SyntaxKind
.
OpenBracketToken
&&
currentToken
.
Parent
is
AttributeListSyntax
)
...
...
src/Workspaces/CSharpTest/Formatting/FormattingTests.cs
浏览文件 @
d1d5595a
...
...
@@ -5142,7 +5142,7 @@ public async Task FormatRecursivePattern_NoSpaceBetweenTypeAndPositionalSubpatte
{
void M()
{
_ = this is C(1, 2) {
};
_ = this is C(1, 2) {};
}
}"
;
// no space separates the type and the positional pattern
...
...
@@ -5165,7 +5165,7 @@ public async Task FormatRecursivePattern_PreferSpaceBetweenTypeAndPositionalSubp
{
void M()
{
_ = this is C (1, 2) {
};
_ = this is C (1, 2) {};
}
}"
;
await
AssertFormatAsync
(
expectedCode
,
code
,
changedOptionSet
:
changingOptions
);
...
...
@@ -5188,8 +5188,8 @@ public async Task FormatRecursivePattern_PreferSpaceInsidePositionalSubpatternPa
{
void M()
{
_ = this is C( 1, 2 ) {
};
_ = this is C() {
};
_ = this is C( 1, 2 ) {};
_ = this is C() {};
}
}"
;
await
AssertFormatAsync
(
expectedCode
,
code
,
changedOptionSet
:
changingOptions
);
...
...
@@ -5212,8 +5212,8 @@ public async Task FormatRecursivePattern_PreferSpaceInsideEmptyPositionalSubpatt
{
void M()
{
_ = this is C(1, 2) {
};
_ = this is C( ) {
};
_ = this is C(1, 2) {};
_ = this is C( ) {};
}
}"
;
await
AssertFormatAsync
(
expectedCode
,
code
,
changedOptionSet
:
changingOptions
);
...
...
@@ -5290,7 +5290,7 @@ public async Task FormatPropertyPattern_FollowedByInvocation()
{
void M()
{
_ = this is {
}
_ = this is {}
M();
}
}"
;
...
...
@@ -5313,7 +5313,7 @@ public async Task FormatPositionalPattern_FollowedByInvocation()
{
void M()
{
_ = this is (1, 2) {
}
_ = this is (1, 2) {}
M();
}
}"
;
...
...
@@ -9069,6 +9069,91 @@ public void Foo()
}"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Formatting
)]
public
async
Task
EmptyIsPropertyPattern
()
{
var
code
=
@"
class C
{
void M()
{
_ = x is { }
}
}
"
;
var
expected
=
@"
class C
{
void M()
{
_ = x is {}
}
}
"
;
await
AssertFormatAsync
(
expected
,
code
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Formatting
)]
public
async
Task
EmptySwitchCasePropertyPattern
()
{
var
code
=
@"
class C
{
void M()
{
switch (x)
{
case { }
}
}
}
"
;
var
expected
=
@"
class C
{
void M()
{
switch (x)
{
case {}
}
}
}
"
;
await
AssertFormatAsync
(
expected
,
code
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Formatting
)]
public
async
Task
EmptySwitchExpressionCasePropertyPattern
()
{
var
code
=
@"
class C
{
void M()
{
_ = x switch
{
{ } =>
}
}
"
;
var
expected
=
@"
class C
{
void M()
{
_ = x switch
{
{} =>
}
}
"
;
await
AssertFormatAsync
(
expected
,
code
);
}
[
Theory
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Formatting
)]
[
WorkItem
(
31571
,
"https://github.com/dotnet/roslyn/issues/31571"
)]
[
WorkItem
(
33910
,
"https://github.com/dotnet/roslyn/issues/33910"
)]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录