这是indexloc提供的服务,不要输入任何密码
Skip to content

Trait default method segfault #4451

@tetotechy

Description

@tetotechy

Hi!

Pony is an amazing project, it was love at first sight for me. Having tried so many other languages, I can tell you I am having a great deal of fun and satisfaction coding in Pony. Congratulations, please keep it up!

I have bumped into this problem trying to define a default trait method that returns a literal object. The example is overly-simplified and looks useless and dumb, but the intent is to provide a capability-adding method to the object adopting the trait. New capabilities are additive, so it makes sense that the new augmented object, in turn, implement the trait.
As an alternative solution, I have implemented a separate class that returns the object literal in its apply method.
I am wondering whether I am hitting some consistent limitation I am not aware of, or this might be a bug.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededneeds investigationThis needs to be looked into before its "ready for work"

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions