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

`Error: undeclared field: 'foo'` should show type (+ where type is defined) (hard to guess in generic code) #8794

Closed
timotheecour opened this issue Aug 28, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@timotheecour
Copy link
Contributor

commented Aug 28, 2018

probably this would be good: getSymRepr(c.config, sym) to show type + where it's defined.

TODO (timothee):
format this in a proper sentence: (+ where type is defined) (hard to guess in generic code)

@mratsim

This comment has been minimized.

Copy link
Collaborator

commented Aug 28, 2018

I agree and the error message should probably be undeclared field of routine 'foo' for type 'bar' defined at ... due to UFCS.

timotheecour added a commit to timotheecour/Nim that referenced this issue Dec 24, 2018

timotheecour added a commit to timotheecour/Nim that referenced this issue Dec 29, 2018

timotheecour added a commit to timotheecour/Nim that referenced this issue Dec 30, 2018

timotheecour added a commit to timotheecour/Nim that referenced this issue Dec 31, 2018

@timotheecour timotheecour self-assigned this Jan 7, 2019

timotheecour added a commit that referenced this issue Jan 8, 2019

[error messages, stacktraces] fix #8794 #9270 #9767 #9768 (#9766)
* fixes #8794 : `Error: undeclared field: 'foo'` should show type (+ where type is defined) (hard to guess in generic code)

* fixes #9270: `--listFullPaths` not honored by `declared in foo.nim` messages

* fixes #9767: VM stacktrace doesn't honor --excessiveStackTrace:on

* fixes #9768: VM stacktrace misses column info, can lead to ambiguous or harder to read stacktraces

* refactors some col+1 code to col + ColOffset (self documents code)

* make getProcHeader show declared info location also for types and all routine kinds (including macros,templates) instead of just (rather arbitrarily) for iterator,proc,func,method

* --listFullPaths now is honored in more places

* fix typo system/except.nim => lib/system/excpt.nim

* remove substr(foo, 0) hack in compiler/vm.nim which seems old and not applicable anymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.