Git Product home page Git Product logo

Comments (5)

michalfelski avatar michalfelski commented on June 2, 2024

The easiest way is replacing "never" with "void" when code is generated until it breaks signature when method overrides parent or it is implementation of the interface :)

from kahlan.

jails avatar jails commented on June 2, 2024

If I get it right the never type require an exit() or die() call somehow.
It's possible to handle them with the Quit plugin to return an exception instead of exiting the process.

I added the following in the dev branch to handle the never type.
978cd05#diff-11276323115a69c417f67dba6efcf525db29f062902c991f7e2763954d70fae2R94

You should be able to test it by using kahlan/kahlan:dev-dev as dependencies.
Make sure once updated to run kahlan -cc to clear caches so they can be regenerated.

Does that solve the issue you were talking about ?

from kahlan.

michalfelski avatar michalfelski commented on June 2, 2024

Thank you for your super fast reply. That patch completely solves the problem.
For accuracy never specifies functions that call exit(), throw an exception or are an infinite loop. All these cases work correctly with this change.

from kahlan.

samsonasik avatar samsonasik commented on June 2, 2024

@michalfelski thank you for verify, I will create new release for it πŸ‘

from kahlan.

samsonasik avatar samsonasik commented on June 2, 2024

kahlan 5.2.3 released for it https://github.com/kahlan/kahlan/releases/tag/5.2.3

from kahlan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.