In solidity language when I cast string variable to byte32 it show error of Explicit type conversion not allowed from "string memory" to "bytes32" as given in below function
function testByte32() returns (bytes32)
{
string memory data="Hello World";
return(bytes32(data));
}
But when I directly convert string to byte32 it works. Its strange behavior is out of my understanding
function getMsg() public constant returns(bytes32 userData)
{
bytes32 bb=bytes32("Hello World");
return(bb);
}