Proposal: make instatiation of a private record/variant raise a warning instead of an error
@tsnobip がすでに取り組んでいます。
2026年5月31日 から。
評価
この issue はまだ評価されていません。
説明
Today, when you try to create a private record or variant, it errors:
module Foo = {
type t = private {foo: int}
}
let bar = {Foo.foo: 9} // Error: Cannot create values of the private type Foo.t
Though, there are cases where you'd want to force the instantiation for example for testing, moving this from an error to a warning would allow this. We could use the same warning when casting to a private record/variant (cf #8457)
- 主要言語
- 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 件 ·