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: 1880 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Mikhail Zabelin
Version: OCaml 3.07 native Win32 port (MinGW)
OS: Windows 2000
Submission from: www-proxy.ioffe.rssi.ru (194.85.224.35)
source file f.ml:
module M =
struct
type x = {y: int}
let z = {y = 1}
end
let a = M.z.M.y (unexpected too)
let b = M.z.y
compile:
ocamlc f.ml
File "f.ml", line 8, characters 8-13:
Unbound record field label y
The text was updated successfully, but these errors were encountered:
module M =
struct
type x = {y: int}
let z = {y = 1}
end
let a = M.z.M.y (unexpected too)
let b = M.z.y
compile:
ocamlc f.ml
File "f.ml", line 8, characters 8-13:
Unbound record field label y
This is normal behavior: record label names are qualified by module
names like any other kind of names in the language. Thus, unless
you're in the scope of "open M", the label of type M.x is named M.y,
and projecting it out of an expression e is written "e.M.y".
I agree this isn't terribly pretty, but it's consistent with the rest
of the design.
Original bug ID: 1880
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Mikhail Zabelin
Version: OCaml 3.07 native Win32 port (MinGW)
OS: Windows 2000
Submission from: www-proxy.ioffe.rssi.ru (194.85.224.35)
source file f.ml:
module M =
struct
type x = {y: int}
let z = {y = 1}
end
let a = M.z.M.y (unexpected too)
let b = M.z.y
compile:
The text was updated successfully, but these errors were encountered: