Skip to content

Type Check fail #7

@LKlinke

Description

@LKlinke
from probably.pgcl.compiler import compile_pgcl

compile_pgcl("""
nat s;
nat c;
nat tmp;
tmp :=((1-(1-(c*c))^(1/2))/c)
""")

Results in

CheckFail(location=BinopExpr(operator=Binop.POWER,
lhs=BinopExpr(operator=Binop.MINUS,
        lhs=NatLitExpr(1),
        rhs=BinopExpr(operator=Binop.TIMES, lhs=VarExpr('c'), rhs=VarExpr('c'))
    ),
rhs=RealLitExpr("1/2")),
message='Expected value of type NatType(bounds=None), got RealType().')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions