Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upCertain method calls fail when called from static context and compiled with "internal-call-transformation": true #2005
Comments
This comment has been minimized.
This comment has been minimized.
@dreamsxin Could you please take a look? |
This comment has been minimized.
This comment has been minimized.
Because |
This comment has been minimized.
This comment has been minimized.
Please test again, There's another mistake: public function __toString() -> string
{
return trim(array_reduce(this->a, ["Tensor\\Matrix", "implodeRow"], ""));
} |
This comment has been minimized.
This comment has been minimized.
Hi @dreamsxin it looks like the 900bd5f commit to the development branch fixes the primary issue. The issue of overriding parent methods still exists so that probably a separate issue. Thank you for pointing out the error with Thanks again for your great work guys |
This comment has been minimized.
This comment has been minimized.
Closing, this is fixed. Lets follow up in separate issue with the overriding parent methods. @andrewdalpino Could you please open a new issue with problem description and code to reproduce? |
I get the following errors when running this test with the extension compiled with
internal-call-transformation: true
. The errors go away if we disable the optimization.At first glance, it appears that we can't access methods on objects from another class' static context. This is similar to #2000 but different.
I traced the calls back to the matrix decomposition objects here. They all use static factories. Here is an excerpt from the LU decomposition where one of the errors is being thrown. It's a similar case for each of the other decompositions.
There also seems to be the issue that methods being overloaded by a child class are not being called (the parent method is called instead.) This may or may not be related to this issue - and again, only when compiled with
internal-call-transformation: true
.