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

Add the ability to dump properties from superclass #57

Closed
tahirmt opened this issue Sep 22, 2022 · 0 comments · Fixed by #58
Closed

Add the ability to dump properties from superclass #57

tahirmt opened this issue Sep 22, 2022 · 0 comments · Fixed by #58

Comments

@tahirmt
Copy link
Contributor

tahirmt commented Sep 22, 2022

Currently customDump only dumps properties from the main mirror. This is missing all the properties from the superclass e.g

class Human {
    let name = "John"
    let email = "[email protected]"
    let age = 97
}

class Doctor: Human {
    let field = "Podiatry"
}

customDump(Doctor())

This prints Doctor(field: "Podiatry")

It would be nice if it could print this instead

Doctor(
  field: "Podiatry",
  name: "John",
  email: "[email protected]"
  age: 97
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant