Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

add export default failing tests #175

Merged
merged 1 commit into from
Sep 24, 2014

Conversation

guybedford
Copy link
Member

Adds tests for #172

@caridy
Copy link
Contributor

caridy commented Jul 15, 2014

+1

@guybedford
Copy link
Member Author

According to google/traceur-compiler#1159, (1) and (3) above are invalid.

But we should still work on (2).

@guybedford
Copy link
Member Author

(2) is currently being tracked at google/traceur-compiler#1208

@guybedford
Copy link
Member Author

I've updated this test to just include the single failing test case:

export default function() {
}

The cases export var default and export function default(){} are apparently not valid.

@caridy
Copy link
Contributor

caridy commented Jul 29, 2014

If I remember correctly, export function default(){} is going to be valid, but I can double check that.

@guybedford
Copy link
Member Author

Yes. This is failing in Traceur currently because it tries export default FunctionDeclaration, and then fails. Instead of falling back to export default AssignmentExpression. The fix includes the words 'cover grammar'.

Sorry I misread your post! @arv believes it is invalid.

@arv
Copy link
Contributor

arv commented Jul 29, 2014

It is invalid based on the notes for changing the grammar. We should bring this up tomorrow when we talk about modules at the F2F.

@caridy
Copy link
Contributor

caridy commented Aug 4, 2014

@arv is probably right, the one we discussed two months ago was this one: https://gist.github.com/ericf/a7b40bf8324cd1f5dc73#is-bar-hoisted-in-export-default-function-bar-

but I don't recall any conversation about this during the last F2F, @arv did you get a chance to run this by the other folks?

@arv
Copy link
Contributor

arv commented Aug 4, 2014

I talked to @dherman and we decided that we want ClassExpression and FunctinExpression without names to work.

https://bugs.ecmascript.org/show_bug.cgi?id=3094

guybedford added a commit that referenced this pull request Sep 24, 2014
@guybedford guybedford merged commit 3deb630 into ModuleLoader:master Sep 24, 2014
@guybedford guybedford deleted the default-exports-test branch September 24, 2014 15:15
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.

3 participants