Skip to content

Commit da6f45e

Browse files
committed
fix: manually add language class
1 parent c889a36 commit da6f45e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

R/qenv-eval_code.R

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,10 @@ setMethod("eval_code", signature = c("qenv", "expression"), function(object, cod
9999
eval_code(object, code = paste(attr(code, "wholeSrcref"), collapse = "\n"))
100100
} else {
101101
Reduce(function(u, v) {
102-
f <- if (inherits(v, "=")) {
103-
# Force method to be called
104-
getMethod("eval_code", signature = c("qenv", "language"))@.Data
105-
} else {
106-
eval_code
102+
if (inherits(v, "=") && identical(typeof(v), "language")) {
103+
class(v) <- unique(c("language", class(v)))
107104
}
108-
f(u, v)
105+
eval_code(u, v)
109106
}, init = object, x = code)
110107
}
111108
})

0 commit comments

Comments
 (0)