Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
d1cb5918
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,发现更多精彩内容 >>
提交
d1cb5918
编写于
4月 27, 2016
作者:
J
Julien
提交者:
VSadov
4月 27, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tuples: removing more PROTOTYPE markers (#10919)
上级
b56a6ad5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
1 addition
and
69 deletion
+1
-69
src/Compilers/CSharp/Portable/Symbols/NamedTypeSymbol.cs
src/Compilers/CSharp/Portable/Symbols/NamedTypeSymbol.cs
+1
-2
src/Compilers/CSharp/Portable/Symbols/TupleFieldSymbol.cs
src/Compilers/CSharp/Portable/Symbols/TupleFieldSymbol.cs
+0
-1
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs
+0
-63
src/Compilers/VisualBasic/Portable/Symbols/TypeSymbol.vb
src/Compilers/VisualBasic/Portable/Symbols/TypeSymbol.vb
+0
-1
src/Features/CSharp/Portable/Completion/SuggestionMode/CSharpSuggestionModeCompletionProvider.cs
.../SuggestionMode/CSharpSuggestionModeCompletionProvider.cs
+0
-2
未找到文件。
src/Compilers/CSharp/Portable/Symbols/NamedTypeSymbol.cs
浏览文件 @
d1cb5918
...
...
@@ -653,8 +653,7 @@ internal override bool Equals(TypeSymbol t2, bool ignoreCustomModifiersAndArrayS
}
}
// PROTOTYPE(tuples): rename ignoreDynamic or introduce another "ignoreTuple" flag
// if ignoring dynamic, compare underlying tuple types
// If ignoring dynamic, compare underlying tuple types
if
(
t2
.
IsTupleType
)
{
t2
=
((
TupleTypeSymbol
)
t2
).
UnderlyingTupleType
;
...
...
src/Compilers/CSharp/Portable/Symbols/TupleFieldSymbol.cs
浏览文件 @
d1cb5918
...
...
@@ -199,7 +199,6 @@ internal override ObsoleteAttributeData ObsoleteAttributeData
{
get
{
// PROTOTYPE(tuples): need to figure what is the right behavior when underlying is obsolete
return
null
;
}
}
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs
浏览文件 @
d1cb5918
...
...
@@ -3084,69 +3084,6 @@ static void Main()
);
}
// PROTOTYPE(tuples): this test is for a precedent reference
// it does not test tuples and should be removed or moved to appropriate location
[
Fact
]
public
void
InterpolatedConvertedType
()
{
var
source
=
@"
class C
{
static void Main()
{
System.IFormattable x = (System.IFormattable)$""qq {1} qq"";
}
}
"
+
trivial2uple
+
trivial3uple
;
var
tree
=
Parse
(
source
);
var
comp
=
CreateCompilationWithMscorlib
(
tree
);
var
model
=
comp
.
GetSemanticModel
(
tree
,
ignoreAccessibility
:
false
);
var
nodes
=
tree
.
GetCompilationUnitRoot
().
DescendantNodes
();
var
node
=
nodes
.
OfType
<
InterpolatedStringExpressionSyntax
>().
Single
();
Assert
.
Equal
(
@"$""qq {1} qq"""
,
node
.
ToString
());
Assert
.
Equal
(
"System.String"
,
model
.
GetTypeInfo
(
node
).
Type
.
ToTestDisplayString
());
Assert
.
Equal
(
"System.String"
,
model
.
GetTypeInfo
(
node
).
ConvertedType
.
ToTestDisplayString
());
Assert
.
Equal
(
Conversion
.
Identity
,
model
.
GetConversion
(
node
));
Assert
.
Equal
(
Conversion
.
Identity
,
model
.
GetConversion
(
node
.
Parent
));
var
x
=
nodes
.
OfType
<
VariableDeclaratorSyntax
>().
First
();
Assert
.
Equal
(
"System.IFormattable x"
,
model
.
GetDeclaredSymbol
(
x
).
ToTestDisplayString
());
}
// PROTOTYPE(tuples): this test is for a precedent reference
// it does not test tuples and should be removed or moved to appropriate location
[
Fact
]
public
void
InterpolatedConvertedTypeInSource
()
{
var
source
=
@"
class C
{
static void Main()
{
System.IFormattable x = $""qq {1} qq"";
}
}
"
+
trivial2uple
+
trivial3uple
;
var
tree
=
Parse
(
source
);
var
comp
=
CreateCompilationWithMscorlib
(
tree
);
var
model
=
comp
.
GetSemanticModel
(
tree
,
ignoreAccessibility
:
false
);
var
nodes
=
tree
.
GetCompilationUnitRoot
().
DescendantNodes
();
var
node
=
nodes
.
OfType
<
InterpolatedStringExpressionSyntax
>().
Single
();
Assert
.
Equal
(
@"$""qq {1} qq"""
,
node
.
ToString
());
Assert
.
Equal
(
"System.String"
,
model
.
GetTypeInfo
(
node
).
Type
.
ToTestDisplayString
());
Assert
.
Equal
(
"System.IFormattable"
,
model
.
GetTypeInfo
(
node
).
ConvertedType
.
ToTestDisplayString
());
Assert
.
Equal
(
Conversion
.
InterpolatedString
,
model
.
GetConversion
(
node
));
var
x
=
nodes
.
OfType
<
VariableDeclaratorSyntax
>().
First
();
Assert
.
Equal
(
"System.IFormattable x"
,
model
.
GetDeclaredSymbol
(
x
).
ToTestDisplayString
());
}
[
Fact
]
public
void
TupleConvertedType01
()
{
...
...
src/Compilers/VisualBasic/Portable/Symbols/TypeSymbol.vb
浏览文件 @
d1cb5918
...
...
@@ -454,7 +454,6 @@ Done:
Private
ReadOnly
Property
ITypeSymbol_IsTupleSymbol
As
Boolean
Implements
ITypeSymbol
.
IsTupleType
Get
' PROTOTYPE(tuples): VB does not yet support tuples.
Return
False
End
Get
End
Property
...
...
src/Features/CSharp/Portable/Completion/SuggestionMode/CSharpSuggestionModeCompletionProvider.cs
浏览文件 @
d1cb5918
...
...
@@ -47,8 +47,6 @@ protected override async Task<CompletionItem> GetBuilderAsync(Document document,
{
return
CreateBuilder
(
text
,
position
,
CSharpFeaturesResources
.
LambdaExpression
,
CSharpFeaturesResources
.
AutoselectDisabledDueToPotentialLambdaDeclaration
);
}
// PROTOTYPE(tuples): tuples in this context are very much like a kind of anonymous type
// I wonder if we need a special CSharpFeaturesResources or just generalize the existing one
else
if
(
IsAnonymousObjectCreation
(
token
)
||
IsPossibleTupleExpression
(
token
))
{
return
CreateBuilder
(
text
,
position
,
CSharpFeaturesResources
.
MemberName
,
CSharpFeaturesResources
.
AutoselectDisabledDueToPossibleExplicitlyNamesAnonTypeMemCreation
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录