Skip to content

Commit

Permalink
Virtual expr nodes - do not reuse wrong attributes, a printed expr mi…
Browse files Browse the repository at this point in the history
…ght be cached there
  • Loading branch information
ondrejmirtes committed Oct 21, 2022
1 parent 407cb5a commit 8369197
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Node/Expr/GetIterableKeyTypeExpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class GetIterableKeyTypeExpr extends Expr implements VirtualNode

public function __construct(private Expr $expr)
{
parent::__construct($expr->getAttributes());
parent::__construct([]);
}

public function getExpr(): Expr
Expand Down
2 changes: 1 addition & 1 deletion src/Node/Expr/GetIterableValueTypeExpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class GetIterableValueTypeExpr extends Expr implements VirtualNode

public function __construct(private Expr $expr)
{
parent::__construct($expr->getAttributes());
parent::__construct([]);
}

public function getExpr(): Expr
Expand Down
2 changes: 1 addition & 1 deletion src/Node/Expr/GetOffsetValueTypeExpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class GetOffsetValueTypeExpr extends Expr implements VirtualNode

public function __construct(private Expr $var, private Expr $dim)
{
parent::__construct($var->getAttributes());
parent::__construct([]);
}

public function getVar(): Expr
Expand Down
2 changes: 1 addition & 1 deletion src/Node/Expr/OriginalPropertyTypeExpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class OriginalPropertyTypeExpr extends Expr implements VirtualNode

public function __construct(private Expr\PropertyFetch|Expr\StaticPropertyFetch $propertyFetch)
{
parent::__construct($propertyFetch->getAttributes());
parent::__construct([]);
}

public function getPropertyFetch(): Expr\PropertyFetch|Expr\StaticPropertyFetch
Expand Down
2 changes: 1 addition & 1 deletion src/Node/Expr/SetOffsetValueTypeExpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SetOffsetValueTypeExpr extends Expr implements VirtualNode

public function __construct(private Expr $var, private ?Expr $dim, private Expr $value)
{
parent::__construct($var->getAttributes());
parent::__construct([]);
}

public function getVar(): Expr
Expand Down

0 comments on commit 8369197

Please sign in to comment.