Change constructor error message: Instead of writing "… that takes 0 arguments" omit this part if no constructor is available #75968
Labels
Area-Compilers
Concept-Diagnostic Clarity
The issues deals with the ease of understanding of errors and warnings.
Milestone
I'm writing a library for WPF.
In the cause of writing I noticed the following:
Current Situation
The following error message imposes that the number of constructor arguments was insufficient, or it wouldn't match:
Furthermore, the parameter tooltip is giving no information about the constructor itself but about the surrounding method:
After doing some investigation in the WPF source I found that the
TextPointer
class does not provide any public constructor at all but only internal constructors.So, the current error message and Intellisense tooltip both seem quite misleading and confusing.
Desired Situation
I suggest to …
new
if no potential constructor is available.The text was updated successfully, but these errors were encountered: