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

override Record.description #58

Closed
mtissington opened this issue May 20, 2016 · 3 comments
Closed

override Record.description #58

mtissington opened this issue May 20, 2016 · 3 comments

Comments

@mtissington
Copy link

mtissington commented May 20, 2016

This maybe an issues with my knowledge of Swift

class Group: Record  {
    var name: String
    var description: String
    var enabled: Bool

I get an error cannot override member variable (description) ...
Is there a way around this short of using a different name?

@groue
Copy link
Owner

groue commented May 20, 2016

Hi @mtissington.

Today the Record class adopts the CustomStringConvertible protocol, which defines the description property. Hence the conflict.

This was a bad move. It looked nice at first, because print(record) prints something nice. It has some defects, and you have just faced one of it. I should remove the default adoption of CustomStringConvertible. Consider it on the TODO list.

@groue
Copy link
Owner

groue commented May 20, 2016

Until I release the fix, use a different property name. Sorry for the inconvenience.

@groue groue closed this as completed in 997a29e May 21, 2016
@groue
Copy link
Owner

groue commented May 21, 2016

The fix has shipped in v0.66.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants