blickly / closure-compiler-issues

0 stars 0 forks source link

Compiler completely ignores various types of errors #92

Closed blickly closed 9 years ago

blickly commented 9 years ago
What steps will reproduce the problem?
1. Open closure-compiler.appspot.com
2. Write one of these code snippets, taken from the error reference page 
(http://code.google.com/closure/compiler/docs/error-ref.html):

var MY_CONSTANT = 1;
MY_CONSTANT = 2;

// OR

if ({foo: bar} >= 42) {
  alert('yes');
}

3. Run the compilation

What is the expected output? What do you see instead?
Expected: error or warning, depending on example.
Observed: success, without errors or warnings.

What version of the product are you using? On what operating system?
closure-compiler.appspot.com; also verified on Mac with... well, if I only 
knew how to check the compiler version, I'd tell you. ;-)

I can also reproduce the issue with more complex examples, but I think that 
these ones are enough.

Original issue reported on code.google.com by bleper@google.com on 2010-01-18 15:06:59

blickly commented 9 years ago
I managed to figure out the version: I guess that compiler-latest that I have is equal

to 20091217. I also checked a few previous compiler versions, and I was able to make

the const warning appear in versions lower than 20091217.

None of the versions recognize that I assign a string into a field marked with @type

as number or anything else.

Original issue reported on code.google.com by bleper@google.com on 2010-01-18 15:28:39

blickly commented 9 years ago
(not sure if my comment made it to the system)
I figured out that I need "--warning_level=VERBOSE" for this to work.

I'd still vote for having it better documented. :)

Original issue reported on code.google.com by bleper@google.com on 2010-01-18 15:37:28

blickly commented 9 years ago
i've adked david to update the docs on this.

Original issue reported on code.google.com by Nicholas.J.Santos on 2010-01-18 17:41:28