When a macro is used as first entry directly after method declaration it will use the first entry as the return descriptor
macro System.out
getstatic java/lang/System.out Ljava/io/PrintStream;
end
method public static main ([Ljava/lang/String; args)V
System.out // converts to 'getstatic java/lang/System/out Ljava/io/PrintStream;'
ldc "Hello, World!"
invokevirtual println // converts to 'invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V'
return
end
Error: descriptor is invalid at offset 2 in "()getstatic"
public static ??? main();
descriptor: ()getstatic
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc #10 // String Hello, World!
2: invokevirtual #16 // Method java/io/PrintStream.println:(Ljava/lang/String;)V