Coder Social home page Coder Social logo

Comments (4)

Thevakumar-Luheerathan avatar Thevakumar-Luheerathan commented on May 26, 2024 1

The slash in the resource method is causing the issue. If we remove that slash, it works fine. The following snippets show various instances of generated code.

  • The client is in main.bal

    1. Generated client call in main.bal

      image
    2. Generated client call in test.bal

      image
  • The client is in test.bal

    1. Generated client call in test.bal
      image

@gabilang can you have a look on it?

from ballerina-lang.

nipunayf avatar nipunayf commented on May 26, 2024

The problem is only reproducible when the client definition is outside of the respective test file. Once the definition is placed along with the test function in the same file, the error is not generated.

from ballerina-lang.

TharmiganK avatar TharmiganK commented on May 26, 2024

The problem is only reproducible when the client definition is outside of the respective test file. Once the definition is placed along with the test function in the same file, the error is not generated.

Yes, the issue arises when we have the generated code for test. There seems to be an inconsistency in the generated byte code for the tests and main, where we call a field to get the default value for this resource method argument.

from ballerina-lang.

Dilhasha avatar Dilhasha commented on May 26, 2024

@nipunayf Shall we check the generated jar and verify whether this field is there?

from ballerina-lang.

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.