aiken-lang / aiken

A modern smart contract platform for Cardano
https://aiken-lang.org
Apache License 2.0
474 stars 92 forks source link

contract TypeErrorContract #1034

Closed avi69night closed 1 week ago

avi69night commented 1 week ago

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)