HoriSun / closure-compiler

Automatically exported from code.google.com/p/closure-compiler
0 stars 0 forks source link

Foo.prototype.eval() is required to return {?Object} #1212

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Quite serious issue from my PoV...

/**
 * @constructor
 */
var Foo = function() {}

Foo.prototype = {
  eval: function(a, b)
  {
    var foo = null;
  }
}

Compiling this code will result in:

Foo.js:10: WARNING - Missing return statement. Function expected to return 
(Object|null).
  eval: function(a, b)
        ^

Original issue reported on code.google.com by apav...@chromium.org on 27 Jan 2014 at 7:45

GoogleCodeExporter commented 9 years ago
I have a fix for this.

Original comment by johnl...@google.com on 27 Jan 2014 at 6:37

GoogleCodeExporter commented 9 years ago
This issue was closed by revision aa21050fcac1.

Original comment by blic...@google.com on 30 Jan 2014 at 9:34