I have a weird issue, can somebody help?
On API 45, the following test crashes with
FATAL_ERROR System.UnexpectedException: java.lang.String cannot be cast to apex.bytecodeinterpreter.ObjectInstance
on set2.retainAll (set1).
If I save the same class as API 44, all is well, and Set.retainAll () works as expected.
@isTest
public class UnexpectedTest {
@isTest
public static void testSet () {
Set<Id> set1 = new Set<id> {'0MI4E0000000NrOWAU', '0MI4E0000000NrNWAU'};
Set<Id> set2 = new Set<id> {'0MI4E0000000NrNWAU', '0MI4E0000000NrOWAU'};
set2.retainAll (set1);
System.debug (set2);
}
}
This happens on all orgs I have access to.
Update 2019-04-01: I have just tried it again, and it seems to work now with API 45