ICMP and ICMPv6 are two different protocols. For ICMPv6 checksum callulation see [RFC2463][1] section 2.3 and the documents reffered there. 


  [1]: https://www.rfc-editor.org/rfc/rfc2463