microsoft / verisol

A formal verifier and analysis tool for Solidity Smart Contracts
Other
245 stars 46 forks source link

Base and derived constructor argument mismatch #98

Closed shuvendu-lahiri closed 5 years ago

shuvendu-lahiri commented 5 years ago

Generate extra arguments for base constructor calls when derived constructor takes and argument, but base constructor does not.

pragma solidity ^0.4.24;

contract BaseContract {
  constructor() {
  }
}

contract DerivedContract is BaseContract {  
  //derived class takes an extra parameter
  constructor(uint x) {
  }      
}