PR#3802: detect polymorphic object and variant types in entry points

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7105 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2005-10-06 06:34:51 +00:00
parent 402dc832ec
commit 0f10b6d6ce
1 changed files with 6 additions and 1 deletions

View File

@ -1730,7 +1730,12 @@ static int is_polymorphic(char * s)
{
while (*s != 0) {
char c = *s++;
if (c == '\'') return 1;
if (c == '\'' || c == '#') return 1;
if (c == '[') {
c = *s;
while (c == ' ' || c == '\t' || c == '\r' || c == '\n') c = *++s;
if (c == '<' || c == '>') return 1;
}
if (In_bitmap(caml_ident_start, c)) {
while (In_bitmap(caml_ident_body, *s)) s++;
}