amazon-ion / ion-docs

Source for the GitHub Pages for Ion.
https://amazon-ion.github.io/ion-docs/
Apache License 2.0
22 stars 22 forks source link

How does the `annotate` macro handle edge cases #347

Open popematt opened 1 week ago

popematt commented 1 week ago

What is the output of the following?

(:annotate (:: "a" "b") (:none))

Is it an error, or simply (:none)?

What about this?

(:annotate (:: "a" "b") (:values 1 2))

Is it an error, or is it a::b::1 a::b::2?

toddjonker commented 1 week ago

That should result in a cardinality error on the second parameter, which should be exactly-one.

On Thu, Oct 3, 2024, at 3:08 PM, Matthew Pope wrote:

What is the output of the following?

(:annotate (:: "a" "b") (:none)) Is it an error, or simply (:none)?

What about this?

(:annotate (:: "a" "b") (:values 1 2)) Is it an error, or is it a::b::1 a::b::2?

— Reply to this email directly, view it on GitHub https://github.com/amazon-ion/ion-docs/issues/347, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPWPZ7XR6GGCIXT454OVTTZZW56VAVCNFSM6AAAAABPKWCU5GVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3DKMBXHE2TINA. You are receiving this because you are subscribed to this thread.Message ID: @.***>