From 8d419bc54fc925a1c1efa0927dd35993ba05f59b Mon Sep 17 00:00:00 2001 From: Gaith Hallak Date: Wed, 25 May 2022 18:35:13 +0400 Subject: [PATCH] Add test for accessing maps with the wrong type --- test/aeso_compiler_tests.erl | 7 +++++-- test/contracts/polymorphism_variance_switching.aes | 12 ++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index 35d7485..8e54991 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -876,9 +876,12 @@ failing_contracts() -> " `g5 : ((Animal) => Animal) => Cat`\n" "to arguments\n" " `x : (Cat) => Cat`">>, - <> + "when checking the type of the expression `f6() : option(Animal)` against the expected type `option(Cat)`">>, + <> ]) , ?TYPE_ERROR(polymorphism_variance_switching_custom_types, [<