Allow any in new-style natives.
This commit is contained in:
parent
5d78a5ff93
commit
eaff5c9364
@ -5470,9 +5470,6 @@ static int declargs(symbol *sym, int chkshadow, const int *thistag)
|
|||||||
|
|
||||||
check_void_decl(&decl, TRUE);
|
check_void_decl(&decl, TRUE);
|
||||||
|
|
||||||
if (decl.is_new && (sym->usage & uNATIVE) && decl.type.tag == pc_anytag)
|
|
||||||
error(156);
|
|
||||||
|
|
||||||
if (decl.type.ident == iVARARGS) {
|
if (decl.type.ident == iVARARGS) {
|
||||||
assert(decl.type.numtags > 0);
|
assert(decl.type.numtags > 0);
|
||||||
if ((sym->usage & uPROTOTYPED)==0) {
|
if ((sym->usage & uPROTOTYPED)==0) {
|
||||||
|
@ -199,7 +199,7 @@ static const char *errmsg[] = {
|
|||||||
/*153*/ "cannot use non-public functions as callbacks\n",
|
/*153*/ "cannot use non-public functions as callbacks\n",
|
||||||
/*154*/ "cannot assign INVALID_FUNCTION to a non-function type\n",
|
/*154*/ "cannot assign INVALID_FUNCTION to a non-function type\n",
|
||||||
/*155*/ "expected newline, but found '%s'\n",
|
/*155*/ "expected newline, but found '%s'\n",
|
||||||
/*156*/ "the 'any' type is not allowed in new-style natives\n",
|
/*156*/ "unused156\n",
|
||||||
/*157*/ "'%s' is a reserved keyword\n",
|
/*157*/ "'%s' is a reserved keyword\n",
|
||||||
/*158*/ "multi-tags are no longer supported\n",
|
/*158*/ "multi-tags are no longer supported\n",
|
||||||
#else
|
#else
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
native Crab(any x);
|
|
||||||
|
|
||||||
public main()
|
|
||||||
{
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
(1) : error 156: the 'any' type is not allowed in new-style natives
|
|
Loading…
Reference in New Issue
Block a user