Original bug ID: 7097
Reporter: furuse
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2017-09-24T15:31:42Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 4.02.3
Fixed in version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Child of: #5068
Monitored by: @hcarty
Bug description
The following illegal code has a typical mistake of having parametered type in a constraint of a packaged module type:
let insert_twice (type u) (module M : S with type 'a t = 'a u) a at =
M.insert a (M.insert a at)
The error message of the parser is very cryptic:
Error: Syntax error: module-expr expected.
The syntaxes of the normal signature and packed signatures are very similar but different, therefore we should have better message to inform that you cannot have parameters there.