title: JavaScript classes with getter and setter cause RangeError: Maximum call stack size exceeded
body: <p>I am currently experimenting with ECMA6 classes.
  My current class looks like the following</p>
  
  <pre><code>class Player {
    constructor(id) {
      this.id = id;
      this.cash = 350;
    }
  
    get cash() {
      return this.cash;
    }
  
    set cash(value) { // line 19
      this.cash = value; // line 20
    }
  };
  </code></pre>
  
  <p>When I am now creating a new Object by calling <code>let playerObject = new Player(1);</code> I receive the following error</p>
  
  <pre><code>...\node_modules\mysql\lib\protocol\Parser.js:82
          throw err;
                ^
  RangeError: Maximum call stack size exceeded
      at Player.cash (player.js:19:11)
      at Player.cash (player.js:20:15)
      at Player.cash (player.js:20:15)
      at Player.cash (player.js:20:15)
      at Player.cash (player.js:20:15)
      at Player.cash (player.js:20:15)
      at Player.cash (player.js:20:15)
      at Player.cash (player.js:20:15)
      at Player.cash (player.js:20:15)
      at Player.cash (player.js:20:15)
  Press enter to exit
  </code></pre>
  
  <p>What does this have to do with the mysql library? Why does the error is multiple times in the same line? I am only calling it once.</p>