You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a @tag variant type with an inline record definition, we lose the error calling out a duplicate tag: "This untagged variant definition is invalid: Duplicate literal foo."
Here's an example with a boolean tag but this also does not produce the compiler error for ints / strings in the playground link
Fixes#7438
In variant definitions without payloads, an error is reported if two cases have the same literal `@as(literal)`.
The check so far was missing for cases with payload, where the literal goes into the tag.
However it's perfectly possible to use the same tag in a case without payload, and one with payloads, as the two representations don't overlap.
Fixes#7438
In variant definitions without payloads, an error is reported if two cases have the same literal `@as(literal)`.
The check so far was missing for cases with payload, where the literal goes into the tag.
However it's perfectly possible to use the same tag in a case without payload, and one with payloads, as the two representations don't overlap.
Fixes#7438
In variant definitions without payloads, an error is reported if two cases have the same literal `@as(literal)`.
The check so far was missing for cases with payload, where the literal goes into the tag.
However it's perfectly possible to use the same tag in a case without payload, and one with payloads, as the two representations don't overlap.
Thank you for filing! Check list:
When using a
@tag
variant type with an inline record definition, we lose the error calling out a duplicate tag: "This untagged variant definition is invalid: Duplicate literal foo."Here's an example with a boolean tag but this also does not produce the compiler error for ints / strings in the playground link
https://rescript-lang.org/try?version=v12.0.0-alpha.10&module=esmodule&code=AIFwhg5gFARCCeAHApjAlAKASgBAZxACcBLAOwgFEAPHAXgxxwB8dgw9YAzAe2-RwAqhAK7IoAbwAmYcAC58RMhAC+mRizYcYAIzCF+AMTAAbPGKkyw84aWIhVDZq3Zde-AQAtihSROlycGzsAGhwebnkCEnIHDAxQSFhsVExknG1eY2o6Rw0XIlE0QRFzfysFaJU1J00oThMzIqNTUstrW3tqvI56lqLPb18LAKCQUPDIxRjMePBoOCQUrEWcMhBs+nVnDgBGfpK-NoqlBy3agCYmhtaRjtOalz3BLx9D25Cw3knK2ONkEBwiD0ZjoOCgADcTKJvkpqEVaAA+fAAdzsAGMPDhIcZRDhxLliqI3mBVHQkQBhbikPDcP4AOmM3GgZS6OGaZigAH14RSqTT6Yz5r0zOgCQNXuJwqTEThKdTacgGUzzq4IjgYONeJhlHE-gCgYQzOdQRCoch5BlaXCySj0Zjsbj8VshEThiSebK+QqlczLKz2WJuTa5fzFYKuNdRc6XkMpR6Q97BSqYBN1ZruNrdf9AcDkABmE0O82rUjrKgevCokAYrFmvFig5u6W8+UCplQFkEgNc+NettCyOs8Wx3jNz2tsPK1XyDWfDMYZRAA
The text was updated successfully, but these errors were encountered: