Skip to content

Commit

Permalink
feat(objectionary#329): make Super as Typed instance - add type to it
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Jul 12, 2024
1 parent 104b2f4 commit 201ea69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/org/eolang/opeo/ast/Constructor.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/**
* Constructor output node.
* @since 0.1
* @todo ! repair 'spring-fat' it
*/
@ToString
@EqualsAndHashCode
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/org/eolang/opeo/ast/Super.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.eolang.jeo.representation.xmir.XmlNode;
import org.eolang.opeo.compilation.Parser;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.xembly.Directive;
import org.xembly.Directives;

Expand All @@ -41,7 +42,7 @@
*/
@ToString
@EqualsAndHashCode
public final class Super implements AstNode {
public final class Super implements AstNode, Typed {

/**
* Super instance.
Expand Down Expand Up @@ -175,4 +176,9 @@ public List<AstNode> opcodes() {
);
return res;
}

@Override
public Type type() {
return Type.getReturnType(this.attributes.descriptor());
}
}

0 comments on commit 201ea69

Please sign in to comment.