Skip to content

Commit

Permalink
Disallow module initializers in VB (#44227)
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkiGibson authored May 15, 2020
1 parent 8145427 commit 3790b6b
Show file tree
Hide file tree
Showing 2 changed files with 409 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,8 @@ lReportErrorOnTwoTokens:
End If
ElseIf VerifyObsoleteAttributeAppliedToMethod(arguments, AttributeDescription.ObsoleteAttribute) Then
ElseIf VerifyObsoleteAttributeAppliedToMethod(arguments, AttributeDescription.DeprecatedAttribute) Then
ElseIf arguments.Attribute.IsTargetAttribute(Me, AttributeDescription.ModuleInitializerAttribute) Then
arguments.Diagnostics.Add(ERRID.WRN_AttributeNotSupportedInVB, arguments.AttributeSyntaxOpt.Location, AttributeDescription.ModuleInitializerAttribute.FullName)
Else
Dim methodImpl As MethodSymbol = If(Me.IsPartial, PartialImplementationPart, Me)

Expand Down
Loading

0 comments on commit 3790b6b

Please sign in to comment.