Skip to content

Unable to extend java array method #737

@renshengongji

Description

@renshengongji

Describe the bug
Unable to extend java array method using manifold-ext
and the same for the ManArrayExt

To Reproduce
Steps to reproduce the behavior:

  1. define a any type array
  2. call extension method for array
  3. start app via idea

Expected behavior
compile sucess and extension method completion is displayed

Screenshots
Image
Image

Desktop (please complete the following information):

  • OS Type & Version: Windows 11 x64
  • Java/JDK version: 21
  • IDE version (IntelliJ IDEA or Android Studio): IDEA 2025.1.5.1 #IU-251.28293.39
  • Manifold version: 2025.1.26
  • Manifold IntelliJ plugin version: 2025.1.19

Additional context
The pom related settings are what I pasted from that working project
This problem existed at the beginning of my project
It works fine in another project of mine (I haven't written that project for a long time, I don't know if it works now)

package dev.renshengongji.musicplayer.extensions.manifold.rt.api.Array;

import manifold.ext.rt.api.Extension;

/**
 * @author renshengongji
 * @date 2025/9/9 19:13
 **/
@Extension
public class ArrayExtension {
    public static <T> void swap(T[] array, int i, int j) {
        T temp = array[i];
        array[i] = array[j];
        array[j] = temp;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions