Division with comment containing '/' - SyntaxError

  • Version: 6.9.1, 7.0.0
  • Platform: Linux
  • Subsystem: Mint 17, Ubuntu 16

Following function fails parsing:

function foo(){
    var bar = 1 / 1; // '/'
}

SyntaxError: Unexpected end of input

tested with:

  • docker run -it node:6.9.1,
  • docker run -it node:7.0.0,
  • local installation

This code parses correctly in some node versions 5.X