Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCould we smartly elide some info from types in error messages? #43354
Comments
nrc
added
A-diagnostics
T-compiler
labels
Jul 20, 2017
This comment has been minimized.
This comment has been minimized.
|
@nrc we already elide matching type arguments when the outer types match ( The heuristic to elide the presentation of all type arguments should be a bit more involved than "outer types don't match" to avoid hiding cases like:
I think we should only do what is proposed here if under the current output both lines would be "fully highlighted", and even then, I'd only do it if the line is over a certain length.
|
Mark-Simulacrum
added
the
C-enhancement
label
Jul 26, 2017
estebank
referenced this issue
Sep 30, 2017
Open
new-school type mismatch label can be overly long #34905
estebank
referenced this issue
Jan 7, 2019
Open
Highlight only relevant parts of type path in type errors #57413
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nrc commentedJul 20, 2017
If there is a type error where the outer types don't match (e.g.,
Foo<T> != Bar<U>) we could elide the un-important type info (e.g., reportFoo<...> != Bar<...>. This would be effective where there are very long, complex types such as iterators or closures.