Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Suban05 committed Feb 21, 2025
1 parent 380790c commit 7556abe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions eo-runtime/src/main/java/org/eolang/AtWithRho.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class AtWithRho implements Attr {
/**
* Original attribute.
*/
private final Attr origin;
private final Attr original;

/**
* Rho.
Expand All @@ -45,21 +45,21 @@ final class AtWithRho implements Attr {
* @param rho Rho
*/
AtWithRho(final Attr attr, final Phi rho) {
this.origin = attr;
this.original = attr;
this.rho = rho;
}

@Override
public Attr copy(final Phi self) {
return new AtWithRho(
this.origin.copy(self),
this.original.copy(self),
self
);
}

@Override
public Phi get() {
Phi ret = this.origin.get();
Phi ret = this.original.get();
if (!ret.hasRho()) {
ret = ret.copy();
ret.put(Attr.RHO, this.rho);
Expand All @@ -69,14 +69,14 @@ public Phi get() {

@Override
public void put(final Phi phi) {
this.origin.put(phi);
this.original.put(phi);
}

/**
* Returns the original attribute.
* @return The original attribute
*/
public Attr getOrigin() {
return this.origin;
Attr origin() {
return this.original;
}
}
2 changes: 1 addition & 1 deletion eo-runtime/src/main/java/org/eolang/PhDefault.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public boolean hasRho() {
@Override
public void put(final int pos, final Phi object) {
final String name = this.attr(pos);
if (!(((AtWithRho) this.attrs.get(name)).getOrigin() instanceof AtVoid)) {
if (!(((AtWithRho) this.attrs.get(name)).origin() instanceof AtVoid)) {
throw new ExReadOnly(
String.format(
"Can't put attribute with position %d because it's not void one",
Expand Down

0 comments on commit 7556abe

Please sign in to comment.