Untagged variant puts one typed array in another typed array's case
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- compilers
調査の方向性
Start with rule 5 in compiler/ml/UntaggedVariants.md and review the linked context in #8952 and #8950, which changes how the types are recognized. Reproduce the example with the two typed arrays and trace how their type names are used for run-time case checks. Done means the invalid overlap is rejected or the mismatched value becomes a type error.
索引モデルが issue の本文から書いたものです。
説明
An untagged variant with cases for two typed arrays accepts a value of one typed array in the case of the other, and the value then matches the other case.
@unboxed type ta = I8(Int8Array.t) | U8(Uint8Array.t)
let f = v => switch v { | I8(_) => "i8" | U8(_) => "u8" }
Console.log(f(I8(Uint8Array.fromArray([1]))))
Output: u8.
The typed-array types are abbreviations of one type, so I8(Uint8Array…) type-checks. The cases are classified by the type name as written, so the run-time check is instanceof Uint8Array.
Expected: either the cases are distinct types, so that I8(Uint8Array…) is a type error, or the variant is rejected because two cases share one type.
The rule is compiler/ml/UntaggedVariants.md rule 5, in #8952. #8950 changes how these types are recognized.
- 主要言語
- 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 日以内に返信