eos icon indicating copy to clipboard operation
eos copied to clipboard

Functions treated as duplicates only if prefix are the same.

Open rsivasundaram opened this issue 8 years ago • 3 comments

Hi, I am developing a smart contract and noticed that two functions with the same prefix are treated as duplicates and returns an error: error: duplicate case value '14024952939320644976'

As an example, 'select' and 'selectAuth' would get treated as the same function since 'select' matches for both.

I am not sure if this was the intended behavior, but it seems that it would be better to check against the entire name.

rsivasundaram avatar Jul 29 '18 23:07 rsivasundaram

this is because only lower case characters ('a'-'z') and numbers from 1 to 5 are allowed in a function name.

taokayan avatar Jul 30 '18 01:07 taokayan

I have other functions written in camelcase that are still compiling. Will it only print that error on run-time? @taokayan

As a follow-up, can variables defined internally have uppercase characters?

rsivasundaram avatar Jul 30 '18 01:07 rsivasundaram

For consistency, please ensure all function names have lowercase letters and numbers from 1-5 only. Variables names don't have this limitation.

taokayan avatar Jul 30 '18 02:07 taokayan