The R Project SVN R

Rev

Rev 33412 | Rev 36174 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33412 Rev 33692
Line 454... Line 454...
454
	if (cptr->callflag & CTXT_FUNCTION && cptr->cloenv == sysp)
454
	if (cptr->callflag & CTXT_FUNCTION && cptr->cloenv == sysp)
455
	    break;
455
	    break;
456
	cptr = cptr->nextcontext;
456
	cptr = cptr->nextcontext;
457
    }
457
    }
458
    if (cptr == NULL)
458
    if (cptr == NULL)
459
	error(_("NextMethod called from outside a function"));
459
	error(_("'NextMethod' called from outside a function"));
460
 
460
 
461
    PROTECT(newcall = duplicate(cptr->call));
461
    PROTECT(newcall = duplicate(cptr->call));
462
 
462
 
463
    /* eg get("print.ts")(1) */
463
    /* eg get("print.ts")(1) */
464
    if (TYPEOF(CAR(cptr->call)) == LANGSXP)
464
    if (TYPEOF(CAR(cptr->call)) == LANGSXP)
465
       error(_("NextMethod called from an anonymous function"));
465
       error(_("'NextMethod' called from an anonymous function"));
466
 
466
 
467
    /* Find dispatching environments. Promises shouldn't occur, but
467
    /* Find dispatching environments. Promises shouldn't occur, but
468
       check to be on the safe side.  If the variables are not in the
468
       check to be on the safe side.  If the variables are not in the
469
       environment (the method was called outside a method dispatch)
469
       environment (the method was called outside a method dispatch)
470
       then chose reasonable defaults. */
470
       then chose reasonable defaults. */