[bug] @as can create type problems
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- ocaml
- 領域
- compilers
調査の方向性
まず、issue 内の inline exception-record reproduction を実行し、@as("Error") が捕捉された値にどのような影響を与えるかを確認します。次に、inline exception records に対するコンパイラーの @as の処理を追跡します。issue では、望ましい結果が警告、禁止、または異なるランタイム動作のいずれであるかを定義していないため、実装前に期待される結果を明確にする必要があります。
索引モデルが issue の本文から書いたものです。
説明
this is a really stupid example that would likely never happen in real-life (but hey, you give a million monkeys infinite amount of time with keyboards...). if it DOES happen, it'll cost some developer x amount of hours to debug. it's kinda far out there, but not as far as @as("RE_EXN_ID)"...
right now i'm just having fun trying to break things to find bugs and i stumbled upon this.
exception Foo({@as("Error") e: string})
let s: string = try throw(Foo({e: "foo"})) catch {
| Foo({e}) => e
}
Console.log(s == "foo")
Console.log(s)
as you can imagine, this logs false and then an error object. i'm not sure what the takeaway is here.. possibly:
a) call me an idiot and close this
b) come up with some way to prohibit use of or warn on using @as("Error") for inlined exception records (yeah, kinda niche...)
- 主要言語
- OCaml
- スター
- 7.5k
- フォーク
- 485
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 55
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rescript-lang/rescript のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
rescript-lang/rescript#8659 · コメント 2 件 · リアクション 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
rescript-lang/rescript#8647 ·
-
rescript-lang/rescript#8632 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
rescript-lang/rescript#8624 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
rescript-lang/rescript#8596 · コメント 2 件 ·
rescript-lang/rescript の issue をすべて見る
似ている issue
-
mlir
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
llvm/llvm-project#224908 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
area-CodeGen-coreclr untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
secondlife/sl-vscode-plugin#147 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
objectionary/phie#149 ·