Skip to content

Instantly share code, notes, and snippets.

@mattn
Created May 1, 2013 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/5495114 to your computer and use it in GitHub Desktop.
Save mattn/5495114 to your computer and use it in GitHub Desktop.
diff -r ef341d8811b2 src/eval.c
--- a/src/eval.c Mon Apr 15 22:22:58 2013 +0200
+++ b/src/eval.c Wed May 01 21:49:39 2013 +0900
@@ -5282,17 +5282,22 @@
char_u *s;
char_u *key = NULL;
- if (rettv->v_type == VAR_FUNC
-#ifdef FEAT_FLOAT
- || rettv->v_type == VAR_FLOAT
-#endif
- )
+ if (rettv->v_type == VAR_FUNC)
{
if (verbose)
EMSG(_("E695: Cannot index a Funcref"));
return FAIL;
}
+#ifdef FEAT_FLOAT
+ if (rettv->v_type == VAR_FLOAT)
+ {
+ if (verbose)
+ EMSG(_("E806: using Float as a String"));
+ return FAIL;
+ }
+#endif
+
if (**arg == '.')
{
/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment