Skip to content

Invalid/Inconsistent Error String on Invalid Field Access #962

@asadrajput2

Description

@asadrajput2

Invalid field access for object like this

let var = {"a": {"b": "randomstring" }};

var.a.b.c != "";

returns error like this

invalid operation: int(string) (3:9)
 | var.a.b.c != "";
 | ........^

When the object is loaded in the Env and accessed the same way, we get this:


type string has no field c (3:5)
 | a.b.c != "";
 | ....^

Former is misleading and latter is appropriate. Can we have both cases behave the same?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions