-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What should the method call context look like? #132
Comments
I did not try the current implementation, so can honestly voice my expectation (in the sense of "desirability"):
the above
Should return the 'evaluation frame' of the generic.. (and I have no clue what that would be)
indeed should raise an error with message "!". I would not care so much about the |
I agree that it makes sense for the method to be called by the generic and for everything to be consistent with that. This is only possible though if we eliminate the next method case, most simply by passing an up-casted object to the generic. |
The traceback currently looks like this: 5: stop("!") at #1
4: (structure(function (x)
stop("!"), class = c("R7_method", "function", "R7_object"), object_class = structure(function (generic,
signature, fun)
{
if (is.character(signature)) {
signature <- list(signature)
}
new_object(generic = generic, signature = signature, .data = fun)
}, name = "R7_method", parent = structure(function (.data)
new_object(.data), name = "function", parent = structure(function ()
{
out <- .Call(R7_object_)
class(out) <- "R7_object"
out
}, name = "R7_object", properties = list(), constructor = function ()
{
out <- .Call(R7_object_)
class(out) <- "R7_object"
out
}, validator = function (x)
...
3: .Call(method_call_, sys.call(-1), sys.function(-1), sys.frame(-1)) at dispatch.R#10
2: method_call()
1: f("x") I think we need to at least make it: 5: stop("!") at #1
4: method(f, "character")(x)
3: .Call(method_call_, sys.call(-1), sys.function(-1), sys.frame(-1)) at dispatch.R#10
2: method_call()
1: f("x") I'm not sure if we want to somehow elide the 3: stop("!") at #1
2: method(f, "character")(x)
1: f("x") In either case, @ltierney will need to give me some pointers as to how to achieve this. |
The traceback is now the rather unwieldy:
|
e.g. what do you expect the results of the following to be?
The text was updated successfully, but these errors were encountered: