I have two maps like below:
Map<String,Set<Id>> emailMatchingContacts = new Map<String,Set<Id>>(); Map<String,Set<Id>> epostMatchingContacts = new Map<String,Set<Id>>();
I've loaded some keys and values to the maps. Now I'm trying to get all the contact id's added in this maps. Tried with minimum possible code like below
Set<Id> matchingContactIds = new Set<Id>(); matchingContactIds.addAll(emailMatchingContacts.values()); matchingContactIds.addAll(epostMatchingContacts.values());
but it was throwing an error like below
Illegal assignment from List<Set<Id>> to Set<Id>
Is that apex standard behavior, loading the map values into List by default?