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

Primary factory method should return a new instance #333

Open
sophie-kaleba opened this issue Dec 19, 2019 · 1 comment
Open

Primary factory method should return a new instance #333

sophie-kaleba opened this issue Dec 19, 2019 · 1 comment
Labels
bug Fixes an issue, incorrect implementation good first issue Are you trying to have a good at SOMns? Start here! help wanted Would be great if you could help out here.

Comments

@sophie-kaleba
Copy link

(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.

@smarr smarr added bug Fixes an issue, incorrect implementation good first issue Are you trying to have a good at SOMns? Start here! help wanted Would be great if you could help out here. labels Dec 19, 2019
@smarr smarr added this to Open Issues in Completeness via automation Dec 19, 2019
@smarr
Copy link
Owner

smarr commented Dec 19, 2019

Thanks for finding and documenting the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes an issue, incorrect implementation good first issue Are you trying to have a good at SOMns? Start here! help wanted Would be great if you could help out here.
Projects
No open projects
Completeness
  
Open Issues
Development

No branches or pull requests

2 participants