You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5386 Reporter: sweeks Status: closed (set by @xavierleroy on 2013-08-31T10:44:01Z) Resolution: won't fix Priority: normal Severity: feature Version: 3.12.1 Category: ~DO NOT USE (was: OCaml general)
Bug description
Given the following module declaration:
module M = struct
type t = { foo : int }
let t = { foo = 13 }
end
The following expression is accepted:
let _ = M.(t.foo)
but the following is syntactically invalid:
let () = M.(t.foo) <- 13;
It would be nice if it were accepted.
The text was updated successfully, but these errors were encountered:
Are you concerned by putting the whole expression into scope?
I really think we need a warning for local open hiding local identifiers...
IIRC, Jun already has some code to do that, it would be a good idea
to include it.
OCaml has no notion of l-value expressions: "a.lbl <- b" is an AST node carrying "a" and "b" as subexpressions and "lbl" as node annotation. For this reason, a local open that would scope over "a" and "lbl" but not "b" simply doesn't fit the model and would need a special AST node + a special typing rule. It's not worth it, and I move to close this PR.
Original bug ID: 5386
Reporter: sweeks
Status: closed (set by @xavierleroy on 2013-08-31T10:44:01Z)
Resolution: won't fix
Priority: normal
Severity: feature
Version: 3.12.1
Category: ~DO NOT USE (was: OCaml general)
Bug description
Given the following module declaration:
module M = struct
type t = { foo : int }
let t = { foo = 13 }
end
The following expression is accepted:
let _ = M.(t.foo)
but the following is syntactically invalid:
let () = M.(t.foo) <- 13;
It would be nice if it were accepted.
The text was updated successfully, but these errors were encountered: