| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add test for error reporting
Pacify hygine
class_type specific abbrev error report
Update test
Reflect review
Better error message for bad parameters of class type
Revert "class_type specific abbrev error report"
This reverts commit b8cd3dda44289af0b1766c1ce0d4f895363db132.
Fix class type ident for Abbrev_type_clash
Add test for Abbrev_type_clash
Reflect review: Better error messaging
Reflect review: better error message for Bad_parameters
|
| |
|
|
|
|
|
|
| |
Keep the csig_self_row field up-to-date as we add new methods. This
seems more correct and should be slightly more efficient in the
common case.
|
|
|
|
|
|
|
|
|
| |
Now that private methods are stored in the method table there is
no need to distinguish `private_self`, `public_self` and `self_type`
in `Typeclass.class_structure`. This required extending
`Ctype.filter_method` to handle the case of filtering a private method
from a closed object type -- which brings the function into line with
the equivalent call to `Ctype.unify`.
|
|
|
|
|
|
|
| |
Previously, the check that a non-virtual class did not
have virtual methods was delayed until the last stage of
type-checking the class. Now we do those checks more eagerly
allowing for clearer errors, especially in common cases.
|
|
|
|
|
|
|
|
|
|
| |
Previously, class types represented their methods via the csig_self
field. This was a type_expr that was restricted to be syntactically
a Tobject node. With this patch the methods are represented directly
with a methods table. csig_self is no longer restricted to be
a Tobject node and is no longer required to contain the private methods.
We also add a csig_self_row field to hold the row variable of the class
type -- which means we can avoid going through csig_self to find it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now produce more detailed error messages during various kinds of
module inclusion, taking advantage of the new structured error trace
generation from #10170. Previously, these errors were "shallow",
ending as soon as there was an incompatibility; this patch makes them
"deep", reporting the *reasons* for those problems. For example,
consider the following module:
module M : sig
val x : bool * int
end = struct
let x = false , "not an int"
end
This now produces the following error:
Error: Signature mismatch:
Modules do not match:
sig val x : bool * string end
is not included in
sig val x : bool * int end
Values do not match:
val x : bool * string
is not included in
val x : bool * int
The type bool * string is not compatible with the type bool * int
Type string is not compatible with type int
The last two lines are new in this patch. Previously, the error
message stopped two lines earlier, omitting the key detail that the
reason there is an error is specifically that `string` is not equal to
`int`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit refactors the types that make up type-checking errors to
maintain more structural information. Most significantly, we split
out the errors we get from unification, moregen, and type equality in
`Ctype` into three distinct exceptions, and retain the sorts of
information we keep during unification in the other two cases as well
(no more `Unify []`). We also maintain more information in
`Includecore` about mismatches of primitives, manifests, and private
objects and variants
This commit doesn't make a lot of changes to the user-visible error
messages yet, only what's necessary to support the type changes, but
it enables a forthcoming patch where we use this improvement to
produce more informative error messages.
This commit includes existing work by Mekhrubon Tuarev, who did all
the early development. I (Antal Spector-Zabusky) came and built the
layer of types on top.
|
|
|
|
| |
applicative module paths in signatures
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Remains to be done: remove all headers in testsuite/tests.
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
| |
tools send located errors to be reported by the compiler (patch by Peter Zotov).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14756 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14155 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|\
| |
| |
| | |
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| |
| |
| | |
in the same object.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13756 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|/
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Also fix a bit unification and subtyping errors.
You now need the flag -short-path to activate short paths.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths-4.01@13285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| | |
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12869 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| | |
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12065 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
| |
| |
| |
| | |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|/
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10421 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10250 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7372 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5989 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5977 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5602 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5163 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3978 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2908 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2074 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2072 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1997 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
|
| |
contraints. Par exemple :
type 'a t = 'b * 'c constraint 'a = 'b -> 'c
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
| |
de passer de virtual a method sans avoir a preciser le type).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1110 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
| |
Sauver l'environnement de typage en plus du type dans les a.s.t. de Typedtree.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1008 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@840 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
|
| |
abbreviations).
Typeclass: correction d'un bug de typage.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@828 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@756 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|