| 
        
       | 
      
        
  
  [es6] emit error when for-in loop declarations are initialized in strict mode
The ES6 grammar forbids the initialization of variable declarations in IterationStatements.
This CL will report `for (var x = y in z)` as a SyntaxError in strict mode (as done in JSC). It is possible that this could break sites in sloppy mode, and so that change can wait.
BUG=
R=
LOG=N
Committed:  https://crrev.com/1fb76f055a4a0d0a2f5e5d2784b0f070fc279b2b
Cr-Commit-Position: refs/heads/master@{#27639}
    
  
  
    
      Total comments: 6
      
     
  
  
  
   
  
  
  
    
      Total comments: 2
      
     
  
  
  
   
  
  
  
    
      Total comments: 6
      
     
  
  
  
   
  
  
  
  
  
   
  
  
  
  
    
  
  
    
       | 
      Unified diffs | 
      Side-by-side diffs | 
      Delta from patch set | 
      Stats (+130 lines, -56 lines) | 
      Patch | 
     
    
      
          | 
        M | 
        
          
            src/messages.js
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
         | 
        
          1 chunk | 
          +3 lines, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/parser.h
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          1 chunk | 
          +1 line, -1 line | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/parser.cc
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          7 chunks | 
          +40 lines, -17 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/preparser.h
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          2 chunks | 
          +1 line, -4 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        M | 
        
          
            src/preparser.cc
          
         | 
        
          
            View
          
         | 
        
        
          1
        
          2
        
          3
        
          4
        
         | 
        
          5 chunks | 
          +29 lines, -17 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            test/message/for-in-let-loop-initializers-strict.js
          
         | 
        
          
            View
          
         | 
        
        
          1
        
         | 
        
          1 chunk | 
          +4 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            test/message/for-in-let-loop-initializers-strict.out
          
         | 
        
          
            View
          
         | 
        
        
          1
        
         | 
        
          1 chunk | 
          +7 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            test/message/for-in-loop-initializers-strict.js
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +4 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            test/message/for-in-loop-initializers-strict.out
          
         | 
        
          
            View
          
         | 
        
        
          1
        
         | 
        
          1 chunk | 
          +7 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            test/message/for-of-let-loop-initializers.js
          
         | 
        
          
            View
          
         | 
        
        
          1
        
         | 
        
          1 chunk | 
          +4 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            test/message/for-of-let-loop-initializers.out
          
         | 
        
          
            View
          
         | 
        
        
          1
        
         | 
        
          1 chunk | 
          +7 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            test/message/for-of-loop-initializers-sloppy.js
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +5 lines, -4 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            test/message/for-of-loop-initializers-sloppy.out
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +7 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A + | 
        
          
            test/message/for-of-loop-initializers-strict.js
          
         | 
        
          
            View
          
         | 
        
        
          1
        
         | 
        
          1 chunk | 
          +4 lines, -3 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
      
          | 
        A | 
        
          
            test/message/for-of-loop-initializers-strict.out
          
         | 
        
          
            View
          
         | 
        
        
         | 
        
          1 chunk | 
          +7 lines, -0 lines | 
        
        
          
            0 comments
            
            
          
         | 
        
          
            Download
          
         | 
       
    
   
  
  
 
  
   
  
    
  
  
  
    
    Total messages: 20 (4 generated)
     
  
  
       |