Add failing test for ambiguous names
This commit is contained in:
parent
8ac4156c87
commit
52b1c99ea7
@ -782,6 +782,12 @@ failing_contracts() ->
|
||||
[<<?Pos(1,6)
|
||||
"Only one main contract can be defined.">>
|
||||
])
|
||||
, ?TYPE_ERROR(using_namespace_ambiguous_name,
|
||||
[ <<?Pos(2,3)
|
||||
"Ambiguous name: Xa.f at line 2, column 3\nXb.f at line 5, column 3">>
|
||||
, <<?Pos(13,23)
|
||||
"Unbound variable A.f at line 13, column 23">>
|
||||
])
|
||||
].
|
||||
|
||||
-define(Path(File), "code_errors/" ??File).
|
||||
|
13
test/contracts/using_namespace_ambiguous_name.aes
Normal file
13
test/contracts/using_namespace_ambiguous_name.aes
Normal file
@ -0,0 +1,13 @@
|
||||
namespace Xa =
|
||||
function f() = 1
|
||||
|
||||
namespace Xb =
|
||||
function f() = 2
|
||||
|
||||
contract Cntr =
|
||||
using Xa as A
|
||||
using Xb as A
|
||||
|
||||
type state = int
|
||||
|
||||
entrypoint init() = A.f()
|
Loading…
x
Reference in New Issue
Block a user