Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Proposal: make instatiation of a private record/variant raise a warning instead of an error

Aperta
#8,458 2 commenti 2 reazioni 1 assegnatario Vedi su GitHub

@tsnobip ci sta già lavorando.

Dal 31/5/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

need feedback

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)

Lingua principale
OCaml
Stelle
7.5k
Fork
485
Merge medio
1g 2h
PR unite (30g)
55

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rescript-lang/rescript

Tutte le issue di rescript-lang/rescript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.