Giter Site home page Giter Site logo

Comments (6)

jlerbsc avatar jlerbsc commented on June 18, 2024

This case is not currently covered. Thank you for reporting this bug.

from javaparser.

YXL-123 avatar YXL-123 commented on June 18, 2024

OK, thank you for your reply.

from javaparser.

jlerbsc avatar jlerbsc commented on June 18, 2024

This is not trivial, because to resolve the println(..) method Javaparser has to resolve the type of the parameter, which is undefined at this stage. I don't see any precision on this point in the JLS. If you can clarify what needs to be done, I can try to resolve this bug quickly.

            public class Lambda {
                interface MyInterface {
                    void doSomething(int a);
                }

                void test(){
                    MyInterface myInterface;
                    myInterface = arg -> System.out.println(arg);
                }
            }

Decompiling the class doesn't provide any information either.

Compiled from "Lambda.java"
public class Lambda {
  public Lambda();
    Code:
       0: aload_0
       1: invokespecial #1                  // Method java/lang/Object."<init>":()V
       4: return

  void test();
    Code:
       0: invokedynamic #2,  0              // InvokeDynamic #0:doSomething:()LLambda$MyInterface;
       5: astore_1
       6: return
}

from javaparser.

YXL-123 avatar YXL-123 commented on June 18, 2024

Thanks, we try to distinguish function overloading by getting the QualifiedSignature of MethodCallExpr and get its method descriptor.

from javaparser.

jlerbsc avatar jlerbsc commented on June 18, 2024

Please don't mix issues.

from javaparser.

YXL-123 avatar YXL-123 commented on June 18, 2024

Sorry, I'll create a new issue.

from javaparser.

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.