Skip to content

Instantly share code, notes, and snippets.

@jimmydivvy
Created February 7, 2013 02:19
Show Gist options
  • Save jimmydivvy/4727876 to your computer and use it in GitHub Desktop.
Save jimmydivvy/4727876 to your computer and use it in GitHub Desktop.
This code triggers the following error: "System.UnexpectedException: User defined type found in unsupported code path" when a debug console is open. To replicate, create this as a class, and enable the "Override log filters" setting on the class within Develop -> Classes
public class TestSalesforceBug {
enum Day {
MON, TUE, WED, THU, FRI
}
@IsTest static void testMe(){
Set<Day> d = new Set<Day>{
Day.MON, Day.TUE, Day.WED
};
if( d.contains( Day.MON )){
System.debug('Has Monday');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment