Name resolution: resolve interfaces in expressions#15660
Name resolution: resolve interfaces in expressions#15660psfinaki merged 9 commits intodotnet:mainfrom
Conversation
|
Is this still an experiment, or ready for review? I have a feeling that the typecheck error reported now is worse from understandability points of view => I would need convincing that the tradeoff is worth it. |
|
@T-Gro This is currently still an experiment. I'm currently on vacation and going to get back to it afterwards. The general idea here is to provide symbols (with the type arguments where possible) and have better errors for unfinished expressions like: // module/class/record/union
List
List.
// interface
IList
IList<_>
IList<int>Currently no symbols are provided and the errors are misleading. This experiment already improves things for some of these cases, but needs further work. The change in the tests is mostly about quite a corner case related to incorrect type definitions, and the previous error about constructors is also misleading. I'm going to look into improving it; maybe I'll just try to reuse this error. |
@T-Gro I think they're actually better. The most of the updated baselines capture cases where there's a type that can't be instantiated properly due to an issue in its declaration, and previous errors would say that the types are undefined (which is not true and is misleading) while the newer errors say that the types are used in a wrong way, which is probably good enough considering that a fix is needed on the declaration side, and there's an appropriate error reported for the declaration. |
33e4b4d to
51f31c8
Compare
|
This is ready. It changes the way how wrong usages of interfaces are encoded in name resolution items, but it looks good and makes interface items more inline with rest of the types by removing the special case. |
psfinaki
left a comment
There was a problem hiding this comment.
Mhm I guess the resulting message could be clearer but IMO the new way it is not worse than what used to be. Okay with me.
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
3d596c8 to
b96fa07
Compare
|
This is green now. |
Here's an experiment to see what breaks in CI.