zephir icon indicating copy to clipboard operation
zephir copied to clipboard

Reached end of the method without returning a valid type specified in the return-type hints

Open sergeyklay opened this issue 5 years ago • 0 comments

Error: "Reached end of the method without returning a valid type specified in the return-type hints"

    public function testSwitch() -> int
    {
        var a;
        let a = 1;

        switch a {
            case 1:
            default:
                return 1;
            case 2:
                return 2;
        }
    }

sergeyklay avatar Nov 04 '18 09:11 sergeyklay