Found some crazy apex syntax and I have no clue what it does.
public Account<List<String<Contact>>> whatIsWrongWithApex;
Is this a defect? Should this do something? Compiler not strict enough?
For the sake of the question, here is a simpler example:
public String<String> iThoughtThisShouldOnlyWorkForCollections;
Edit: Here is a full example where I instantiate an Account using this method and successfully insert it into the database:
public class ABug {
public Account<List<String<Contact>>> whatIsWrongWithApex;
public ABug() {
whatIsWrongWithApex = new Account<List<String<Contact>>>();
whatIsWrongWithApex.Name = 'Account Name';
insert whatIsWrongWithApex;
}
}
Anonymous Apex:
new ABug();

public Account<List<String<Contact>>> whatIsWrongWithApex;it works no different thanpublic Account whatIsWrongWithApex;as far as I can tell. I am wondering if it serves any other purpose. – Phil R Dec 6 '12 at 21:43new Account();in the first example. – Daniel Ballinger Dec 6 '12 at 22:43