Skip to content

Make abstract type actually implement interface.#56488

Merged
CyrusNajmabadi merged 4 commits intodotnet:mainfrom
CyrusNajmabadi:abstractSyntaxFacts
Sep 18, 2021
Merged

Make abstract type actually implement interface.#56488
CyrusNajmabadi merged 4 commits intodotnet:mainfrom
CyrusNajmabadi:abstractSyntaxFacts

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Not sure why this abstract class wasn't implenting the interface it claimed to. This made life difficult as it meant that hte abstract type couldn't refer to extensions on the interface it was supposed to be implementing.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner September 17, 2021 18:55
@ghost ghost added the Area-IDE label Sep 17, 2021

Private Function ISyntaxFacts_IsMultiLineDocCommentTrivia(trivia As SyntaxTrivia) As Boolean Implements ISyntaxFacts.IsMultiLineDocCommentTrivia
Return MyBase.IsMultiLineDocCommentTrivia(trivia)
Return False
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lolwut.

=> SyntaxKinds.MultiLineDocCommentTrivia == trivia.RawKind;

public bool IsShebangDirectiveTrivia(SyntaxTrivia trivia)
=> SyntaxKinds.ShebangDirectiveTrivia == trivia.RawKind;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to extensions. tehre is no instance data needed to answer these questions. fits new pattern.


Public Function ISyntaxFacts_HasIncompleteParentMember(node As SyntaxNode) As Boolean Implements ISyntaxFacts.HasIncompleteParentMember
Return HasIncompleteParentMember(node)
End Function
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vb does not allow a base type to implicitly implement interfaces declared on the derived type. so tehse impl+forwarding methods were needed. THey can no go since the base type does impl the interface.

@CyrusNajmabadi CyrusNajmabadi merged commit fb5150d into dotnet:main Sep 18, 2021
@ghost ghost added this to the Next milestone Sep 18, 2021
@Cosifne Cosifne modified the milestones: Next, 17.0.P5 Sep 27, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the abstractSyntaxFacts branch September 30, 2021 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants