manifold-systems / manifold

Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.
http://manifold.systems/
Apache License 2.0
2.42k stars 125 forks source link

[manifold-ext] Implementing Map requires implementing ICallHandler#call #636

Open ByThePowerOfScience opened 2 weeks ago

ByThePowerOfScience commented 2 weeks ago

Describe the bug When writing a class that implements java.util.Map while using manifold-ext, IDEA's linter requires that I override ICallHandler#call since it does not have a default implementation in the interface.

To Reproduce Steps to reproduce the behavior:

  1. Make a class that implements Map
  2. The IDE will display a red line under the class declaration saying that you need to implement call.

Expected behavior As ICallHandler doesn't actually exist on the Map type, it shouldn't be required to be implemented on a custom map.

Desktop (please complete the following information):

rsmckinney commented 1 week ago

Thanks for reporting this. What I see in IntelliJ is this is only an issue when you generate the implementation via Implement methods quick fix, it automatically selects the call() method for implementation, if you unselect it, all is well. I am looking into why IJ is doing this since, internally, call() is modeled as a default interface method.