Skip to content

Instantly share code, notes, and snippets.

@dstu
Last active December 10, 2015 17:29
Show Gist options
  • Save dstu/4468427 to your computer and use it in GitHub Desktop.
Save dstu/4468427 to your computer and use it in GitHub Desktop.
Demo of bug in handling completion of methods with multiple signatures by semantic-ia-complete-symbol in malabar-mode.
public class App {
public static void main(final String[] args) {
System.out.println("Hey, you guys!!!!");
final Signatures s = new Signatures();
// Auto-complete below should provide several signatures
// for stuff(), but only one is given.
s.
}
}
import java.io.PrintStream;
public class Signatures {
public Signatures() { }
public void thing() { System.out.println("thing"); }
public void stuff() { System.out.println("default"); }
public void stuff(final String message) { System.out.println(message); }
public void stuff(final String message, final int length) { stuff(System.out, message, length); }
public void stuff(final PrintStream out, final String message, final int length) {
if (message.length() <= length) {
out.println(message);
} else {
out.println(message.substring(0, length));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment