Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
a2ec4cc2
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,发现更多精彩内容 >>
提交
a2ec4cc2
编写于
2月 11, 2016
作者:
V
vsadov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixup after rebasing.
上级
f1d2a6a1
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
83 addition
and
27 deletion
+83
-27
src/Compilers/CSharp/Portable/Compilation/InitializerSemanticModel.cs
...s/CSharp/Portable/Compilation/InitializerSemanticModel.cs
+4
-0
src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
+1
-1
src/Compilers/CSharp/Portable/PublicAPI.Unshipped.txt
src/Compilers/CSharp/Portable/PublicAPI.Unshipped.txt
+51
-1
src/Compilers/CSharp/Test/Semantic/Semantics/BindingTests.cs
src/Compilers/CSharp/Test/Semantic/Semantics/BindingTests.cs
+0
-1
src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
+2
-0
src/ExpressionEvaluator/CSharp/Test/ExpressionCompiler/WinMdTests.cs
...ionEvaluator/CSharp/Test/ExpressionCompiler/WinMdTests.cs
+24
-23
src/ExpressionEvaluator/VisualBasic/Test/ExpressionCompiler/WinMdTests.vb
...aluator/VisualBasic/Test/ExpressionCompiler/WinMdTests.vb
+1
-1
未找到文件。
src/Compilers/CSharp/Portable/Compilation/InitializerSemanticModel.cs
浏览文件 @
a2ec4cc2
...
...
@@ -203,6 +203,10 @@ private BoundEqualsValue BindEqualsValue(Binder binder, EqualsValueClauseSyntax
{
var
property
=
(
PropertySymbol
)
this
.
MemberSymbol
;
BoundExpression
result
=
binder
.
BindVariableOrAutoPropInitializer
(
equalsValue
,
RefKind
.
None
,
property
.
Type
,
diagnostics
);
if
(
result
!=
null
)
{
return
new
BoundPropertyEqualsValue
(
equalsValue
,
property
,
result
);
}
break
;
}
...
...
src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
浏览文件 @
a2ec4cc2
...
...
@@ -1323,7 +1323,7 @@ internal enum ErrorCode
ERR_ExpressionTreeContainsLocalFunction
=
8104
,
ERR_ReturnTypesDontMatch
=
8105
,
ERR_DynamicLocalFunctionParameter
=
8106
,
ERR_CantInferVoid
=
8107
ERR_CantInferVoid
=
8107
,
ERR_AutoPropertyCannotBeRefReturning
=
8890
,
ERR_RefPropertyMustHaveGetAccessor
=
8891
,
...
...
src/Compilers/CSharp/Portable/PublicAPI.Unshipped.txt
浏览文件 @
a2ec4cc2
此差异已折叠。
点击以展开。
src/Compilers/CSharp/Test/Semantic/Semantics/BindingTests.cs
浏览文件 @
a2ec4cc2
...
...
@@ -2461,7 +2461,6 @@ void Test()
CreateExperimentalCompilationWithMscorlib45
(
text
).
VerifyDiagnostics
();
}
[
Fact
,
WorkItem
(
1078958
,
"DevDiv"
)]
[
Fact
,
WorkItem
(
1078958
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1078958"
)]
public
void
Bug1078958
()
{
...
...
src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
浏览文件 @
a2ec4cc2
...
...
@@ -55,6 +55,7 @@ Microsoft.CodeAnalysis.Diagnostics.Telemetry.AnalyzerTelemetryInfo.OperationBloc
Microsoft.CodeAnalysis.IAssemblySymbol.GetMetadata() -> Microsoft.CodeAnalysis.AssemblyMetadata
Microsoft.CodeAnalysis.ICompilationUnitSyntax
Microsoft.CodeAnalysis.ICompilationUnitSyntax.EndOfFileToken.get -> Microsoft.CodeAnalysis.SyntaxToken
Microsoft.CodeAnalysis.IMethodSymbol.ReturnsByRef.get -> bool
Microsoft.CodeAnalysis.IModuleSymbol.GetMetadata() -> Microsoft.CodeAnalysis.ModuleMetadata
Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.IOperation.Accept(Microsoft.CodeAnalysis.Semantics.OperationVisitor visitor) -> void
...
...
@@ -64,6 +65,7 @@ Microsoft.CodeAnalysis.IOperation.IsInvalid.get -> bool
Microsoft.CodeAnalysis.IOperation.Kind.get -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.IOperation.Syntax.get -> Microsoft.CodeAnalysis.SyntaxNode
Microsoft.CodeAnalysis.IOperation.Type.get -> Microsoft.CodeAnalysis.ITypeSymbol
Microsoft.CodeAnalysis.IPropertySymbol.ReturnsByRef.get -> bool
Microsoft.CodeAnalysis.ISkippedTokensTriviaSyntax
Microsoft.CodeAnalysis.ISkippedTokensTriviaSyntax.Tokens.get -> Microsoft.CodeAnalysis.SyntaxTokenList
Microsoft.CodeAnalysis.Metadata.Id.get -> Microsoft.CodeAnalysis.MetadataId
...
...
src/ExpressionEvaluator/CSharp/Test/ExpressionCompiler/WinMdTests.cs
浏览文件 @
a2ec4cc2
...
...
@@ -211,29 +211,30 @@ .maxstack 1
IL_0000: ldnull
IL_0001: ret
}"
);
// Check return type is from runtime assembly.
var
assemblyReference
=
AssemblyMetadata
.
CreateFromImage
(
result
.
Assembly
).
GetReference
();
var
compilation
=
CSharpCompilation
.
Create
(
assemblyName
:
ExpressionCompilerUtilities
.
GenerateUniqueName
(),
references
:
runtimeReferences
.
Concat
(
ImmutableArray
.
Create
<
MetadataReference
>(
assemblyReference
)));
var
assembly
=
ImmutableArray
.
CreateRange
(
result
.
Assembly
);
using
(
var
metadata
=
ModuleMetadata
.
CreateFromImage
(
ImmutableArray
.
CreateRange
(
assembly
)))
{
var
reader
=
metadata
.
MetadataReader
;
var
typeDef
=
reader
.
GetTypeDef
(
"<>x"
);
var
methodHandle
=
reader
.
GetMethodDefHandle
(
typeDef
,
"<>m0"
);
var
module
=
(
PEModuleSymbol
)
compilation
.
GetMember
(
"<>x"
).
ContainingModule
;
var
metadataDecoder
=
new
MetadataDecoder
(
module
);
SignatureHeader
signatureHeader
;
BadImageFormatException
metadataException
;
var
parameters
=
metadataDecoder
.
GetSignatureForMethod
(
methodHandle
,
out
signatureHeader
,
out
metadataException
,
allowByRefReturn
:
true
);
Assert
.
Equal
(
parameters
.
Length
,
5
);
var
actualReturnType
=
parameters
[
0
].
Type
;
Assert
.
Equal
(
actualReturnType
.
TypeKind
,
TypeKind
.
Class
);
// not error
var
expectedReturnType
=
compilation
.
GetMember
(
"Windows.Storage.StorageFolder"
);
Assert
.
Equal
(
expectedReturnType
,
actualReturnType
);
Assert
.
Equal
(
storageAssemblyName
,
actualReturnType
.
ContainingAssembly
.
Name
);
}
// Check return type is from runtime assembly.
var
assemblyReference
=
AssemblyMetadata
.
CreateFromImage
(
result
.
Assembly
).
GetReference
();
var
compilation
=
CSharpCompilation
.
Create
(
assemblyName
:
ExpressionCompilerUtilities
.
GenerateUniqueName
(),
references
:
runtimeReferences
.
Concat
(
ImmutableArray
.
Create
<
MetadataReference
>(
assemblyReference
)));
var
assembly
=
ImmutableArray
.
CreateRange
(
result
.
Assembly
);
using
(
var
metadata
=
ModuleMetadata
.
CreateFromImage
(
ImmutableArray
.
CreateRange
(
assembly
)))
{
var
reader
=
metadata
.
MetadataReader
;
var
typeDef
=
reader
.
GetTypeDef
(
"<>x"
);
var
methodHandle
=
reader
.
GetMethodDefHandle
(
typeDef
,
"<>m0"
);
var
module
=
(
PEModuleSymbol
)
compilation
.
GetMember
(
"<>x"
).
ContainingModule
;
var
metadataDecoder
=
new
MetadataDecoder
(
module
);
SignatureHeader
signatureHeader
;
BadImageFormatException
metadataException
;
var
parameters
=
metadataDecoder
.
GetSignatureForMethod
(
methodHandle
,
out
signatureHeader
,
out
metadataException
,
allowByRefReturn
:
true
);
Assert
.
Equal
(
parameters
.
Length
,
5
);
var
actualReturnType
=
parameters
[
0
].
Type
;
Assert
.
Equal
(
actualReturnType
.
TypeKind
,
TypeKind
.
Class
);
// not error
var
expectedReturnType
=
compilation
.
GetMember
(
"Windows.Storage.StorageFolder"
);
Assert
.
Equal
(
expectedReturnType
,
actualReturnType
);
Assert
.
Equal
(
storageAssemblyName
,
actualReturnType
.
ContainingAssembly
.
Name
);
}
});
}
/// <summary>
...
...
src/ExpressionEvaluator/VisualBasic/Test/ExpressionCompiler/WinMdTests.vb
浏览文件 @
a2ec4cc2
...
...
@@ -169,7 +169,7 @@ End Class"
Dim
metadataDecoder
=
New
MetadataDecoder
(
[
module
]
)
Dim
signatureHeader
As
SignatureHeader
=
Nothing
Dim
metadataException
As
BadImageFormatException
=
Nothing
Dim
parameters
=
metadataDecoder
.
GetSignatureForMethod
(
methodHandle
,
signatureHeader
,
metadataException
)
Dim
parameters
=
metadataDecoder
.
GetSignatureForMethod
(
methodHandle
,
signatureHeader
,
metadataException
,
allowByRefReturn
:
=
False
)
Assert
.
Equal
(
parameters
.
Length
,
5
)
Dim
actualReturnType
=
parameters
(
0
).
Type
Assert
.
Equal
(
actualReturnType
.
TypeKind
,
TypeKind
.
Class
)
' not error
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录