Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class diagram: static abstract method does not work #5459

Open
TeaDrinkingProgrammer opened this issue Apr 12, 2024 · 3 comments · May be fixed by #5462
Open

Class diagram: static abstract method does not work #5459

TeaDrinkingProgrammer opened this issue Apr 12, 2024 · 3 comments · May be fixed by #5462
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@TeaDrinkingProgrammer
Copy link

TeaDrinkingProgrammer commented Apr 12, 2024

Description

When I want to define a static abstract method, it does not work.

Steps to reproduce

See code block and screenshot.

Screenshots

mermaid-diagram-2024-04-12-115822

Code Sample

classDiagram
    class Animal {
        +MakeNoise(TEntity domainEntity) string$*
    }

Setup

  • Mermaid version: 10.8.1 (CLI)
  • Browser and Version: N.A

Suggested Solutions

No response

Additional Context

No response

@TeaDrinkingProgrammer TeaDrinkingProgrammer added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Apr 12, 2024
@TeaDrinkingProgrammer
Copy link
Author

I am quite sure I have found the bug in the sourcecode. This:

    switch (this.classifier) {
      case '*':
        return 'font-style:italic;';
      case '$':
        return 'text-decoration:underline;';
      default:
        return '';
    }

Should be this (approximately, I don't know if the syntax is exactly right):

    switch (this.classifier) {
      case '*':
        return 'font-style:italic;';
      case '$':
        return 'text-decoration:underline;';
      case '$*' || '*$':
        return 'font-style:italic;text-decoration:underline;'
      default:
        return '';
    }

I'll test further this weekend and submit a PR.

@jgreywolf
Copy link
Contributor

In this case I dont feel this is a bug. I know in C# static-abstract support was just adding in v11, and at least as recently as 2023 this was not possible in Java. I will investigate and get back to you (FYI, to get traction on your PR it would help if you requested a review from someone)

@TeaDrinkingProgrammer
Copy link
Author

How do I request a review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
2 participants