view src/typemap @ 22347:712bc35842aa v8.2.1722

patch 8.2.1722: Vim9: cannot assign a lambda to a variable of type function Commit: https://github.com/vim/vim/commit/dbd759309b4b6abea96b18d61770e100cf4264b5 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 21 21:48:21 2020 +0200 patch 8.2.1722: Vim9: cannot assign a lambda to a variable of type function Problem: Vim9: cannot assign a lambda to a variable of type function. Solution: Allow for assigning a partial to a variable of type function. (Naruhiko Nishino, closes #6996)
author Bram Moolenaar <Bram@vim.org>
date Mon, 21 Sep 2020 22:00: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}\")