bug fix in naming declaration
Summary: During a name collision (on a global symbol, like a class), the name of the
symbol should be bound to the first version of the definition (the one that was
previously there), not the new one (the one that created the collision).
Otherwise it will break the incremental mode.
The incremental logic does the following:
1) remove everything we knew about the declaration
2) redeclare
If after a collision we bind a class name to the new class it will remove
the declaration of the new class (the wrong one) and break.
This bug was likely introduced by the series of diff updating the type-checker
to not stop at the first error.
We use to throw on a naming error and because of that the naming environment was naturally bound
to the first version of the definition.
Reviewed By: @jwatzman
Differential Revision:
D1428722