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

Method return a pointer type, which is treated as an abstract type method. #6451

Open
zhangping opened this issue Apr 2, 2025 · 2 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@zhangping
Copy link

Description

classDiagram
class A {
+method() int* // return type is pointer to int, but treated as abstract
}

Steps to reproduce

classDiagram
  class A {
    +method() int*
  }
Loading

Screenshots

No response

Code Sample

classDiagram
  class A {
    +method() int*
  }

Setup

  • Mermaid version: 10.9.1
  • Browser and Version: Chrome 134.0.6998.165

Suggested Solutions

No response

Additional Context

No response

@zhangping zhangping added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Apr 2, 2025
@nour0205
Copy link

nour0205 commented Apr 2, 2025

Hi @zhangping Thanks for raising this!

According to the Mermaid documentation, the * symbol is used as a classifier to indicate an abstract method, and it can be placed after the () or the return type:

Abstract e.g.:

someAbstractMethod()*
or
someAbstractMethod() int*

**Suggested Direction
If support for pointer types is desired, this issue would be better categorized as an enhancement.

**Suggested improvements:

Add syntax-level support for pointer types (e.g., int*, char*, MyClass*)

Improve the parser to distinguish between:

int* (return type with pointer)

int* * (return type + abstract classifier)

Let me know if you'd like help implementing this or discussing possible solutions. Happy to contribute!

@zhangping
Copy link
Author

Thanks for your reply! I would appreciate assistance in implementing this.

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
Development

No branches or pull requests

2 participants