Feature request from Galillei, posted on GitHub Jun 15, 2016
Steps to reproduce
I use Magento 2.0.5 on php 7.0.2 and try it use with anonymous classes. It's work correctly before i try to use production mode with di compile.
for example
public function getDebug()
{
return (new class($this->_loadOrder){
protected $loadOrder;
public function __construct($loadOrder)
{
$this->_loadOrder = $loadOrder;
}
public function getOrderStatus()
{
return $this->_loadOrder->getStatus();
}
});
}
And try to run follow command ./bin/magento setup:di:compile
i get error
[ReflectionException] Class \Rcklss\ShipWorks\Model\$this does not exist