Skip to content

Commit

Permalink
feat(#165): fild initialization in constructors don't work
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Nov 8, 2023
1 parent a1750bd commit 7874256
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/it/distilled/src/main/java/org/eolang/jeo/B.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

public final class B {
private final A a;
private int x = 2;
private int x;

B(A a) {
this.a = a;
}

int bar() {
x = 2;
return a.foo() + x;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.eolang.jeo.representation.directives;

import com.jcabi.log.Logger;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.eolang.jeo.representation.directives;

import com.jcabi.log.Logger;
import java.util.Iterator;
import org.eolang.jeo.representation.HexData;
import org.xembly.Directive;
Expand Down Expand Up @@ -71,6 +72,15 @@ public Iterator<Directive> iterator() {
.attr("data", "bytes");
if (!this.name.isEmpty()) {
directives.attr("name", this.name);
if (name.equals("value")) {
Logger.info(this,
String.format(
"We are trying to save the next value into XMIR: '%s' with type '%s'",
this.data,
this.data.getClass().getSimpleName()
)
);
}
}
return directives.set(hex.value()).up().iterator();
}
Expand Down

0 comments on commit 7874256

Please sign in to comment.