include package names in "of type 'Apple' to 'Apple'" error messages #2146
jrfondren
started this conversation in
Ideas/Requests
Replies: 1 comment
-
It would only need to add the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider the following program:
This fails to compile with this error message:
Here it's clear what the problem is, but it's frequently not clear, and has come up in beginner discussions where a custom
Buffer
was accidentally passed to a procedure expecting a VulkanBuffer
, and instead of the error message immediately revealing that problem, it looked like a problem the programmer's understanding of pointers, or like a bug in the language.Alternatives
To always include the package information might just make for noisier error messages, but it should definitely be included when it would disambiguate types like this.
Prior references
This came up and was mentioned as a specific enhancement to be made in #83 , but there was a more serious bug going on with that issue as the packages in an improved error message would've been the same.
Beta Was this translation helpful? Give feedback.
All reactions