== Why is this an issue?

The contract and expectation of a ``++get++`` function is that it will return something. Failing to return a value on all paths is surely an error.


=== Noncompliant code example

[source,javascript]
----
var x = {
  _prop : "foo",
  get prop(){  // Noncompliant
    console.log("prop getter");
  }
}

x.prop; // returns undefined
----


=== Compliant solution

[source,javascript]
----
var x = {
  _prop : "foo",
  get prop(){
    console.log("prop getter");
    return _prop;
  }
}

x.prop; // returns "foo"
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Return a value from this function.


=== Highlighting

signature


endif::env-github,rspecator-view[]
