You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Duplicate types are allowed (and ignored) if the first type is exported #36196
Search Terms: duplicate type identifier export ignored allowed
Code
exporttypeA=1;typeA=2;constx1: A=1;
Expected behavior: I think this should not be allowed: I'm defining a duplicate type, the first of which is exported. Still, it's a duplicate.
Actual behavior: This is actually allowed, and the second definition is completely ignored. (Note that any other arrangement of export keywords cannot make the program correct, only this works.)
Activity
andrewbranch commentedon Jan 16, 2020
Notable that if you reverse the order of the exported one and the local one, you get an error 😳