-
Notifications
You must be signed in to change notification settings - Fork 121
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
Extension Methods do not work #593
Comments
This also fails with everything related to the nested class removed (The IntelliJ plugin marks only that extension method as not existing). As a side note, it would be nice to have a full example project using |
Sorry, you cannot make class extensions on Java source files in the same module, only on compiled Java classes outside the module/project containing the extension class. You can, however, extend types produced from type manifolds in the same module such as JSON and SQL types. There is compiler warning about this on the offending extension class. It should probably be an error though shrug |
Thanks! |
Describe the bug
Extension methods fail too compile with a message like:
Both usages of extension methods in the code below fail to compile.
To Reproduce
Steps to reproduce the behavior:
Here is my folder structure:
Here is my
pom.xml
(which is exactly the example listed):Here is
Foo.java
:Here is
FooExt.java
:Expected behavior
Running
mvn compile
should succeed without error.Desktop (please complete the following information):
javac --version
: javac 17.0.10mvn --version
:Stack trace
Here is the entire output of
mvn compile --debug -Dstyle.color=never
:output.txt
The text was updated successfully, but these errors were encountered: