diff options
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 2a8b1c52ee..699f43bace 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6747,7 +6747,10 @@ handle_subscript( // the next line then consume the line break. p = eval_next_non_blank(*arg, evalarg, &getnext); if (getnext - && ((rettv->v_type == VAR_DICT && *p == '.' && eval_isdictc(p[1])) + && ((*p == '.' + && ((rettv->v_type == VAR_DICT && eval_isdictc(p[1])) + || rettv->v_type == VAR_CLASS + || rettv->v_type == VAR_OBJECT)) || (p[0] == '-' && p[1] == '>' && (p[2] == '{' || ASCII_ISALPHA(in_vim9script() ? *skipwhite(p + 2) : p[2]))))) |