Take the following code:
pragma solidity 0.4.24;
contract TestCoin {
mapping(address => uint256) public balanceOf;
uint256 public totalSupply;
constructor(uint256 initialSupply) public {
totalSupply = initialSupply;
balanceOf[msg.sender] = totalSupply;
}
}
This code works fine locally and works fine in Remix. But when trying to deploy this contract from the Ethereum wallet I get the following error:
Could not compile source code.
Expected identifier, got 'eth_compileSolidity'
constructor(uint256 initialSupply) public {
^
This question was already asked here, Expected identifier, got 'eth_compileSolidity' constructor () public {. The question was never actually answered but the person who asked the question apparently fixed it.