Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
5963a66f
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,发现更多精彩内容 >>
提交
5963a66f
编写于
7月 20, 2016
作者:
V
VSadov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CR feedback on vb tuples binding
上级
99776adc
变更
27
展开全部
显示空白变更内容
内联
并排
Showing
27 changed file
with
392 addition
and
356 deletion
+392
-356
src/Compilers/CSharp/Portable/BoundTree/BoundNodes.xml
src/Compilers/CSharp/Portable/BoundTree/BoundNodes.xml
+1
-1
src/Compilers/VisualBasic/Portable/Binding/Binder_Expressions.vb
...pilers/VisualBasic/Portable/Binding/Binder_Expressions.vb
+8
-8
src/Compilers/VisualBasic/Portable/Binding/Binder_Symbols.vb
src/Compilers/VisualBasic/Portable/Binding/Binder_Symbols.vb
+2
-2
src/Compilers/VisualBasic/Portable/Compilation/VisualBasicCompilation.vb
...isualBasic/Portable/Compilation/VisualBasicCompilation.vb
+50
-2
src/Compilers/VisualBasic/Portable/Lowering/LocalRewriter/LocalRewriter_ObjectCreation.vb
...le/Lowering/LocalRewriter/LocalRewriter_ObjectCreation.vb
+1
-1
src/Compilers/VisualBasic/Portable/Lowering/LocalRewriter/LocalRewriter_TupleLiteralExpression.vb
...ing/LocalRewriter/LocalRewriter_TupleLiteralExpression.vb
+6
-6
src/Compilers/VisualBasic/Portable/SymbolDisplay/SymbolDisplayVisitor.Types.vb
...asic/Portable/SymbolDisplay/SymbolDisplayVisitor.Types.vb
+3
-7
src/Compilers/VisualBasic/Portable/Symbols/FieldSymbol.vb
src/Compilers/VisualBasic/Portable/Symbols/FieldSymbol.vb
+2
-2
src/Compilers/VisualBasic/Portable/Symbols/NamedTypeSymbol.vb
...Compilers/VisualBasic/Portable/Symbols/NamedTypeSymbol.vb
+2
-2
src/Compilers/VisualBasic/Portable/Symbols/PropertySymbol.vb
src/Compilers/VisualBasic/Portable/Symbols/PropertySymbol.vb
+0
-1
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleErrorFieldSymbol.vb
...ualBasic/Portable/Symbols/Tuples/TupleErrorFieldSymbol.vb
+13
-13
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleEventSymbol.vb
...s/VisualBasic/Portable/Symbols/Tuples/TupleEventSymbol.vb
+13
-13
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleFieldSymbol.vb
...s/VisualBasic/Portable/Symbols/Tuples/TupleFieldSymbol.vb
+18
-18
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleMethodSymbol.vb
.../VisualBasic/Portable/Symbols/Tuples/TupleMethodSymbol.vb
+20
-21
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleParameterSymbol.vb
...sualBasic/Portable/Symbols/Tuples/TupleParameterSymbol.vb
+4
-4
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TuplePropertySymbol.vb
...isualBasic/Portable/Symbols/Tuples/TuplePropertySymbol.vb
+11
-11
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleTypeSymbol.vb
...rs/VisualBasic/Portable/Symbols/Tuples/TupleTypeSymbol.vb
+68
-73
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedEventSymbol.vb
...isualBasic/Portable/Symbols/Wrapped/WrappedEventSymbol.vb
+16
-16
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedFieldSymbol.vb
...isualBasic/Portable/Symbols/Wrapped/WrappedFieldSymbol.vb
+18
-18
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedMethodSymbol.vb
...sualBasic/Portable/Symbols/Wrapped/WrappedMethodSymbol.vb
+31
-31
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedNamedTypeSymbol.vb
...lBasic/Portable/Symbols/Wrapped/WrappedNamedTypeSymbol.vb
+26
-26
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedParameterSymbol.vb
...lBasic/Portable/Symbols/Wrapped/WrappedParameterSymbol.vb
+22
-22
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedPropertySymbol.vb
...alBasic/Portable/Symbols/Wrapped/WrappedPropertySymbol.vb
+18
-18
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedTypeParameterSymbol.vb
...ic/Portable/Symbols/Wrapped/WrappedTypeParameterSymbol.vb
+11
-11
src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTuples.vb
src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTuples.vb
+21
-22
src/Compilers/VisualBasic/Test/Syntax/Parser/ParseLanguageVersionTests.vb
...sualBasic/Test/Syntax/Parser/ParseLanguageVersionTests.vb
+3
-3
src/Compilers/VisualBasic/Test/Syntax/Scanner/ScannerTests.vb
...Compilers/VisualBasic/Test/Syntax/Scanner/ScannerTests.vb
+4
-4
未找到文件。
src/Compilers/CSharp/Portable/BoundTree/BoundNodes.xml
浏览文件 @
5963a66f
...
...
@@ -1159,7 +1159,7 @@
<!--
It is possible for a tuple to not have a type in a literal form
Ex:
(a:
1, b: (c: 1, d: null)) does not have a natural type, because "null
" does not have one
(a:
=1, b:= (c:=1, d:=Nothing)) does not have a natural type, because "Nothing
" does not have one
-->
<Field
Name=
"Type"
Type=
"TypeSymbol"
Override=
"true"
Null=
"allow"
/>
<Field
Name=
"ArgumentNamesOpt"
Type=
"ImmutableArray<string>"
Null=
"allow"
/>
...
...
src/Compilers/VisualBasic/Portable/Binding/Binder_Expressions.vb
浏览文件 @
5963a66f
...
...
@@ -327,7 +327,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Dim
elementNames
As
ArrayBuilder
(
Of
String
)
=
Nothing
Dim
countOfExplicitNames
=
0
' prepare
And check element names A
nd types
' prepare
and check element names a
nd types
For
i
As
Integer
=
0
To
numElements
-
1
Dim
argumentSyntax
As
SimpleArgumentSyntax
=
arguments
(
i
)
Dim
name
As
String
=
Nothing
...
...
@@ -382,14 +382,14 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
''' <summary>
''' Returns the type to be used as a field type
generates errors in case the type is not
''' supported for tuple type fields.
''' Returns the type to be used as a field type
.
'''
Generates errors in case the type is not
supported for tuple type fields.
''' </summary>
Private
Function
GetTupleFieldType
(
expression
As
BoundExpression
,
errorSyntax
As
VisualBasicSyntaxNode
,
diagnostics
As
DiagnosticBag
,
<
Out
>
ByRef
hasError
As
Boolean
)
As
TypeSymbol
Private
Shared
Function
GetTupleFieldType
(
expression
As
BoundExpression
,
errorSyntax
As
VisualBasicSyntaxNode
,
diagnostics
As
DiagnosticBag
,
<
Out
>
ByRef
hasError
As
Boolean
)
As
TypeSymbol
Dim
expressionType
As
TypeSymbol
=
expression
.
Type
If
Not
expression
.
HasErrors
Then
If
expression
.
Type
IsNot
Nothing
Then
If
expressionType
IsNot
Nothing
Then
If
expressionType
.
SpecialType
=
SpecialType
.
System_Void
Then
expressionType
=
ErrorTypeSymbol
.
UnknownResultType
hasError
=
True
...
...
@@ -408,7 +408,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Private
Shared
Sub
CollectTupleFieldMemberNames
(
name
As
String
,
position
As
Integer
,
tupleSize
As
Integer
,
ByRef
elementNames
As
ArrayBuilder
(
Of
String
))
' add the name to the list
' names would typically all be there
O
r none at all
' names would typically all be there
o
r none at all
' but in case we need to handle this in error cases
If
elementNames
IsNot
Nothing
Then
elementNames
.
Add
(
If
(
name
,
TupleTypeSymbol
.
TupleMemberName
(
position
)))
...
...
@@ -423,13 +423,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
If
End
Sub
Private
Shared
Function
CheckTupleMemberName
(
name
As
String
,
position
As
Integer
,
syntax
As
VisualBasicSyntaxNode
,
diagnostics
As
DiagnosticBag
,
uniqueFieldNames
As
PooledHashSet
(
Of
String
))
As
Boolean
Private
Shared
Function
CheckTupleMemberName
(
name
As
String
,
index
As
Integer
,
syntax
As
VisualBasicSyntaxNode
,
diagnostics
As
DiagnosticBag
,
uniqueFieldNames
As
PooledHashSet
(
Of
String
))
As
Boolean
Dim
reserved
As
Integer
=
TupleTypeSymbol
.
IsElementNameReserved
(
name
)
If
reserved
=
0
Then
Binder
.
ReportDiagnostic
(
diagnostics
,
syntax
,
ERRID
.
ERR_TupleReservedMemberNameAnyPosition
,
name
)
Return
False
ElseIf
reserved
>
0
AndAlso
reserved
<>
position
+
1
Then
ElseIf
reserved
>
0
AndAlso
reserved
<>
index
+
1
Then
Binder
.
ReportDiagnostic
(
diagnostics
,
syntax
,
ERRID
.
ERR_TupleReservedMemberName
,
name
,
reserved
)
Return
False
...
...
src/Compilers/VisualBasic/Portable/Binding/Binder_Symbols.vb
浏览文件 @
5963a66f
...
...
@@ -732,8 +732,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Dim
locationsArray
As
ImmutableArray
(
Of
Location
)
=
locations
.
ToImmutableAndFree
()
If
typesArray
.
Length
<
2
Then
'PROTOTYPE: tuples error ID
Dim
diaginfo
=
diagnostics
.
Add
(
ERRID
.
ERR_TupleTooFewElements
,
syntax
.
GetLocation
)
elementNames
?
.
Free
()
diagnostics
.
Add
(
ERRID
.
ERR_TupleTooFewElements
,
syntax
.
GetLocation
)
Return
ErrorTypeSymbol
.
UnknownResultType
End
If
...
...
src/Compilers/VisualBasic/Portable/Compilation/VisualBasicCompilation.vb
浏览文件 @
5963a66f
...
...
@@ -2594,12 +2594,60 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
Function
Protected
Overrides
Function
CommonCreateTupleTypeSymbol
(
elementTypes
As
ImmutableArray
(
Of
ITypeSymbol
),
elementNames
As
ImmutableArray
(
Of
String
))
As
INamedTypeSymbol
Dim
vbElementTypes
=
elementTypes
.
SelectAsArray
(
Function
(
t
)
t
.
EnsureVbSymbolOrNothing
(
Of
TypeSymbol
)(
NameOf
(
elementTypes
)))
If
elementTypes
.
IsDefault
Then
Throw
New
ArgumentNullException
(
NameOf
(
elementTypes
))
End
If
If
elementTypes
.
Length
<=
1
Then
Throw
New
ArgumentException
(
CodeAnalysisResources
.
TuplesNeedAtLeastTwoElements
,
NameOf
(
elementNames
))
End
If
CheckTupleElementNames
(
elementTypes
.
Length
,
elementNames
)
Dim
typesBuilder
=
ArrayBuilder
(
Of
TypeSymbol
).
GetInstance
(
elementTypes
.
Length
)
For
i
As
Integer
=
0
To
elementTypes
.
Length
-
1
If
elementTypes
(
i
)
Is
Nothing
Then
Throw
New
ArgumentNullException
(
$
"{NameOf(elementTypes)}[{i}]"
)
End
If
Return
TupleTypeSymbol
.
Create
(
locationOpt
:
=
Nothing
,
elementTypes
:
=
vbElementTypes
,
elementLocations
:
=
Nothing
,
elementNames
:
=
elementNames
,
compilation
:
=
Me
)
typesBuilder
.
Add
(
elementTypes
(
i
).
EnsureVbSymbolOrNothing
(
Of
TypeSymbol
)(
$
"{NameOf(elementTypes)}[{i}]"
))
Next
'no location for the type declaration
Return
TupleTypeSymbol
.
Create
(
locationOpt
:
=
Nothing
,
elementTypes
:
=
typesBuilder
.
ToImmutableAndFree
(),
elementLocations
:
=
Nothing
,
elementNames
:
=
elementNames
,
compilation
:
=
Me
)
End
Function
''' <summary>
''' Check that if any names are provided, their number matches the expected cardinality and they are not null.
''' </summary>
Private
Shared
Sub
CheckTupleElementNames
(
cardinality
As
Integer
,
elementNames
As
ImmutableArray
(
Of
String
))
If
Not
elementNames
.
IsDefault
Then
If
elementNames
.
Length
<>
cardinality
Then
Throw
New
ArgumentException
(
CodeAnalysisResources
.
TupleNamesAllOrNone
,
NameOf
(
elementNames
))
End
If
For
i
As
Integer
=
0
To
elementNames
.
Length
-
1
If
elementNames
(
i
)
Is
Nothing
Then
Throw
New
ArgumentNullException
(
$
"{NameOf(elementNames)}[{i}]"
)
End
If
Next
End
If
End
Sub
Protected
Overrides
Function
CommonCreateTupleTypeSymbol
(
underlyingType
As
INamedTypeSymbol
,
elementNames
As
ImmutableArray
(
Of
String
))
As
INamedTypeSymbol
If
underlyingType
Is
Nothing
Then
Throw
New
ArgumentNullException
(
NameOf
(
underlyingType
))
End
If
Dim
csharpUnderlyingTuple
=
underlyingType
.
EnsureVbSymbolOrNothing
(
Of
NamedTypeSymbol
)(
NameOf
(
underlyingType
))
Dim
cardinality
As
Integer
If
Not
csharpUnderlyingTuple
.
IsTupleCompatible
(
cardinality
)
Then
Throw
New
ArgumentException
(
CodeAnalysisResources
.
TupleUnderlyingTypeMustBeTupleCompatible
,
NameOf
(
underlyingType
))
End
If
CheckTupleElementNames
(
cardinality
,
elementNames
)
Return
TupleTypeSymbol
.
Create
(
locationOpt
:
=
Nothing
,
tupleCompatibleType
:
=
underlyingType
.
EnsureVbSymbolOrNothing
(
Of
NamedTypeSymbol
)(
NameOf
(
underlyingType
)),
...
...
src/Compilers/VisualBasic/Portable/Lowering/LocalRewriter/LocalRewriter_ObjectCreation.vb
浏览文件 @
5963a66f
...
...
@@ -41,7 +41,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
_diagnostics
.
Add
(
result
,
useSiteDiagnostics
)
result
=
New
BoundDirectCast
(
node
.
Syntax
,
result
,
conv
,
node
.
Type
,
Nothing
)
Else
Debug
.
Assert
(
node
.
Type
=
result
.
Type
)
Debug
.
Assert
(
node
.
Type
.
IsSameTypeIgnoringCustomModifiers
(
result
.
Type
)
)
End
If
End
If
...
...
src/Compilers/VisualBasic/Portable/Lowering/LocalRewriter/LocalRewriter_TupleLiteralExpression.vb
浏览文件 @
5963a66f
...
...
@@ -84,12 +84,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
If
'
currentCreation = currentCreation.Update(
'
currentCreation.ConstructorOpt,
'
methodGroupOpt:=Nothing,
'
arguments:=currentCreation.Arguments,
'
initializerOpt:=currentCreation.InitializerOpt,
'
type:=type)
currentCreation
=
currentCreation
.
Update
(
currentCreation
.
ConstructorOpt
,
methodGroupOpt
:
=
Nothing
,
arguments
:
=
currentCreation
.
Arguments
,
initializerOpt
:
=
currentCreation
.
InitializerOpt
,
type
:
=
type
)
Return
currentCreation
Finally
...
...
src/Compilers/VisualBasic/Portable/SymbolDisplay/SymbolDisplayVisitor.Types.vb
浏览文件 @
5963a66f
...
...
@@ -304,7 +304,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
''' </summary>
''' <param name="tupleSymbol"></param>
''' <returns></returns>
Private
Function
CanUseTupleTypeName
(
tupleSymbol
As
INamedTypeSymbol
)
As
Boolean
Private
Shared
Function
CanUseTupleTypeName
(
tupleSymbol
As
INamedTypeSymbol
)
As
Boolean
Dim
currentUnderlying
As
INamedTypeSymbol
=
tupleSymbol
.
TupleUnderlyingType
While
currentUnderlying
.
Arity
=
TupleTypeSymbol
.
RestPosition
...
...
@@ -344,15 +344,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
AddPunctuation
(
SyntaxKind
.
OpenParenToken
)
Dim
first
As
Boolean
=
True
For
i
As
Integer
=
0
To
elementTypes
.
Length
-
1
If
Not
first
Then
If
i
<>
0
Then
AddPunctuation
(
SyntaxKind
.
CommaToken
)
AddSpace
()
End
If
first
=
False
If
hasNames
Then
builder
.
Add
(
CreatePart
(
SymbolDisplayPartKind
.
FieldName
,
symbol
,
elementNames
(
i
),
noEscaping
:
=
False
))
AddSpace
()
...
...
@@ -361,7 +358,6 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End
If
elementTypes
(
i
).
Accept
(
Me
.
NotFirstVisitor
)
Next
AddPunctuation
(
SyntaxKind
.
CloseParenToken
)
...
...
@@ -391,7 +387,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
If
isFirstSymbolVisited
AndAlso
format
.
KindOptions
.
IncludesOption
(
SymbolDisplayKindOptions
.
IncludeTypeKeyword
)
Then
If
symbol
.
IsAnonymousType
Then
' NOTE: Not actually a keyword, but it's not worth introducing a new kind just for this.
builder
.
Add
(
New
SymbolDisplayPart
(
SymbolDisplayPartKind
.
Keyword
,
Nothing
,
"AnonymousType"
))
builder
.
Add
(
New
SymbolDisplayPart
(
SymbolDisplayPartKind
.
AnonymousTypeIndicator
,
Nothing
,
"AnonymousType"
))
AddSpace
()
ElseIf
symbol
.
IsTupleType
Then
builder
.
Add
(
New
SymbolDisplayPart
(
SymbolDisplayPartKind
.
AnonymousTypeIndicator
,
Nothing
,
"Tuple"
))
...
...
src/Compilers/VisualBasic/Portable/Symbols/FieldSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -337,8 +337,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' <summary>
''' If this is a field of a tuple type, return corresponding underlying field from the
''' tuple underlying type. Otherwise,
null
. In case of a malformed underlying type
''' the corresponding underlying field might be missing, return
null
in this case too.
''' tuple underlying type. Otherwise,
Nothing
. In case of a malformed underlying type
''' the corresponding underlying field might be missing, return
Nothing
in this case too.
''' </summary>
Public
Overridable
ReadOnly
Property
TupleUnderlyingField
()
As
FieldSymbol
Get
...
...
src/Compilers/VisualBasic/Portable/Symbols/NamedTypeSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -1207,13 +1207,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Get
End
Property
P
ublic
ReadOnly
Property
INamedTypeSymbol_TupleElementNames
As
ImmutableArray
(
Of
String
)
Implements
INamedTypeSymbol
.
TupleElementNames
P
rivate
ReadOnly
Property
INamedTypeSymbol_TupleElementNames
As
ImmutableArray
(
Of
String
)
Implements
INamedTypeSymbol
.
TupleElementNames
Get
Return
TupleElementNames
End
Get
End
Property
P
ublic
ReadOnly
Property
INamedTypeSymbol_TupleUnderlyingType
As
INamedTypeSymbol
Implements
INamedTypeSymbol
.
TupleUnderlyingType
P
rivate
ReadOnly
Property
INamedTypeSymbol_TupleUnderlyingType
As
INamedTypeSymbol
Implements
INamedTypeSymbol
.
TupleUnderlyingType
Get
Return
TupleUnderlyingType
End
Get
...
...
src/Compilers/VisualBasic/Portable/Symbols/PropertySymbol.vb
浏览文件 @
5963a66f
...
...
@@ -417,7 +417,6 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Get
End
Property
''' <summary>
''' If this is a property of a tuple type, return corresponding underlying property from the
''' tuple underlying type. Otherwise, Nothing.
...
...
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleErrorFieldSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -11,7 +11,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' that doesn't have a corresponding backing field within the tuple underlying type.
''' Created in response to an error condition.
''' </summary>
Friend
Class
TupleErrorFieldSymbol
Friend
NotInheritable
Class
TupleErrorFieldSymbol
Inherits
SynthesizedFieldSymbol
''' <summary>
...
...
@@ -19,13 +19,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' id is an index of the element (zero-based).
''' Otherwise, (-1 - [index in members array]);
''' </summary>
Private
_tupleFieldId
As
Integer
Private
ReadOnly
_tupleFieldId
As
Integer
Private
_locations
As
ImmutableArray
(
Of
Location
)
Private
ReadOnly
_locations
As
ImmutableArray
(
Of
Location
)
Private
_useSiteDiagnosticInfo
As
DiagnosticInfo
Private
ReadOnly
_useSiteDiagnosticInfo
As
DiagnosticInfo
Public
Overrides
ReadOnly
Property
IsTupleField
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsTupleField
As
Boolean
Get
Return
True
End
Get
...
...
@@ -36,31 +36,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' id is an index of the element (zero-based).
''' Otherwise, (-1 - [index in members array]);
''' </summary>
Public
ReadOnly
Property
TupleFieldId
()
As
Integer
Public
ReadOnly
Property
TupleFieldId
As
Integer
Get
Return
Me
.
_tupleFieldId
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TupleUnderlyingField
()
As
FieldSymbol
Public
Overrides
ReadOnly
Property
TupleUnderlyingField
As
FieldSymbol
Get
Return
Nothing
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Locations
()
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
As
ImmutableArray
(
Of
Location
)
Get
Return
Me
.
_locations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
()
As
ImmutableArray
(
Of
SyntaxReference
)
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
As
ImmutableArray
(
Of
SyntaxReference
)
Get
Return
Symbol
.
GetDeclaringSyntaxReferenceHelper
(
Of
VisualBasicSyntaxNode
)(
Me
.
_locations
)
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
As
Boolean
Get
Return
False
End
Get
...
...
@@ -69,7 +69,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Public
Sub
New
(
container
As
NamedTypeSymbol
,
name
As
String
,
tupleFieldId
As
Integer
,
location
As
Location
,
type
As
TypeSymbol
,
useSiteDiagnosticInfo
As
DiagnosticInfo
)
MyBase
.
New
(
container
,
container
,
type
,
name
)
Debug
.
Assert
(
name
<>
Nothing
)
Me
.
_locations
=
(
If
((
location
Is
Nothing
),
ImmutableArray
(
Of
Location
).
Empty
,
ImmutableArray
.
Create
(
Of
Location
)(
location
)
))
Me
.
_locations
=
If
((
location
Is
Nothing
),
ImmutableArray
(
Of
Location
).
Empty
,
ImmutableArray
.
Create
(
Of
Location
)(
location
))
Me
.
_useSiteDiagnosticInfo
=
useSiteDiagnosticInfo
Me
.
_tupleFieldId
=
tupleFieldId
End
Sub
...
...
@@ -93,8 +93,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Function
Public
Overloads
Function
Equals
(
other
As
TupleErrorFieldSymbol
)
As
Boolean
Dim
flag
As
Boolean
=
other
Is
M
e
Return
flag
OrElse
(
other
IsNot
Nothing
AndAlso
Me
.
_tupleFieldId
=
other
.
_tupleFieldId
AndAlso
Me
.
ContainingType
Is
other
.
ContainingType
)
Return
other
Is
Me
OrEls
e
(
other
IsNot
Nothing
AndAlso
Me
.
_tupleFieldId
=
other
.
_tupleFieldId
AndAlso
Me
.
ContainingType
=
other
.
ContainingType
)
End
Function
End
Class
End
Namespace
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleEventSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -10,48 +10,48 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' Represents an event of a tuple type (such as (int, byte).SomeEvent)
''' that is backed by an event within the tuple underlying type.
''' </summary>
Friend
Class
TupleEventSymbol
Friend
NotInheritable
Class
TupleEventSymbol
Inherits
WrappedEventSymbol
Private
_containingType
As
TupleTypeSymbol
Private
ReadOnly
_containingType
As
TupleTypeSymbol
Public
Overrides
ReadOnly
Property
IsTupleEvent
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsTupleEvent
As
Boolean
Get
Return
True
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TupleUnderlyingEvent
()
As
EventSymbol
Public
Overrides
ReadOnly
Property
TupleUnderlyingEvent
As
EventSymbol
Get
Return
Me
.
_underlyingEvent
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ContainingSymbol
()
As
Symbol
Public
Overrides
ReadOnly
Property
ContainingSymbol
As
Symbol
Get
Return
Me
.
_containingType
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Type
()
As
TypeSymbol
Public
Overrides
ReadOnly
Property
Type
As
TypeSymbol
Get
Return
Me
.
_underlyingEvent
.
Type
End
Get
End
Property
Public
Overrides
ReadOnly
Property
AddMethod
()
As
MethodSymbol
Public
Overrides
ReadOnly
Property
AddMethod
As
MethodSymbol
Get
Return
Me
.
_containingType
.
GetTupleMemberSymbolForUnderlyingMember
(
Of
MethodSymbol
)(
Me
.
_underlyingEvent
.
AddMethod
)
End
Get
End
Property
Public
Overrides
ReadOnly
Property
RemoveMethod
()
As
MethodSymbol
Public
Overrides
ReadOnly
Property
RemoveMethod
As
MethodSymbol
Get
Return
Me
.
_containingType
.
GetTupleMemberSymbolForUnderlyingMember
(
Of
MethodSymbol
)(
Me
.
_underlyingEvent
.
RemoveMethod
)
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
AssociatedField
()
As
FieldSymbol
Friend
Overrides
ReadOnly
Property
AssociatedField
As
FieldSymbol
Get
Return
Me
.
_containingType
.
GetTupleMemberSymbolForUnderlyingMember
(
Of
FieldSymbol
)(
Me
.
_underlyingEvent
.
AssociatedField
)
End
Get
...
...
@@ -63,13 +63,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsExplicitInterfaceImplementation
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsExplicitInterfaceImplementation
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
IsExplicitInterfaceImplementation
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ExplicitInterfaceImplementations
()
As
ImmutableArray
(
Of
EventSymbol
)
Public
Overrides
ReadOnly
Property
ExplicitInterfaceImplementations
As
ImmutableArray
(
Of
EventSymbol
)
Get
Return
Me
.
_underlyingEvent
.
ExplicitInterfaceImplementations
End
Get
...
...
@@ -95,8 +95,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Function
Public
Overloads
Function
Equals
(
other
As
TupleEventSymbol
)
As
Boolean
Dim
flag
As
Boolean
=
other
Is
M
e
Return
flag
OrElse
(
other
IsNot
Nothing
AndAlso
Me
.
_containingType
Is
other
.
_containingType
AndAlso
Me
.
_underlyingEvent
Is
other
.
_underlyingEvent
)
Return
other
Is
Me
OrEls
e
(
other
IsNot
Nothing
AndAlso
Me
.
_containingType
=
other
.
_containingType
AndAlso
Me
.
_underlyingEvent
=
other
.
_underlyingEvent
)
End
Function
Public
Overrides
Function
GetAttributes
()
As
ImmutableArray
(
Of
VisualBasicAttributeData
)
...
...
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleFieldSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -17,37 +17,37 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Private
_tupleFieldId
As
Integer
Public
Overrides
ReadOnly
Property
IsTupleField
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsTupleField
As
Boolean
Get
Return
True
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TupleUnderlyingField
()
As
FieldSymbol
Public
Overrides
ReadOnly
Property
TupleUnderlyingField
As
FieldSymbol
Get
Return
Me
.
_underlyingField
End
Get
End
Property
Public
ReadOnly
Property
TupleFieldId
()
As
Integer
Public
ReadOnly
Property
TupleFieldId
As
Integer
Get
Return
Me
.
_tupleFieldId
End
Get
End
Property
Public
Overrides
ReadOnly
Property
AssociatedSymbol
()
As
Symbol
Public
Overrides
ReadOnly
Property
AssociatedSymbol
As
Symbol
Get
Return
Me
.
_containingTuple
.
GetTupleMemberSymbolForUnderlyingMember
(
Of
Symbol
)(
Me
.
_underlyingField
.
AssociatedSymbol
)
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ContainingSymbol
()
As
Symbol
Public
Overrides
ReadOnly
Property
ContainingSymbol
As
Symbol
Get
Return
Me
.
_containingTuple
End
Get
End
Property
Public
Overrides
ReadOnly
Property
CustomModifiers
()
As
ImmutableArray
(
Of
CustomModifier
)
Public
Overrides
ReadOnly
Property
CustomModifiers
As
ImmutableArray
(
Of
CustomModifier
)
Get
Return
Me
.
_underlyingField
.
CustomModifiers
End
Get
...
...
@@ -84,8 +84,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Function
Public
Overloads
Function
Equals
(
other
As
TupleFieldSymbol
)
As
Boolean
Dim
flag
As
Boolean
=
other
Is
M
e
Return
flag
OrElse
(
other
IsNot
Nothing
AndAlso
Me
.
_tupleFieldId
=
other
.
_tupleFieldId
AndAlso
Me
.
_containingTuple
Is
other
.
_containingTuple
)
Return
other
Is
Me
OrEls
e
(
other
IsNot
Nothing
AndAlso
Me
.
_tupleFieldId
=
other
.
_tupleFieldId
AndAlso
Me
.
_containingTuple
=
other
.
_containingTuple
)
End
Function
End
Class
...
...
@@ -98,25 +98,25 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Private
_locations
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
()
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
As
ImmutableArray
(
Of
Location
)
Get
Return
Me
.
_locations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
()
As
ImmutableArray
(
Of
SyntaxReference
)
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
As
ImmutableArray
(
Of
SyntaxReference
)
Get
Return
Symbol
.
GetDeclaringSyntaxReferenceHelper
(
Of
VisualBasicSyntaxNode
)(
Me
.
_locations
)
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
As
Boolean
Get
Return
False
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
TypeLayoutOffset
()
As
Integer
?
Friend
Overrides
ReadOnly
Property
TypeLayoutOffset
As
Integer
?
Get
Dim
flag
As
Boolean
=
Me
.
_underlyingField
.
ContainingType
IsNot
Me
.
_containingTuple
.
TupleUnderlyingType
Dim
result
As
Integer
?
...
...
@@ -129,7 +129,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Get
End
Property
Public
Overrides
ReadOnly
Property
AssociatedSymbol
()
As
Symbol
Public
Overrides
ReadOnly
Property
AssociatedSymbol
As
Symbol
Get
Dim
flag
As
Boolean
=
Me
.
_underlyingField
.
ContainingType
IsNot
Me
.
_containingTuple
.
TupleUnderlyingType
Dim
result
As
Symbol
...
...
@@ -144,7 +144,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Public
Sub
New
(
container
As
TupleTypeSymbol
,
underlyingField
As
FieldSymbol
,
tupleFieldId
As
Integer
,
location
As
Location
)
MyBase
.
New
(
container
,
underlyingField
,
tupleFieldId
)
Me
.
_locations
=
(
If
((
location
Is
Nothing
),
ImmutableArray
(
Of
Location
).
Empty
,
ImmutableArray
.
Create
(
Of
Location
)(
location
)
))
Me
.
_locations
=
If
((
location
Is
Nothing
),
ImmutableArray
(
Of
Location
).
Empty
,
ImmutableArray
.
Create
(
Of
Location
)(
location
))
End
Sub
End
Class
...
...
@@ -152,24 +152,24 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' Represents an element field of a tuple type (such as (int a, byte b).a, or (int a, byte b).b)
''' that is backed by a real field with a different name within the tuple underlying type.
''' </summary>
Friend
Class
TupleRenamedElementFieldSymbol
Friend
NotInheritable
Class
TupleRenamedElementFieldSymbol
Inherits
TupleElementFieldSymbol
Private
_name
As
String
Public
Overrides
ReadOnly
Property
Name
()
As
String
Public
Overrides
ReadOnly
Property
Name
As
String
Get
Return
Me
.
_name
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
TypeLayoutOffset
()
As
Integer
?
Friend
Overrides
ReadOnly
Property
TypeLayoutOffset
As
Integer
?
Get
Return
Nothing
End
Get
End
Property
Public
Overrides
ReadOnly
Property
AssociatedSymbol
()
As
Symbol
Public
Overrides
ReadOnly
Property
AssociatedSymbol
As
Symbol
Get
Return
Nothing
End
Get
...
...
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleMethodSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -10,88 +10,87 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' Represents a method of a tuple type (such as (int, byte).ToString())
''' that is backed by a method within the tuple underlying type.
''' </summary>
Friend
Class
TupleMethodSymbol
Friend
NotInheritable
Class
TupleMethodSymbol
Inherits
WrappedMethodSymbol
Private
_containingType
As
TupleTypeSymbol
Private
ReadOnly
_containingType
As
TupleTypeSymbol
Private
_underlyingMethod
As
MethodSymbol
Private
ReadOnly
_underlyingMethod
As
MethodSymbol
Private
_typeParameters
As
ImmutableArray
(
Of
TypeParameterSymbol
)
Private
ReadOnly
_typeParameters
As
ImmutableArray
(
Of
TypeParameterSymbol
)
Private
_lazyParameters
As
ImmutableArray
(
Of
ParameterSymbol
)
Private
ReadOnly
_lazyParameters
As
ImmutableArray
(
Of
ParameterSymbol
)
Public
Overrides
ReadOnly
Property
IsTupleMethod
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsTupleMethod
As
Boolean
Get
Return
True
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TupleUnderlyingMethod
()
As
MethodSymbol
Public
Overrides
ReadOnly
Property
TupleUnderlyingMethod
As
MethodSymbol
Get
Return
Me
.
_underlyingMethod
.
ConstructedFrom
End
Get
End
Property
Public
Overrides
ReadOnly
Property
UnderlyingMethod
()
As
MethodSymbol
Public
Overrides
ReadOnly
Property
UnderlyingMethod
As
MethodSymbol
Get
Return
Me
.
_underlyingMethod
End
Get
End
Property
Public
Overrides
ReadOnly
Property
AssociatedSymbol
()
As
Symbol
Public
Overrides
ReadOnly
Property
AssociatedSymbol
As
Symbol
Get
Return
Me
.
_containingType
.
GetTupleMemberSymbolForUnderlyingMember
(
Of
Symbol
)(
Me
.
_underlyingMethod
.
ConstructedFrom
.
AssociatedSymbol
)
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ContainingSymbol
()
As
Symbol
Public
Overrides
ReadOnly
Property
ContainingSymbol
As
Symbol
Get
Return
Me
.
_containingType
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ExplicitInterfaceImplementations
()
As
ImmutableArray
(
Of
MethodSymbol
)
Public
Overrides
ReadOnly
Property
ExplicitInterfaceImplementations
As
ImmutableArray
(
Of
MethodSymbol
)
Get
Return
Me
.
_underlyingMethod
.
ConstructedFrom
.
ExplicitInterfaceImplementations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Parameters
()
As
ImmutableArray
(
Of
ParameterSymbol
)
Public
Overrides
ReadOnly
Property
Parameters
As
ImmutableArray
(
Of
ParameterSymbol
)
Get
Dim
isDefault
As
Boolean
=
Me
.
_lazyParameters
.
IsDefault
If
isDefault
Then
If
Me
.
_lazyParameters
.
IsDefault
Then
InterlockedOperations
.
Initialize
(
Of
ParameterSymbol
)(
Me
.
_lazyParameters
,
Me
.
CreateParameters
())
End
If
Return
Me
.
_lazyParameters
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsSub
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsSub
As
Boolean
Get
Return
Me
.
_underlyingMethod
.
IsSub
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ReturnType
()
As
TypeSymbol
Public
Overrides
ReadOnly
Property
ReturnType
As
TypeSymbol
Get
Return
Me
.
_underlyingMethod
.
ReturnType
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ReturnTypeCustomModifiers
()
As
ImmutableArray
(
Of
CustomModifier
)
Public
Overrides
ReadOnly
Property
ReturnTypeCustomModifiers
As
ImmutableArray
(
Of
CustomModifier
)
Get
Return
Me
.
_underlyingMethod
.
ReturnTypeCustomModifiers
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TypeArguments
()
As
ImmutableArray
(
Of
TypeSymbol
)
Public
Overrides
ReadOnly
Property
TypeArguments
As
ImmutableArray
(
Of
TypeSymbol
)
Get
Return
StaticCast
(
Of
TypeSymbol
).
From
(
Me
.
_typeParameters
)
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TypeParameters
()
As
ImmutableArray
(
Of
TypeParameterSymbol
)
Public
Overrides
ReadOnly
Property
TypeParameters
As
ImmutableArray
(
Of
TypeParameterSymbol
)
Get
Return
Me
.
_typeParameters
End
Get
...
...
@@ -137,8 +136,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Function
Public
Overloads
Function
Equals
(
other
As
TupleMethodSymbol
)
As
Boolean
Dim
flag
As
Boolean
=
other
Is
M
e
Return
flag
OrElse
(
other
IsNot
Nothing
AndAlso
Me
.
_containingType
Is
other
.
_containingType
AndAlso
Me
.
_underlyingMethod
.
ConstructedFrom
Is
other
.
_underlyingMethod
.
ConstructedFrom
)
Return
other
Is
Me
OrEls
e
(
other
IsNot
Nothing
AndAlso
Me
.
_containingType
=
other
.
_containingType
AndAlso
Me
.
_underlyingMethod
.
ConstructedFrom
=
other
.
_underlyingMethod
.
ConstructedFrom
)
End
Function
End
Class
End
Namespace
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleParameterSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -8,12 +8,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' <summary>
''' Represents a parameter of a method or a property of a tuple type
''' </summary>
Friend
Class
TupleParameterSymbol
Friend
NotInheritable
Class
TupleParameterSymbol
Inherits
WrappedParameterSymbol
Private
_container
As
Symbol
Public
Overrides
ReadOnly
Property
ContainingSymbol
()
As
Symbol
Public
Overrides
ReadOnly
Property
ContainingSymbol
As
Symbol
Get
Return
Me
.
_container
End
Get
...
...
@@ -35,8 +35,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Function
Public
Overloads
Function
Equals
(
other
As
TupleParameterSymbol
)
As
Boolean
Dim
flag
As
Boolean
=
other
Is
M
e
Return
flag
OrElse
(
other
IsNot
Nothing
AndAlso
Me
.
_container
Is
other
.
_container
AndAlso
Me
.
_underlyingParameter
Is
other
.
_underlyingParameter
)
Return
other
Is
Me
OrEls
e
(
other
IsNot
Nothing
AndAlso
Me
.
_container
=
other
.
_container
AndAlso
Me
.
_underlyingParameter
=
other
.
_underlyingParameter
)
End
Function
End
Class
End
Namespace
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TuplePropertySymbol.vb
浏览文件 @
5963a66f
...
...
@@ -17,31 +17,31 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Private
_lazyParameters
As
ImmutableArray
(
Of
ParameterSymbol
)
Public
Overrides
ReadOnly
Property
IsTupleProperty
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsTupleProperty
As
Boolean
Get
Return
True
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TupleUnderlyingProperty
()
As
PropertySymbol
Public
Overrides
ReadOnly
Property
TupleUnderlyingProperty
As
PropertySymbol
Get
Return
Me
.
_underlyingProperty
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Type
()
As
TypeSymbol
Public
Overrides
ReadOnly
Property
Type
As
TypeSymbol
Get
Return
Me
.
_underlyingProperty
.
Type
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TypeCustomModifiers
()
As
ImmutableArray
(
Of
CustomModifier
)
Public
Overrides
ReadOnly
Property
TypeCustomModifiers
As
ImmutableArray
(
Of
CustomModifier
)
Get
Return
Me
.
_underlyingProperty
.
TypeCustomModifiers
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Parameters
()
As
ImmutableArray
(
Of
ParameterSymbol
)
Public
Overrides
ReadOnly
Property
Parameters
As
ImmutableArray
(
Of
ParameterSymbol
)
Get
Dim
isDefault
As
Boolean
=
Me
.
_lazyParameters
.
IsDefault
If
isDefault
Then
...
...
@@ -51,13 +51,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Get
End
Property
Public
Overrides
ReadOnly
Property
GetMethod
()
As
MethodSymbol
Public
Overrides
ReadOnly
Property
GetMethod
As
MethodSymbol
Get
Return
Me
.
_containingType
.
GetTupleMemberSymbolForUnderlyingMember
(
Of
MethodSymbol
)(
Me
.
_underlyingProperty
.
GetMethod
)
End
Get
End
Property
Public
Overrides
ReadOnly
Property
SetMethod
()
As
MethodSymbol
Public
Overrides
ReadOnly
Property
SetMethod
As
MethodSymbol
Get
Return
Me
.
_containingType
.
GetTupleMemberSymbolForUnderlyingMember
(
Of
MethodSymbol
)(
Me
.
_underlyingProperty
.
SetMethod
)
End
Get
...
...
@@ -69,13 +69,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ExplicitInterfaceImplementations
()
As
ImmutableArray
(
Of
PropertySymbol
)
Public
Overrides
ReadOnly
Property
ExplicitInterfaceImplementations
As
ImmutableArray
(
Of
PropertySymbol
)
Get
Return
Me
.
_underlyingProperty
.
ExplicitInterfaceImplementations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ContainingSymbol
()
As
Symbol
Public
Overrides
ReadOnly
Property
ContainingSymbol
As
Symbol
Get
Return
Me
.
_containingType
End
Get
...
...
@@ -117,8 +117,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Function
Public
Overloads
Function
Equals
(
other
As
TuplePropertySymbol
)
As
Boolean
Dim
flag
As
Boolean
=
other
Is
M
e
Return
flag
OrElse
(
other
IsNot
Nothing
AndAlso
Me
.
_containingType
Is
other
.
_containingType
AndAlso
Me
.
_underlyingProperty
Is
other
.
_underlyingProperty
)
Return
other
Is
Me
OrEls
e
(
other
IsNot
Nothing
AndAlso
Me
.
_containingType
=
other
.
_containingType
AndAlso
Me
.
_underlyingProperty
=
other
.
_underlyingProperty
)
End
Function
Public
Overrides
Function
GetAttributes
()
As
ImmutableArray
(
Of
VisualBasicAttributeData
)
...
...
src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleTypeSymbol.vb
浏览文件 @
5963a66f
此差异已折叠。
点击以展开。
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedEventSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -15,93 +15,93 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Friend
MustInherit
Class
WrappedEventSymbol
Inherits
EventSymbol
Protected
_underlyingEvent
As
EventSymbol
Protected
ReadOnly
_underlyingEvent
As
EventSymbol
Public
ReadOnly
Property
UnderlyingEvent
()
As
EventSymbol
Public
ReadOnly
Property
UnderlyingEvent
As
EventSymbol
Get
Return
Me
.
_underlyingEvent
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
IsImplicitlyDeclared
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasSpecialName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasSpecialName
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
HasSpecialName
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Name
()
As
String
Public
Overrides
ReadOnly
Property
Name
As
String
Get
Return
Me
.
_underlyingEvent
.
Name
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Locations
()
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
As
ImmutableArray
(
Of
Location
)
Get
Return
Me
.
_underlyingEvent
.
Locations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
()
As
ImmutableArray
(
Of
SyntaxReference
)
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
As
ImmutableArray
(
Of
SyntaxReference
)
Get
Return
Me
.
_underlyingEvent
.
DeclaringSyntaxReferences
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
()
As
Accessibility
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
As
Accessibility
Get
Return
Me
.
_underlyingEvent
.
DeclaredAccessibility
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsShared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsShared
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
IsShared
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsOverridable
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsOverridable
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
IsOverridable
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsOverrides
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsOverrides
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
IsOverrides
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsMustOverride
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsMustOverride
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
IsMustOverride
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsNotOverridable
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsNotOverridable
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
IsNotOverridable
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
()
As
ObsoleteAttributeData
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
As
ObsoleteAttributeData
Get
Return
Me
.
_underlyingEvent
.
ObsoleteAttributeData
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsWindowsRuntimeEvent
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsWindowsRuntimeEvent
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
IsWindowsRuntimeEvent
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasRuntimeSpecialName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasRuntimeSpecialName
As
Boolean
Get
Return
Me
.
_underlyingEvent
.
HasRuntimeSpecialName
End
Get
...
...
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedFieldSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -17,109 +17,109 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Protected
_underlyingField
As
FieldSymbol
Public
ReadOnly
Property
UnderlyingField
()
As
FieldSymbol
Public
ReadOnly
Property
UnderlyingField
As
FieldSymbol
Get
Return
Me
.
_underlyingField
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
As
Boolean
Get
Return
Me
.
_underlyingField
.
IsImplicitlyDeclared
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
()
As
Accessibility
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
As
Accessibility
Get
Return
Me
.
_underlyingField
.
DeclaredAccessibility
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Name
()
As
String
Public
Overrides
ReadOnly
Property
Name
As
String
Get
Return
Me
.
_underlyingField
.
Name
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasSpecialName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasSpecialName
As
Boolean
Get
Return
Me
.
_underlyingField
.
HasSpecialName
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasRuntimeSpecialName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasRuntimeSpecialName
As
Boolean
Get
Return
Me
.
_underlyingField
.
HasRuntimeSpecialName
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsNotSerialized
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsNotSerialized
As
Boolean
Get
Return
Me
.
_underlyingField
.
IsNotSerialized
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsMarshalledExplicitly
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsMarshalledExplicitly
As
Boolean
Get
Return
Me
.
_underlyingField
.
IsMarshalledExplicitly
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
MarshallingInformation
()
As
MarshalPseudoCustomAttributeData
Friend
Overrides
ReadOnly
Property
MarshallingInformation
As
MarshalPseudoCustomAttributeData
Get
Return
Me
.
_underlyingField
.
MarshallingInformation
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
MarshallingDescriptor
()
As
ImmutableArray
(
Of
Byte
)
Friend
Overrides
ReadOnly
Property
MarshallingDescriptor
As
ImmutableArray
(
Of
Byte
)
Get
Return
Me
.
_underlyingField
.
MarshallingDescriptor
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
TypeLayoutOffset
()
As
Integer
?
Friend
Overrides
ReadOnly
Property
TypeLayoutOffset
As
Integer
?
Get
Return
Me
.
_underlyingField
.
TypeLayoutOffset
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsReadOnly
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsReadOnly
As
Boolean
Get
Return
Me
.
_underlyingField
.
IsReadOnly
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsConst
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsConst
As
Boolean
Get
Return
Me
.
_underlyingField
.
IsConst
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
()
As
ObsoleteAttributeData
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
As
ObsoleteAttributeData
Get
Return
Me
.
_underlyingField
.
ObsoleteAttributeData
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ConstantValue
()
As
Object
Public
Overrides
ReadOnly
Property
ConstantValue
As
Object
Get
Return
Me
.
_underlyingField
.
ConstantValue
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Locations
()
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
As
ImmutableArray
(
Of
Location
)
Get
Return
Me
.
_underlyingField
.
Locations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
()
As
ImmutableArray
(
Of
SyntaxReference
)
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
As
ImmutableArray
(
Of
SyntaxReference
)
Get
Return
Me
.
_underlyingField
.
DeclaringSyntaxReferences
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsShared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsShared
As
Boolean
Get
Return
Me
.
_underlyingField
.
IsShared
End
Get
...
...
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedMethodSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -17,69 +17,69 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Friend
MustInherit
Class
WrappedMethodSymbol
Inherits
MethodSymbol
Public
MustOverride
ReadOnly
Property
UnderlyingMethod
()
As
MethodSymbol
Public
MustOverride
ReadOnly
Property
UnderlyingMethod
As
MethodSymbol
Public
Overrides
ReadOnly
Property
IsVararg
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsVararg
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsVararg
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsGenericMethod
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsGenericMethod
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsGenericMethod
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Arity
()
As
Integer
Public
Overrides
ReadOnly
Property
Arity
As
Integer
Get
Return
Me
.
UnderlyingMethod
.
Arity
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ReturnsByRef
()
As
Boolean
Public
Overrides
ReadOnly
Property
ReturnsByRef
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
ReturnsByRef
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ParameterCount
()
As
Integer
Friend
Overrides
ReadOnly
Property
ParameterCount
As
Integer
Get
Return
Me
.
UnderlyingMethod
.
ParameterCount
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsExtensionMethod
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsExtensionMethod
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsExtensionMethod
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsHiddenBySignature
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsHiddenBySignature
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsHiddenBySignature
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Locations
()
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
As
ImmutableArray
(
Of
Location
)
Get
Return
Me
.
UnderlyingMethod
.
Locations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
()
As
ImmutableArray
(
Of
SyntaxReference
)
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
As
ImmutableArray
(
Of
SyntaxReference
)
Get
Return
Me
.
UnderlyingMethod
.
DeclaringSyntaxReferences
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
()
As
Accessibility
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
As
Accessibility
Get
Return
Me
.
UnderlyingMethod
.
DeclaredAccessibility
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsShared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsShared
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsShared
End
Get
...
...
@@ -91,115 +91,115 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsAsync
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsAsync
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsAsync
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsOverrides
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsOverrides
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsOverrides
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsMustOverride
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsMustOverride
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsMustOverride
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsNotOverridable
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsNotOverridable
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsNotOverridable
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsImplicitlyDeclared
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsMetadataFinal
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsMetadataFinal
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsMetadataFinal
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ReturnTypeMarshallingInformation
()
As
MarshalPseudoCustomAttributeData
Friend
Overrides
ReadOnly
Property
ReturnTypeMarshallingInformation
As
MarshalPseudoCustomAttributeData
Get
Return
Me
.
UnderlyingMethod
.
ReturnTypeMarshallingInformation
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasDeclarativeSecurity
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasDeclarativeSecurity
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
HasDeclarativeSecurity
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
()
As
ObsoleteAttributeData
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
As
ObsoleteAttributeData
Get
Return
Me
.
UnderlyingMethod
.
ObsoleteAttributeData
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Name
()
As
String
Public
Overrides
ReadOnly
Property
Name
As
String
Get
Return
Me
.
UnderlyingMethod
.
Name
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasSpecialName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasSpecialName
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
HasSpecialName
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ImplementationAttributes
()
As
MethodImplAttributes
Friend
Overrides
ReadOnly
Property
ImplementationAttributes
As
MethodImplAttributes
Get
Return
Me
.
UnderlyingMethod
.
ImplementationAttributes
End
Get
End
Property
Public
Overrides
ReadOnly
Property
MethodKind
()
As
MethodKind
Public
Overrides
ReadOnly
Property
MethodKind
As
MethodKind
Get
Return
Me
.
UnderlyingMethod
.
MethodKind
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
CallingConvention
()
As
Cci
.
CallingConvention
Friend
Overrides
ReadOnly
Property
CallingConvention
As
Cci
.
CallingConvention
Get
Return
Me
.
UnderlyingMethod
.
CallingConvention
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsAccessCheckedOnOverride
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsAccessCheckedOnOverride
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsAccessCheckedOnOverride
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsExternal
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsExternal
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
IsExternal
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasRuntimeSpecialName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasRuntimeSpecialName
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
HasRuntimeSpecialName
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ReturnValueIsMarshalledExplicitly
()
As
Boolean
Friend
Overrides
ReadOnly
Property
ReturnValueIsMarshalledExplicitly
As
Boolean
Get
Return
Me
.
UnderlyingMethod
.
ReturnValueIsMarshalledExplicitly
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ReturnValueMarshallingDescriptor
()
As
ImmutableArray
(
Of
Byte
)
Friend
Overrides
ReadOnly
Property
ReturnValueMarshallingDescriptor
As
ImmutableArray
(
Of
Byte
)
Get
Return
Me
.
UnderlyingMethod
.
ReturnValueMarshallingDescriptor
End
Get
...
...
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedNamedTypeSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -19,115 +19,115 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Protected
_underlyingType
As
NamedTypeSymbol
Public
ReadOnly
Property
UnderlyingNamedType
()
As
NamedTypeSymbol
Public
ReadOnly
Property
UnderlyingNamedType
As
NamedTypeSymbol
Get
Return
Me
.
_underlyingType
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
As
Boolean
Get
Return
Me
.
_underlyingType
.
IsImplicitlyDeclared
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Arity
()
As
Integer
Public
Overrides
ReadOnly
Property
Arity
As
Integer
Get
Return
Me
.
_underlyingType
.
Arity
End
Get
End
Property
Public
Overrides
ReadOnly
Property
MightContainExtensionMethods
()
As
Boolean
Public
Overrides
ReadOnly
Property
MightContainExtensionMethods
As
Boolean
Get
Return
Me
.
_underlyingType
.
MightContainExtensionMethods
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Name
()
As
String
Public
Overrides
ReadOnly
Property
Name
As
String
Get
Return
Me
.
_underlyingType
.
Name
End
Get
End
Property
Public
Overrides
ReadOnly
Property
MetadataName
()
As
String
Public
Overrides
ReadOnly
Property
MetadataName
As
String
Get
Return
Me
.
_underlyingType
.
MetadataName
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasSpecialName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasSpecialName
As
Boolean
Get
Return
Me
.
_underlyingType
.
HasSpecialName
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
MangleName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
MangleName
As
Boolean
Get
Return
Me
.
_underlyingType
.
MangleName
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
()
As
Accessibility
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
As
Accessibility
Get
Return
Me
.
_underlyingType
.
DeclaredAccessibility
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TypeKind
()
As
TypeKind
Public
Overrides
ReadOnly
Property
TypeKind
As
TypeKind
Get
Return
Me
.
_underlyingType
.
TypeKind
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsInterface
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsInterface
As
Boolean
Get
Return
Me
.
_underlyingType
.
IsInterface
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Locations
()
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
As
ImmutableArray
(
Of
Location
)
Get
Return
Me
.
_underlyingType
.
Locations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
()
As
ImmutableArray
(
Of
SyntaxReference
)
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
As
ImmutableArray
(
Of
SyntaxReference
)
Get
Return
Me
.
_underlyingType
.
DeclaringSyntaxReferences
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsMustInherit
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsMustInherit
As
Boolean
Get
Return
Me
.
_underlyingType
.
IsMustInherit
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsNotInheritable
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsNotInheritable
As
Boolean
Get
Return
Me
.
_underlyingType
.
IsNotInheritable
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsMetadataAbstract
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsMetadataAbstract
As
Boolean
Get
Return
Me
.
_underlyingType
.
IsMetadataAbstract
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsMetadataSealed
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsMetadataSealed
As
Boolean
Get
Return
Me
.
_underlyingType
.
IsMetadataSealed
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
DefaultPropertyName
()
As
String
Friend
Overrides
ReadOnly
Property
DefaultPropertyName
As
String
Get
Return
Me
.
_underlyingType
.
DefaultPropertyName
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
CoClassType
()
As
TypeSymbol
Friend
Overrides
ReadOnly
Property
CoClassType
As
TypeSymbol
Get
Return
Me
.
_underlyingType
.
CoClassType
End
Get
...
...
@@ -139,43 +139,43 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
()
As
ObsoleteAttributeData
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
As
ObsoleteAttributeData
Get
Return
Me
.
_underlyingType
.
ObsoleteAttributeData
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ShouldAddWinRTMembers
()
As
Boolean
Friend
Overrides
ReadOnly
Property
ShouldAddWinRTMembers
As
Boolean
Get
Return
Me
.
_underlyingType
.
ShouldAddWinRTMembers
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsWindowsRuntimeImport
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsWindowsRuntimeImport
As
Boolean
Get
Return
Me
.
_underlyingType
.
IsWindowsRuntimeImport
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
Layout
()
As
TypeLayout
Friend
Overrides
ReadOnly
Property
Layout
As
TypeLayout
Get
Return
Me
.
_underlyingType
.
Layout
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
MarshallingCharSet
()
As
CharSet
Friend
Overrides
ReadOnly
Property
MarshallingCharSet
As
CharSet
Get
Return
Me
.
_underlyingType
.
MarshallingCharSet
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsSerializable
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsSerializable
As
Boolean
Get
Return
Me
.
_underlyingType
.
IsSerializable
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasDeclarativeSecurity
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasDeclarativeSecurity
As
Boolean
Get
Return
Me
.
_underlyingType
.
HasDeclarativeSecurity
End
Get
...
...
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedParameterSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -18,133 +18,133 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Protected
_underlyingParameter
As
ParameterSymbol
Public
ReadOnly
Property
UnderlyingParameter
()
As
ParameterSymbol
Public
ReadOnly
Property
UnderlyingParameter
As
ParameterSymbol
Get
Return
Me
.
_underlyingParameter
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Type
()
As
TypeSymbol
Public
Overrides
ReadOnly
Property
Type
As
TypeSymbol
Get
Return
Me
.
_underlyingParameter
.
Type
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsByRef
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsByRef
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsByRef
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsMetadataIn
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsMetadataIn
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsMetadataIn
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsMetadataOut
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsMetadataOut
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsMetadataOut
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Locations
()
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
As
ImmutableArray
(
Of
Location
)
Get
Return
Me
.
_underlyingParameter
.
Locations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
()
As
ImmutableArray
(
Of
SyntaxReference
)
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
As
ImmutableArray
(
Of
SyntaxReference
)
Get
Return
Me
.
_underlyingParameter
.
DeclaringSyntaxReferences
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Ordinal
()
As
Integer
Public
Overrides
ReadOnly
Property
Ordinal
As
Integer
Get
Return
Me
.
_underlyingParameter
.
Ordinal
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsParamArray
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsParamArray
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsParamArray
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsMetadataOptional
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsMetadataOptional
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsMetadataOptional
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsImplicitlyDeclared
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Name
()
As
String
Public
Overrides
ReadOnly
Property
Name
As
String
Get
Return
Me
.
_underlyingParameter
.
Name
End
Get
End
Property
Public
Overrides
ReadOnly
Property
MetadataName
()
As
String
Public
Overrides
ReadOnly
Property
MetadataName
As
String
Get
Return
Me
.
_underlyingParameter
.
MetadataName
End
Get
End
Property
Public
Overrides
ReadOnly
Property
CustomModifiers
()
As
ImmutableArray
(
Of
CustomModifier
)
Public
Overrides
ReadOnly
Property
CustomModifiers
As
ImmutableArray
(
Of
CustomModifier
)
Get
Return
Me
.
_underlyingParameter
.
CustomModifiers
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
MarshallingInformation
()
As
MarshalPseudoCustomAttributeData
Friend
Overrides
ReadOnly
Property
MarshallingInformation
As
MarshalPseudoCustomAttributeData
Get
Return
Me
.
_underlyingParameter
.
MarshallingInformation
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
MarshallingType
()
As
UnmanagedType
Friend
Overrides
ReadOnly
Property
MarshallingType
As
UnmanagedType
Get
Return
Me
.
_underlyingParameter
.
MarshallingType
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsIDispatchConstant
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsIDispatchConstant
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsIDispatchConstant
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsIUnknownConstant
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsIUnknownConstant
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsIUnknownConstant
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsCallerLineNumber
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsCallerLineNumber
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsCallerLineNumber
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsCallerFilePath
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsCallerFilePath
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsCallerFilePath
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
IsCallerMemberName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
IsCallerMemberName
As
Boolean
Get
Return
Me
.
_underlyingParameter
.
IsCallerMemberName
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
CountOfCustomModifiersPrecedingByRef
()
As
UShort
Friend
Overrides
ReadOnly
Property
CountOfCustomModifiersPrecedingByRef
As
UShort
Get
Return
Me
.
_underlyingParameter
.
CountOfCustomModifiersPrecedingByRef
End
Get
...
...
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedPropertySymbol.vb
浏览文件 @
5963a66f
...
...
@@ -18,109 +18,109 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Protected
_underlyingProperty
As
PropertySymbol
Public
ReadOnly
Property
UnderlyingProperty
()
As
PropertySymbol
Public
ReadOnly
Property
UnderlyingProperty
As
PropertySymbol
Get
Return
Me
.
_underlyingProperty
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
IsImplicitlyDeclared
End
Get
End
Property
Public
Overrides
ReadOnly
Property
ReturnsByRef
()
As
Boolean
Public
Overrides
ReadOnly
Property
ReturnsByRef
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
ReturnsByRef
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsDefault
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsDefault
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
IsDefault
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
CallingConvention
()
As
CallingConvention
Friend
Overrides
ReadOnly
Property
CallingConvention
As
CallingConvention
Get
Return
Me
.
_underlyingProperty
.
CallingConvention
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Name
()
As
String
Public
Overrides
ReadOnly
Property
Name
As
String
Get
Return
Me
.
_underlyingProperty
.
Name
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasSpecialName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasSpecialName
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
HasSpecialName
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Locations
()
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
As
ImmutableArray
(
Of
Location
)
Get
Return
Me
.
_underlyingProperty
.
Locations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
()
As
ImmutableArray
(
Of
SyntaxReference
)
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
As
ImmutableArray
(
Of
SyntaxReference
)
Get
Return
Me
.
_underlyingProperty
.
DeclaringSyntaxReferences
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
()
As
Accessibility
Public
Overrides
ReadOnly
Property
DeclaredAccessibility
As
Accessibility
Get
Return
Me
.
_underlyingProperty
.
DeclaredAccessibility
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsShared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsShared
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
IsShared
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsOverridable
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsOverridable
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
IsOverridable
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsOverrides
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsOverrides
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
IsOverrides
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsMustOverride
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsMustOverride
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
IsMustOverride
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsNotOverridable
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsNotOverridable
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
IsNotOverridable
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
()
As
ObsoleteAttributeData
Friend
Overrides
ReadOnly
Property
ObsoleteAttributeData
As
ObsoleteAttributeData
Get
Return
Me
.
_underlyingProperty
.
ObsoleteAttributeData
End
Get
End
Property
Public
Overrides
ReadOnly
Property
MetadataName
()
As
String
Public
Overrides
ReadOnly
Property
MetadataName
As
String
Get
Return
Me
.
_underlyingProperty
.
MetadataName
End
Get
End
Property
Friend
Overrides
ReadOnly
Property
HasRuntimeSpecialName
()
As
Boolean
Friend
Overrides
ReadOnly
Property
HasRuntimeSpecialName
As
Boolean
Get
Return
Me
.
_underlyingProperty
.
HasRuntimeSpecialName
End
Get
...
...
src/Compilers/VisualBasic/Portable/Symbols/Wrapped/WrappedTypeParameterSymbol.vb
浏览文件 @
5963a66f
...
...
@@ -17,67 +17,67 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Protected
_underlyingTypeParameter
As
TypeParameterSymbol
Public
ReadOnly
Property
UnderlyingTypeParameter
()
As
TypeParameterSymbol
Public
ReadOnly
Property
UnderlyingTypeParameter
As
TypeParameterSymbol
Get
Return
Me
.
_underlyingTypeParameter
End
Get
End
Property
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
()
As
Boolean
Public
Overrides
ReadOnly
Property
IsImplicitlyDeclared
As
Boolean
Get
Return
Me
.
_underlyingTypeParameter
.
IsImplicitlyDeclared
End
Get
End
Property
Public
Overrides
ReadOnly
Property
TypeParameterKind
()
As
TypeParameterKind
Public
Overrides
ReadOnly
Property
TypeParameterKind
As
TypeParameterKind
Get
Return
Me
.
_underlyingTypeParameter
.
TypeParameterKind
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Ordinal
()
As
Integer
Public
Overrides
ReadOnly
Property
Ordinal
As
Integer
Get
Return
Me
.
_underlyingTypeParameter
.
Ordinal
End
Get
End
Property
Public
Overrides
ReadOnly
Property
HasConstructorConstraint
()
As
Boolean
Public
Overrides
ReadOnly
Property
HasConstructorConstraint
As
Boolean
Get
Return
Me
.
_underlyingTypeParameter
.
HasConstructorConstraint
End
Get
End
Property
Public
Overrides
ReadOnly
Property
HasReferenceTypeConstraint
()
As
Boolean
Public
Overrides
ReadOnly
Property
HasReferenceTypeConstraint
As
Boolean
Get
Return
Me
.
_underlyingTypeParameter
.
HasReferenceTypeConstraint
End
Get
End
Property
Public
Overrides
ReadOnly
Property
HasValueTypeConstraint
()
As
Boolean
Public
Overrides
ReadOnly
Property
HasValueTypeConstraint
As
Boolean
Get
Return
Me
.
_underlyingTypeParameter
.
HasValueTypeConstraint
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Variance
()
As
VarianceKind
Public
Overrides
ReadOnly
Property
Variance
As
VarianceKind
Get
Return
Me
.
_underlyingTypeParameter
.
Variance
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Locations
()
As
ImmutableArray
(
Of
Location
)
Public
Overrides
ReadOnly
Property
Locations
As
ImmutableArray
(
Of
Location
)
Get
Return
Me
.
_underlyingTypeParameter
.
Locations
End
Get
End
Property
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
()
As
ImmutableArray
(
Of
SyntaxReference
)
Public
Overrides
ReadOnly
Property
DeclaringSyntaxReferences
As
ImmutableArray
(
Of
SyntaxReference
)
Get
Return
Me
.
_underlyingTypeParameter
.
DeclaringSyntaxReferences
End
Get
End
Property
Public
Overrides
ReadOnly
Property
Name
()
As
String
Public
Overrides
ReadOnly
Property
Name
As
String
Get
Return
Me
.
_underlyingTypeParameter
.
Name
End
Get
...
...
src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenTuples.vb
浏览文件 @
5963a66f
...
...
@@ -114,9 +114,9 @@ Imports System
Module
C
Sub
Main
()
Dim
t
as
(
Integer
,
Integer
,
Integer
,
integer
,
integer
,
integer
,
integer
,
integer
,
integer
,
Integer
,
Integer
,
Integer
,
integer
,
integer
,
integer
,
integer
,
integer
,
integer
)
Dim
t
as
(
Integer
,
Integer
,
Integer
,
integer
,
integer
,
integer
,
integer
,
integer
,
integer
,
Integer
,
Integer
,
String
,
integer
,
integer
,
integer
,
integer
,
String
,
integer
)
t
.
Item17
=
42
t
.
Item17
=
"hello"
t
.
Item12
=
t
.
Item17
console
.
writeline
(
t
.
Item12
)
End
Sub
...
...
@@ -124,36 +124,35 @@ End Module
</
file
>
</
compilation
>
,
expectedOutput
:
=<
!
[
CDATA
[
42
hello
]]
>
,
additionalRefs
:
=
{
ValueTupleRef
,
SystemRuntimeFacadeRef
})
verifier
.
VerifyIL
(
"C.Main"
,
<
!
[
CDATA
[
{
//
Code
size
6
4
(
0
x40
)
//
Code
size
6
7
(
0
x43
)
.
maxstack
2
.
locals
init
(
System
.
ValueTuple
(
Of
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
(
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
))
V_0
)
//
t
.
locals
init
(
System
.
ValueTuple
(
Of
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
Integer
,
(
Integer
,
Integer
,
Integer
,
Integer
,
String
,
Integer
,
Integer
,
Integer
,
Integer
,
String
,
Integer
))
V_0
)
//
t
IL_0000
:
ldloca
.
s
V_0
IL_0002
:
ldflda
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer,
Integer, Integer, Integer, Integer, Integer, Integer, Integer)).Rest As (Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer
, Integer)"
IL_0007
:
ldflda
"System.ValueTuple(Of Integer, Integer, Integer, Integer,
Integer, Integer, Integer, (Integer, Integer, Integer, Integer)).Rest As (Integer, Integer, Integer
, Integer)"
IL_000c
:
ld
c
.
i4
.
s
42
IL_00
0e
:
stfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer).Item3 As Integer
"
IL_001
3
:
ldloca
.
s
V_0
IL_001
5
:
ldflda
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer)).Rest As (Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer
, Integer)"
IL_001
a
:
ldloc
.
0
IL_001
b
:
ldfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer)).Rest As (Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer
, Integer)"
IL_002
0
:
ldfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer)).Rest As (Integer, Integer, Integer
, Integer)"
IL_002
5
:
ldfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer).Item3 As Integer
"
IL_002
a
:
stfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer)).Item5 As Integer
"
IL_00
2f
:
ldloc
.
0
IL_003
0
:
ldfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer)).Rest As (Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer
, Integer)"
IL_003
5
:
ldfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer)).Item5 As Integer
"
IL_003
a
:
call
"Sub System.Console.WriteLine(Integer
)"
IL_00
3f
:
ret
IL_0002
:
ldflda
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer,
String, Integer, Integer, Integer, Integer, String, Integer)).Rest As (Integer, Integer, Integer, Integer, String, Integer, Integer, Integer, Integer, String
, Integer)"
IL_0007
:
ldflda
"System.ValueTuple(Of Integer, Integer, Integer, Integer,
String, Integer, Integer, (Integer, Integer, String, Integer)).Rest As (Integer, Integer, String
, Integer)"
IL_000c
:
ld
str
"hello"
IL_00
11
:
stfld
"System.ValueTuple(Of Integer, Integer, String, Integer).Item3 As String
"
IL_001
6
:
ldloca
.
s
V_0
IL_001
8
:
ldflda
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer, String, Integer, Integer, Integer, Integer, String, Integer)).Rest As (Integer, Integer, Integer, Integer, String, Integer, Integer, Integer, Integer, String
, Integer)"
IL_001
d
:
ldloc
.
0
IL_001
e
:
ldfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer, String, Integer, Integer, Integer, Integer, String, Integer)).Rest As (Integer, Integer, Integer, Integer, String, Integer, Integer, Integer, Integer, String
, Integer)"
IL_002
3
:
ldfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, String, Integer, Integer, (Integer, Integer, String, Integer)).Rest As (Integer, Integer, String
, Integer)"
IL_002
8
:
ldfld
"System.ValueTuple(Of Integer, Integer, String, Integer).Item3 As String
"
IL_002
d
:
stfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, String, Integer, Integer, (Integer, Integer, String, Integer)).Item5 As String
"
IL_00
32
:
ldloc
.
0
IL_003
3
:
ldfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, Integer, Integer, Integer, (Integer, Integer, Integer, Integer, String, Integer, Integer, Integer, Integer, String, Integer)).Rest As (Integer, Integer, Integer, Integer, String, Integer, Integer, Integer, Integer, String
, Integer)"
IL_003
8
:
ldfld
"System.ValueTuple(Of Integer, Integer, Integer, Integer, String, Integer, Integer, (Integer, Integer, String, Integer)).Item5 As String
"
IL_003
d
:
call
"Sub System.Console.WriteLine(String
)"
IL_00
42
:
ret
}
]]
>
)
End
Sub
<
Fact
()
>
Public
Sub
TupleNamedFieldBinding
()
...
...
src/Compilers/VisualBasic/Test/Syntax/Parser/ParseLanguageVersionTests.vb
浏览文件 @
5963a66f
...
...
@@ -350,8 +350,8 @@ Module Module1
End
Function
End
Module
]]
>
.
Value
,
LanguageVersion
.
VisualBasic1
2
,
Diagnostic
(
ERRID
.
ERR_LanguageVersion
,
"(Integer, Integer)"
).
WithArguments
(
"1
2
.0"
,
"tuples"
).
WithLocation
(
4
,
19
),
Diagnostic
(
ERRID
.
ERR_LanguageVersion
,
"(A As Integer, B As Integer)"
).
WithArguments
(
"1
2
.0"
,
"tuples"
).
WithLocation
(
5
,
19
))
LanguageVersion
.
VisualBasic1
4
,
Diagnostic
(
ERRID
.
ERR_LanguageVersion
,
"(Integer, Integer)"
).
WithArguments
(
"1
4
.0"
,
"tuples"
).
WithLocation
(
4
,
19
),
Diagnostic
(
ERRID
.
ERR_LanguageVersion
,
"(A As Integer, B As Integer)"
).
WithArguments
(
"1
4
.0"
,
"tuples"
).
WithLocation
(
5
,
19
))
End
Sub
End
Class
\ No newline at end of file
src/Compilers/VisualBasic/Test/Syntax/Scanner/ScannerTests.vb
浏览文件 @
5963a66f
...
...
@@ -700,7 +700,7 @@ End If]]>.Value,
Assert.Equal(LiteralBase.Decimal, tk.GetBase())
Assert.Equal(42, tk.Value)
Assert.Equal("
4
_2
", tk.ToFullString())
Assert.Equal("
error
BC36716
:
Visual
Basic
1
4
.0
does
not
support
digit
separators
.
",
tk
.
Errors
().
Single
().
ToString
())
Assert.Equal("
error
BC36716
:
Visual
Basic
1
5
.0
does
not
support
digit
separators
.
",
tk
.
Errors
().
Single
().
ToString
())
Str
=
" &H42L "
tk
=
ScanOnce
(
Str
)
...
...
@@ -729,7 +729,7 @@ End If]]>.Value,
Assert
.
Equal
(
LiteralBase
.
Binary
,
tk
.
GetBase
())
Assert
.
Equal
(
&
HAL
,
tk
.
Value
)
Assert
.
Equal
(
" &B1010L "
,
tk
.
ToFullString
())
Assert
.
Equal
(
"error BC36716: Visual Basic 1
4
.0 does not support binary literals."
,
tk
.
Errors
().
Single
().
ToString
())
Assert
.
Equal
(
"error BC36716: Visual Basic 1
5
.0 does not support binary literals."
,
tk
.
Errors
().
Single
().
ToString
())
Str
=
" &B1_0_1_0L "
tk
=
ScanOnce
(
Str
)
...
...
@@ -738,8 +738,8 @@ End If]]>.Value,
Assert
.
Equal
(
&
HAL
,
tk
.
Value
)
Assert
.
Equal
(
" &B1_0_1_0L "
,
tk
.
ToFullString
())
Assert
.
Equal
(
2
,
tk
.
Errors
().
Count
)
Assert
.
Equal
(
"error BC36716: Visual Basic 1
4
.0 does not support digit separators."
,
tk
.
Errors
()(
0
).
ToString
())
Assert
.
Equal
(
"error BC36716: Visual Basic 1
4
.0 does not support binary literals."
,
tk
.
Errors
()(
1
).
ToString
())
Assert
.
Equal
(
"error BC36716: Visual Basic 1
5
.0 does not support digit separators."
,
tk
.
Errors
()(
0
).
ToString
())
Assert
.
Equal
(
"error BC36716: Visual Basic 1
5
.0 does not support binary literals."
,
tk
.
Errors
()(
1
).
ToString
())
End
Sub
<
Fact
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录