compiler-hacking icon indicating copy to clipboard operation
compiler-hacking copied to clipboard

Local module forms in class declarations

Open dsheets opened this issue 11 years ago • 1 comments

class my_class =
  let open My_module in
  let x = my_fun my_val in
object
  method x = x
end

is a syntax error.

class my_class =
  let module M = My_module in
  let x = M.my_fun M.my_val in
object
  method x = x
end

is also a syntax error.

dsheets avatar Mar 21 '14 12:03 dsheets

There's some discussion of this under Mantis 6271.

yallop avatar Mar 21 '14 12:03 yallop