Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Improved reported error for PP1003 #2305

Closed
wants to merge 4 commits into from
Closed

Conversation

cblappert
Copy link
Contributor

@cblappert cblappert commented Jul 20, 2018

Previous error message:
Property access conflicts with write in optimized function (unknown function) at 11:11 to 11:16

New error message:
Write to property "func" on <unnamed object> at optimized function fn[20:13 22:22] conflicts with access in function nested[11:11]

Output generated off "Failure 2" in issue #2252

let fun1Name =
this.functionExpressions.get(fun1) ||
fun1.intrinsicName ||
fun1.__originalName ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than doing intrinsicName || __originalName every time, we should create a helper function like have with React, getFunctionName(). Functions might also have a name as a property, and neither of these ways will get it, so it's best if we start making the name getting part generic in the code base.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cblappert is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@hermanventer hermanventer deleted the better_conflict_message branch July 27, 2018 19:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants