Skip to content

Ref-head rule reported as conflicting although it isn't #7182

Open
@anderseknert

Description

@anderseknert
package play

import rego.v1

x := "node"

obj[x].y := "foo"

obj[x].z contains "bar"

gives

1 error occurred: policy.rego:7: rego_type_error: conflicting rules data.play.obj[__local1__].z found

There shouldn't be any ways these incremental definitions could create a conflict though given that they both contribute to different subtrees (x and z) of the object.

Another lesser issue is of course how __local1__ leaks out in the error message, but that would be even less of an issue if this wasn't an error :)

Playground link

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions