-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
JavaIntegrationAll issues that relate to integrating ZenCode with existing Java CodeAll issues that relate to integrating ZenCode with existing Java CodebugSomething isn't workingSomething isn't workingbytecodeAll issues that relate to the generation of Java BytecodeAll issues that relate to the generation of Java Bytecode
Milestone
Description
ZenCode offers the functionality to make an existing class implement new interfaces.
Example code would be:
public class Point2D {
public var x as usize;
public var x as usize;
public this(x: usize, y: usize) { this.x = x; this.y = y; }
}
public interface CommandStringDisplayable {
public get commandString as string;
}
public expand MyClass {
public implements CommandStringDisplayable {
public get commandString => "<point:" + x + ":" + y + ">";
}
}Currently, while this code (probably) parses and passes validation, it breaks at Java Compilation.
Reason is that this functionality was never implemented for the Java side.
We need to implement this for the Java Bytecode side or decide how to deal with this otherwise
Acceptance criteria:
- Have decided on a plan on how to implement this OR Have decided that this should not be possible on ZC Java
- How to integrate with Java-Code
- what should
new MyClass() instanceof CommandStringDisplayablereturn? - How to add interfaces to existing Java Classes?
- Can interfaces be added to final classes?
- what should
- Edge Cases:
- Interface already implemented either by original class or by another expansion => Error
- Conflicting method definition in 2 interfaces => Decide: Error or okay?
Metadata
Metadata
Assignees
Labels
JavaIntegrationAll issues that relate to integrating ZenCode with existing Java CodeAll issues that relate to integrating ZenCode with existing Java CodebugSomething isn't workingSomething isn't workingbytecodeAll issues that relate to the generation of Java BytecodeAll issues that relate to the generation of Java Bytecode