Skip to content
This repository was archived by the owner on Dec 31, 2017. It is now read-only.
This repository was archived by the owner on Dec 31, 2017. It is now read-only.

inline return types often ignored #68

Open
@wkeese

Description

@wkeese

See for example dojox/gfx/matrix.js:

    scaleAt: function(a, b, c, d){
        // summary:
        //      scales a picture using a specified point as a center of scaling
        // description:
        //      Compare with dojox/gfx/matrix.scale().
        // a: Number
        //      a scaling factor used for the x coordinate, or a uniform scaling factor used for both coordinates
        // b: Number?
        //      a scaling factor used for the y coordinate
        // c: Number|Point
        //      an x component of a central point, or a central point
        // d: Number
        //      a y component of a central point

        switch(arguments.length){
            case 4:
                // a and b are scale factor components, c and d are components of a point
                return m._sandwich(m.scale(a, b), c, d); // dojox/gfx/matrix.Matrix2D
            case 3:
                if(typeof c == "number"){
                    return m._sandwich(m.scale(a), b, c); // dojox/gfx/matrix.Matrix2D
                }
                return m._sandwich(m.scale(a, b), c.x, c.y); // dojox/gfx/matrix.Matrix2D
        }
        return m._sandwich(m.scale(a), b.x, b.y); // dojox/gfx/matrix.Matrix2D
    },

The return type merely shows up as undefined. You can workaround by adding a

// returns: dojox/gfx/matrix.Matrix2D

to the top level summary section. (Therefore, to reproduce this bug, remove the // returns: ... from the top of the methods in that file.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions