-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Helpful error message when confusing a field with a method #2392
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemArea: Type systemE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-lowLow priorityLow priority
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemArea: Type systemE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-lowLow priorityLow priority
Type
Fields
Give feedbackNo fields configured for issues without a type.
I forget if there's already a bug on this, but it would be nice if, when you wrote
A.BandAdoesn't have a field namedB, but does have a nullary method namedB, the compiler gave a hint like "did you mean to writeA.B()?" It could also do vice versa (if you write A.B()andAis a class with fieldB, it could ask "did you meanA.B```?)I ran into this in trans, where I have frequently written
bcx.ccxinstead ofbcx.ccx().