提交 08843312 编写于 作者: T Tomáš Matoušek 提交者: GitHub

Merge pull request #22843 from dotnet/merges/dev15.4.x-to-master-20171025-065923

Merge dev15.4.x to master
......@@ -2084,21 +2084,19 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Friend NotOverridable Overrides ReadOnly Property ObsoleteAttributeData As ObsoleteAttributeData
Get
' If there are no attributes then this symbol is not Obsolete.
If Not GetAttributeDeclarations().Any() Then
Return Nothing
Dim lazyCustomAttributesBag = m_lazyCustomAttributesBag
If lazyCustomAttributesBag IsNot Nothing AndAlso lazyCustomAttributesBag.IsEarlyDecodedWellKnownAttributeDataComputed Then
Dim data = DirectCast(lazyCustomAttributesBag.EarlyDecodedWellKnownAttributeData, CommonTypeEarlyWellKnownAttributeData)
Return If(data IsNot Nothing, data.ObsoleteAttributeData, Nothing)
End If
If m_lazyCustomAttributesBag Is Nothing Then
Return ObsoleteAttributeData.Uninitialized
End If
For Each decl In TypeDeclaration.Declarations
If decl.HasAnyAttributes Then
Return ObsoleteAttributeData.Uninitialized
End If
Next
If m_lazyCustomAttributesBag.IsEarlyDecodedWellKnownAttributeDataComputed Then
Dim data = DirectCast(m_lazyCustomAttributesBag.EarlyDecodedWellKnownAttributeData, TypeEarlyWellKnownAttributeData)
Return If(data IsNot Nothing, data.ObsoleteAttributeData, Nothing)
Else
Return ObsoleteAttributeData.Uninitialized
End If
Return Nothing
End Get
End Property
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册