• Ahens
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hello, 

 

Here is the error I receive, 

Error: ContactController Compile Error: Illegal assignment from LIST<Contact> to LIST<Contact> at line 11 column 9

 

Below is the simplified version of my Apex class: 

 

public class ContactController {       

public void getContact() {       

List<Contact> d = [select id, name from Contact where id = :ApexPages.currentPage().getParameters().get('id')];           }      

}

 

I tried casting the query result to (List<Contact>), which gives me the following error:

Error: ContactController Compile Error: Incompatible types since an instance of LIST<Contact> is never an instance of LIST<Contact> at line 4 column 27

 

Thanks for the help! 

  • November 07, 2011
  • Like
  • 0

Hello, 

 

Here is the error I receive, 

Error: ContactController Compile Error: Illegal assignment from LIST<Contact> to LIST<Contact> at line 11 column 9

 

Below is the simplified version of my Apex class: 

 

public class ContactController {       

public void getContact() {       

List<Contact> d = [select id, name from Contact where id = :ApexPages.currentPage().getParameters().get('id')];           }      

}

 

I tried casting the query result to (List<Contact>), which gives me the following error:

Error: ContactController Compile Error: Incompatible types since an instance of LIST<Contact> is never an instance of LIST<Contact> at line 4 column 27

 

Thanks for the help! 

  • November 07, 2011
  • Like
  • 0