I developed the TypeErrorContract function with aiken-lang smart contract and i face some problem
This is the Code
contract TypeErrorContract {
entrypoint main(x: Int) -> Bool {
x + "string" -- Invalid operation between Int and String
}
}
Error Details
TypeError: The line x + "string" attempts to add an integer (x, of type Int) to a string ("string").
Invalid Operation: This results in a type error because the addition operator + is not defined for operands of different types (in this case, Int and String).
Error Message:
Error: Invalid operand types for + (Int, String)
I developed the TypeErrorContract function with aiken-lang smart contract and i face some problem
This is the Code
contract TypeErrorContract { entrypoint main(x: Int) -> Bool { x + "string" -- Invalid operation between Int and String } }
Error Details TypeError: The line x + "string" attempts to add an integer (x, of type Int) to a string ("string"). Invalid Operation: This results in a type error because the addition operator + is not defined for operands of different types (in this case, Int and String).
Error Message: Error: Invalid operand types for
+
(Int, String)