Skip to content

Add checker conformance tests for type parameter deduction for type(t) - #529

Open
l46kok wants to merge 1 commit into
cel-expr:masterfrom
l46kok:type-parameter-deduction-conformance
Open

Add checker conformance tests for type parameter deduction for type(t)#529
l46kok wants to merge 1 commit into
cel-expr:masterfrom
l46kok:type-parameter-deduction-conformance

Conversation

@l46kok

@l46kok l46kok commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

test {
name: "type_map_erasure_comparison"
check_only: true
expr: "type({}) == map"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add explicit tests for the edge cases around free parameters?

I don't think these are super practical expressions but maybe better to document the weirdness than not?

It's also a bit of a can of worms so it might be fine to leave unspecified for now until we sort out the other issues with type unification.

I think the updates in C++ and java have us with something like:

[type([]), int]  -> list(dyn)

[] + [[type(1)]] + [[type([])]]  -> list<list<dyn>>

false ? int : type([]) -> no overload

@l46kok l46kok Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me send these out as a separate PR, the [] + [[type(1)]] + [[type([])]] case especially requires further discussion (all of the stacks are divergent, so we need to decide on a behavior)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants