Add test for warning on const shadowing
This commit is contained in:
parent
de34fc1122
commit
28b26ea4cc
@ -287,7 +287,9 @@ warnings() ->
|
|||||||
<<?PosW(48, 5)
|
<<?PosW(48, 5)
|
||||||
"Unused return value.">>,
|
"Unused return value.">>,
|
||||||
<<?PosW(60, 5)
|
<<?PosW(60, 5)
|
||||||
"The function `dec` is defined but never used.">>
|
"The function `dec` is defined but never used.">>,
|
||||||
|
<<?PosW(73, 9)
|
||||||
|
"The definition of `const` shadows an older definition at line 70, column 3.">>
|
||||||
]).
|
]).
|
||||||
|
|
||||||
failing_contracts() ->
|
failing_contracts() ->
|
||||||
@ -856,7 +858,9 @@ failing_contracts() ->
|
|||||||
<<?Pos(48, 5)
|
<<?Pos(48, 5)
|
||||||
"Unused return value.">>,
|
"Unused return value.">>,
|
||||||
<<?Pos(60, 5)
|
<<?Pos(60, 5)
|
||||||
"The function `dec` is defined but never used.">>
|
"The function `dec` is defined but never used.">>,
|
||||||
|
<<?Pos(73, 9)
|
||||||
|
"The definition of `const` shadows an older definition at line 70, column 3.">>
|
||||||
])
|
])
|
||||||
, ?TYPE_ERROR(polymorphism_contract_interface_recursive,
|
, ?TYPE_ERROR(polymorphism_contract_interface_recursive,
|
||||||
[<<?Pos(1,24)
|
[<<?Pos(1,24)
|
||||||
|
@ -65,3 +65,10 @@ contract Remote =
|
|||||||
contract C =
|
contract C =
|
||||||
payable stateful entrypoint
|
payable stateful entrypoint
|
||||||
call_missing_con() : int = (ct_1111111111111111111111111111112JF6Dz72 : Remote).id(value = 1, 0)
|
call_missing_con() : int = (ct_1111111111111111111111111111112JF6Dz72 : Remote).id(value = 1, 0)
|
||||||
|
|
||||||
|
namespace ShadowingConst =
|
||||||
|
let const = 1
|
||||||
|
|
||||||
|
function f() =
|
||||||
|
let const = 2
|
||||||
|
const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user