dappuniversity / dapp_token

37 stars 46 forks source link

Functions are not allowed to have the same name as the contract? #3

Open Laddergrowth opened 4 years ago

Laddergrowth commented 4 years ago

I am getting the following error message when entering > truffle test

SyntaxError: Functions are not allowed to have the same name as the contract. If you intend this to be a constructor, use "constructor(...) { ... }" to define it. function DappToken (uint256 _initialSupply) public { ^ (Relevant source part starts here and spans across multiple lines).

HansLove commented 4 years ago

There is a function that is called the same as the contract, you just change the name