From: SourceForge.net <no...@so...> - 2012-01-24 16:13:42
|
Bugs item #3478923, was opened at 2012-01-24 08:11 Message generated for change (Settings changed) made by rmday1 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3478923&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: r Group: None >Status: Deleted Resolution: None Priority: 5 Private: No Submitted By: Robert Day (rmday1) Assigned to: Joseph Wang (drjoe) Summary: overload dispatch is broken for "$" operator Initial Comment: For a simple class like Base (in the attached Base.h), the following R calls are fine: > b <- Base() > Base_method(b) [1] 42 > Base_overloaded_method(b) [1] 42 > Base_overloaded_method(b, 43) NULL > Base_overloaded_method(b) [1] 43 > b$method() [1] 43 But these are broken: > b$overloaded_method() Error in mapply(class, list(...)) : '...' used in an incorrect context 3: b$overloaded_method() 2: mapply(class, list(...)) 1: function () { traceback(tail(sapply(sys.calls(), deparse), 100)) if (!interactive()) q(save = "no", status = 1) }() > b$overloaded_method(42) Error in b$overloaded_method(42) : could not find function "f" 2: b$overloaded_method(42) 1: function () { traceback(tail(sapply(sys.calls(), deparse), 100)) if (!interactive()) q(save = "no", status = 1) }() > R --version R version 2.14.0 (2011-10-31) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) > swig -version SWIG Version 2.0.4 Compiled with g++ [i686-pc-linux-gnu] Configured options: +pcre ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3478923&group_id=1645 |