Skip to content

Primary factory method should return a new instance #333

@sophie-kaleba

Description

@sophie-kaleba

(Same issue than in Newspeak, see https://groups.google.com/forum/#!msg/newspeaklanguage/PJeOLjxq_yA/ND3Jel_nAQAJ)

As per Newspeak spec, a call to a primary factory method should return a new instance of a given class. Sometimes it doesn't, as in:

class WhatDoesNewReturn = (
  true ifTrue: [ ^ nil ].
)()

where a call to WhatDoesNewReturn new will return nil instead of an instance of WhatDoesNewReturn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugFixes an issue, incorrect implementationgood first issueAre you trying to have a good at SOMns? Start here!help wantedWould be great if you could help out here.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions