-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Compiler thinks nested function parameter is undefined in ECMASCRIPT6_TYPED mode #1814
Comments
ECMASCRIPT6_TYPED probably doesn't have a future so we shouldn't have examples that might lead people down the wrong path. Also these rules won't compile in ADVANCED mode due to google/closure-compiler#1814
We're not really supporting ES6_TYPED nowadays except for parsing |
Yes I talked to the guy (forget his name) who was working on ES6_TYPED and he told me the same thing. I stopped documenting it in Closure Rules, but I still had some leftover typed unit tests (now deleted) which caused me to run into this bug. I wasn't sure if it was worth reporting this, since it makes no difference to me whether or not it's fixed. But I figured I'd do the right thing. Feel free to disregard and keep the issue for posterity. (Although I will say it's a shame that Google chose not to devote the resources to making Closure Compiler compete more directly with TypeScript. 😢) |
@jart I doubt this is an |
Closure Compiler is designed for people who are writing JavaScript, not for people writing something similar to JavaScript, such as Dart/CoffeScript/TypeScript/etc. There's a lot of discussion going on about the future of JS and TypeScript-style type annotations are of course part of that. But this is more a topic for the discussion list than for the issue tracker. |
Reopening as this doesn't really use any TypeScript syntax. It's bad if people get wrong errors just by using a different language mode. Besides, since we don't have a separate language mode for externs, I can imagine a workflow that just passes in |
Also @MatrixFrog I forgot to mention: Yes, I confirmed the error only happens when @Dominator008 Out of respect for @MatrixFrog, I'm going to re-close this issue and encourage you to start a thread on closure-compiler-discuss. If you start a thread there, I have a few things on my mind I'll happily contribute to the discussion. |
I don't really care much if it's open or closed, as long as it's clear that we're unlikely to fix it in the forseeable future. |
@jart Just an FYI - Dominator008 is a closure-compiler core contributor with commit access. |
Oh wow. I had no idea. /me blushes and reopens issue. |
Yeah - we no longer get badges on our comments. You just have to "know". |
ECMASCRIPT6_TYPED probably doesn't have a future so we shouldn't have examples that might lead people down the wrong path. Also these rules won't compile in ADVANCED mode due to google/closure-compiler#1814
I'm using
v20160315
and I'm noticing the following error when I compile Closure Library code inADVANCED
ECMASCRIPT6_TYPED
mode:The params I'm using are:
The code in question is:
The text was updated successfully, but these errors were encountered: