Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-4117

Function return types should be inferred when associated sdoc comment does not include an @return tag

    Details

    • Story Points:
      8

      Description

      In the following code snippet

      /**
       * @param {String} a
       * @param {String} b
       */
      function abc(a, b) { return a + b; }
      

      We say the return type of "abc" is "void". The type inferencer sees the sdoc comment and does not infer the return statement. Since there is no @return tag in the sdoc comment, the return type becomes "void". In this case, if a function has return statements, we should infer their types, using any @param type hints as appropriate.

        Attachments

          Activity

            People

            • Assignee:
              klindsey Kevin Lindsey
              Reporter:
              klindsey Kevin Lindsey
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration