Skip to content

Fix #3764 #3770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 7, 2015
Merged

Fix #3764 #3770

merged 5 commits into from
Jul 7, 2015

Conversation

RyanCavanaugh
Copy link
Member

We weren't marking React as used when using JSX elements in --jsx React, which caused the import of that symbol to be elided.

Fix: Mark this symbol as used and issue an error if it can't be found.

Ref #3764

// If we're compiling under --jsx react, the symbol 'React' should
// be marked as 'used' so we don't incorrectly elide its import. And if there
// is no 'React' symbol in scope, we should issue an error.
if(compilerOptions.jsx === JsxEmit.React) {
Copy link
Member

Choose a reason for hiding this comment

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

Space after if

@DanielRosenwasser
Copy link
Member

👍 after feedback is addressed

@mhegazy
Copy link
Contributor

mhegazy commented Jul 7, 2015

👍

@JsonFreeman
Copy link
Contributor

Wasn't this the second "marking something as used" bug having to do with JSX? This "marking something as used" thing is... pretty annoying.

RyanCavanaugh added a commit that referenced this pull request Jul 7, 2015
@RyanCavanaugh RyanCavanaugh merged commit 719498e into microsoft:master Jul 7, 2015
@RyanCavanaugh RyanCavanaugh deleted the fix3764 branch July 7, 2015 21:38
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants