Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid default return value for AbstractDataProcessor methods #4043

Closed
davidnich opened this issue Oct 21, 2020 · 0 comments
Closed

invalid default return value for AbstractDataProcessor methods #4043

davidnich opened this issue Oct 21, 2020 · 0 comments

Comments

@davidnich
Copy link
Contributor

    AbstractDataProviderType getExpectedType() {
        return getExpectedTypeImpl() ?? AbstractDataProviderType::anyType;
    }

    AbstractDataProviderType getReturnType() {
        return getReturnTypeImpl() ?? AbstractDataProviderType::anyType;
    }

leads to:

RUNTIME-TYPE-ERROR: <return statement> expects type 'object<AbstractDataProviderType>', but got an object of class 'Type' instead

Furthermore this error should be caught at parse time

@davidnich davidnich added this to the 0.9.6 milestone Oct 21, 2020
@davidnich davidnich self-assigned this Oct 21, 2020
@davidnich davidnich added this to To do in Qore Development via automation Oct 21, 2020
@davidnich davidnich modified the milestones: 0.9.6, 0.9.5.1 Oct 22, 2020
davidnich added a commit that referenced this issue Oct 23, 2020
…hods

refs #4045: fixed errors in lazy resolution of static class variables
davidnich added a commit that referenced this issue Oct 23, 2020
#4050)

* refs #4043: fixed invalid return values for AbstractDataProcessor methods
refs #4045: fixed errors in lazy resolution of static class variables

* refs #4045 fixed reference type handling issues exposed with the static class variable fix
Qore Development automation moved this from To do to Done Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant