comparison src/eval.c @ 24812:8fdf839af1f4 v8.2.2944

patch 8.2.2944: Vim9: no error when using job or channel as a string Commit: https://github.com/vim/vim/commit/1328bde9d406aa1292e92673fa8a026889424e79 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 5 20:51:38 2021 +0200 patch 8.2.2944: Vim9: no error when using job or channel as a string Problem: Vim9: no error when using job or channel as a string. Solution: Be more strict about conversion to string. (closes https://github.com/vim/vim/issues/8312)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Jun 2021 21:00:03 +0200
parents 7bc92a651472
children fcab26a7fd4d
comparison
equal deleted inserted replaced
24811:e89d42919a21 24812:8fdf839af1f4
5058 break; 5058 break;
5059 5059
5060 case VAR_JOB: 5060 case VAR_JOB:
5061 case VAR_CHANNEL: 5061 case VAR_CHANNEL:
5062 *tofree = NULL; 5062 *tofree = NULL;
5063 r = tv_get_string_buf(tv, numbuf); 5063 r = tv->v_type == VAR_JOB ? job_to_string_buf(tv, numbuf)
5064 : channel_to_string_buf(tv, numbuf);
5064 if (composite_val) 5065 if (composite_val)
5065 { 5066 {
5066 *tofree = string_quote(r, FALSE); 5067 *tofree = string_quote(r, FALSE);
5067 r = *tofree; 5068 r = *tofree;
5068 } 5069 }