Signature does not compare @as tags of variant cases with payloads
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- compilers
調査の方向性
Start with rule 14 in compiler/ml/UntaggedVariants.md, linked from the issue, and compare its handling of nullary cases with payload cases. Then trace the compiler's interface inclusion checks for variant cases. Done means implementations that change payload case @as tags are rejected, matching the behavior for nullary cases.
索引モデルが issue の本文から書いたものです。
説明
A signature does not compare the @as tags of a variant's cases with payloads. An implementation that swaps the tags passes the signature, and its values match the wrong constructor through the signature.
module M: {
type t = A({x: int}) | C({x: int})
let a: t
} = {
type t = | @as("C") A({x: int}) | @as("A") C({x: int})
let a = A({x: 1})
}
Console.log(switch M.a { | M.A(_) => "A" | M.C(_) => "C" })
Output: C.
Expected: the implementation is rejected, because its cases' tags differ from the signature's, as they are for nullary cases.
Interface inclusion compares the literals of nullary cases only. The rule is compiler/ml/UntaggedVariants.md rule 14, in #8952.
- 主要言語
- OCaml
- スター
- 7.5k
- フォーク
- 483
- 平均マージ
- 21時間 8分
- マージ済み PR(30日)
- 183
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rescript-lang/rescript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rescript-lang/rescript#8996 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
rescript-lang/rescript#8997 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
rescript-lang/rescript#8995 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
rescript-lang/rescript#8994 ·
メンテナーはふだん 1 日以内に返信
-
Issues from differential semantic drift analysis (a7721303 to b123b7c3)対応中かも @cknitt が今日担当しました。 オープン
rescript-lang/rescript#8980 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
rescript-lang/rescript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
duplicate
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
numba/numba#10939 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Quantinuum/tket#2255 ·
メンテナーはふだん 1 日以内に返信
-
REPL and --show-tokens abort with "Token conversion not implemented yet" on .xor., byte and in outオープンbug low priority tokenizer
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信