Mercurial > vim
comparison src/vim9execute.c @ 19842:e4ade28bfaf7 v8.2.0477
patch 8.2.0477: Vim9: error messages not tested
Commit: https://github.com/vim/vim/commit/c58164c5cff9845f3bf7cfcd75ace43208829388
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 29 18:40:30 2020 +0200
patch 8.2.0477: Vim9: error messages not tested
Problem: Vim9: error messages not tested.
Solution: Add more tests.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 29 Mar 2020 18:45:03 +0200 |
parents | aa4cbdb676cd |
children | 846fbbacce3a |
comparison
equal
deleted
inserted
replaced
19841:ff9fa9cc6e2e | 19842:e4ade28bfaf7 |
---|---|
1610 } | 1610 } |
1611 break; | 1611 break; |
1612 | 1612 |
1613 case ISN_NEGATENR: | 1613 case ISN_NEGATENR: |
1614 tv = STACK_TV_BOT(-1); | 1614 tv = STACK_TV_BOT(-1); |
1615 tv->vval.v_number = -tv->vval.v_number; | 1615 if (tv->v_type != VAR_NUMBER |
1616 #ifdef FEAT_FLOAT | |
1617 && tv->v_type != VAR_FLOAT | |
1618 #endif | |
1619 ) | |
1620 { | |
1621 emsg(_(e_number_exp)); | |
1622 goto failed; | |
1623 } | |
1624 #ifdef FEAT_FLOAT | |
1625 if (tv->v_type == VAR_FLOAT) | |
1626 tv->vval.v_float = -tv->vval.v_float; | |
1627 else | |
1628 #endif | |
1629 tv->vval.v_number = -tv->vval.v_number; | |
1616 break; | 1630 break; |
1617 | 1631 |
1618 case ISN_CHECKNR: | 1632 case ISN_CHECKNR: |
1619 { | 1633 { |
1620 int error = FALSE; | 1634 int error = FALSE; |