contract interface NameClashInterface =
entrypoint double_proto : () => int
entrypoint double_proto : () => int
contract C = entrypoint init() = ()
The above code will unexpectedly result in the following error:
{error,[{err,{pos,no_file,0,0},
type_error,
"Invalid call to contract entrypoint `NameClashInterface.double_proto`.",
"It must be called as `c.double_proto` for some `c : NameClashInterface`."},
This happens because the lookup in the function lookup_env1 does not distinguish between a call to a qualified function and a new definition of a function in the scope, and it considers both as a call to a qualified function.
The above code will unexpectedly result in the following error:
This happens because the lookup in the function
lookup_env1
does not distinguish between a call to a qualified function and a new definition of a function in the scope, and it considers both as a call to a qualified function.