Complement of disjunction #3229
-
To preempt the A/B question I'll post a longer example, and my presumed minimal reproducer thereafter. I'm trying to do the following: #systemProjectId: "someId"
#systemProjectNames: "system"|"monitoring"
#projects: [... ({
name: #systemProjectNames
annotations: systemProjectId: #systemProjectId
} | {
name: !#systemProjectNames
})]
projects: #projects & [
{
name: "system"
annotations: systemProjectId: "someId"
},
{
name: "other"
}
] I get
I think the minimal reproducer is:
I get:
I'm not sure what unresolved means in this case. Conceptually this does not seem like much of a stretch to ask of the typing system, am I wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @hansbogert - unfortunately you have just run into #2656. Your intuition around using What you tried to write was (play): #foo: "1" | "2"
foo: !#foo & "3" In CUE today that needs to be written as follows (play): #foo: "1" | "2"
foo: "3"
_foo_ok: true & ((foo & #foo) == _|_) In future (#943) this will be written: #foo: "1" | "2"
foo: not(#foo) & "3" |
Beta Was this translation helpful? Give feedback.
Hi @hansbogert - unfortunately you have just run into #2656.
Your intuition around using
!
is solid: however in CUE that is actually spelt a different way.What you tried to write was (play):
In CUE today that needs to be written as follows (play):
In future (#943) this will be written: