view src/typemap @ 24462:7c4f50c02e18 v8.2.2771

patch 8.2.2771: Vim9: assignment not recognized if declaration was skipped Commit: https://github.com/vim/vim/commit/aa1959bd5e82350bb4a82d9a5188c29d70706ec4 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 15 22:13:39 2021 +0200 patch 8.2.2771: Vim9: assignment not recognized if declaration was skipped Problem: Vim9: assignment not recognized if declaration was skipped. Solution: Also recognized an assignment if the variable does not exist. (closes #8108)
author Bram Moolenaar <Bram@vim.org>
date Thu, 15 Apr 2021 22:15:03 +0200
parents dec4338a7da2
children
line wrap: on
line source

TYPEMAP
VIWIN	T_VIOBJNOMUNGE
VIBUF	T_VIOBJNOMUNGE

INPUT
T_VIOBJNOMUNGE
	if (sv_isa($arg, \"${ntype}\")) {
	    IV tmp = SvIV((SV*)SvRV($arg));
	    $var = INT2PTR($type, tmp);
	    if (!tmp)
		croak(\"$ntype no longer exists\");
	}
	else
	    croak(\"$var is not of type ${ntype}\")