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

closes #17793 ; improve errmsg when ctor called on non-tyObject kind #17806

Merged

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Apr 20, 2021

t12194.nim(24, 11) Error: object constructor needs an object type [genericBody declared in t12194.nim(9, 3)]
      F = cf(f: fs)

instead of:

t12194.nim(24, 11) Error: object constructor needs an object type
      F = cf(f: fs)

which is clear enough.
the feature request in #16533 is still valid though, so this doesn't close it.

@timotheecour timotheecour changed the title improve errmsg refs #17793 object ctor with generics improve errmsg refs #17793 when ctor called on non-tyObject kind Apr 20, 2021
@timotheecour timotheecour changed the title improve errmsg refs #17793 when ctor called on non-tyObject kind closes #17793 ; improve errmsg refs #17793 when ctor called on non-tyObject kind Apr 21, 2021
@timotheecour timotheecour changed the title closes #17793 ; improve errmsg refs #17793 when ctor called on non-tyObject kind closes #17793 ; improve errmsg when ctor called on non-tyObject kind Apr 21, 2021
@@ -11,6 +11,8 @@

# included from sem.nim

from std/sugar import dup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now breaks the bsd cis... We need a better solution.

Copy link
Member Author

@timotheecour timotheecour Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've now changed it to from sugar import dup, but where can i see the logs? it's hard to shoot in the dark

Copy link
Member

@ringabout ringabout Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timotheecour timotheecour force-pushed the pr_errmsg_constructor_generic_refs_17793 branch from 394702b to 15c9513 Compare April 21, 2021 07:02
@Araq Araq merged commit 2951f89 into nim-lang:devel Apr 21, 2021
@timotheecour timotheecour deleted the pr_errmsg_constructor_generic_refs_17793 branch April 21, 2021 09:35
PMunch pushed a commit to PMunch/Nim that referenced this pull request Mar 28, 2022
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 this pull request may close these issues.

Confusing error messages for constructors
3 participants