Error during setup:di:compile - Incompatible argument type
09:25 14 Feb 2017

I'm getting following errors on running setup:di:compile in my magento 2.

Incompatible argument type: Required type: \Magento\Catalog\Model\ProductTypes\ConfigInterface. Actual type: array;

Incompatible argument type: Required type: \Magento\Wishlist\Model\WishlistFactory. Actual type: array;

Code responsible for the error is as follows

    public function __construct(
    \Magento\Backend\Block\Template\Context $context,
    \Magento\Backend\Model\Session\Quote $sessionQuote,
    \Magento\Sales\Model\AdminOrder\Create $orderCreate,
    PriceCurrencyInterface $priceCurrency,
    \Magento\Wishlist\Model\WishlistFactory $wishlistFactory,
    \Magento\GiftMessage\Model\Save $giftMessageSave,
    \Magento\Tax\Model\Config $taxConfig,
    \Magento\Tax\Helper\Data $taxData,
    \Magento\GiftMessage\Helper\Message $messageHelper,
    StockRegistryInterface $stockRegistry,
    StockStateInterface $stockState,
    array $data = []
) {
    $this->_messageHelper = $messageHelper;
    $this->_wishlistFactory = $wishlistFactory;
    $this->_giftMessageSave = $giftMessageSave;
    $this->_taxConfig = $taxConfig;
    $this->_taxData = $taxData;
    $this->stockRegistry = $stockRegistry;
    $this->stockState = $stockState;
    parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
}

And

    public function __construct(
    \Magento\Backend\Block\Context $context,
    \Magento\Catalog\Model\ProductTypes\ConfigInterface $typeConfig,
    array $data = []
) {
    parent::__construct($context, $data);
    $this->typeConfig = $typeConfig;
}

In my Layout I'm calling like this

        
        
            
                
            
        
      

Thanks in Advance

php magento magento2