author | Sebastian Harl <sh@tokkee.org> | |
Fri, 1 Aug 2014 06:59:50 +0000 (08:59 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 1 Aug 2014 06:59:50 +0000 (08:59 +0200) | ||
commit | 432bf5c5ed16fcd5a1b6a305cfe93715384a8bcf | |
tree | eb445c702f50b3c981e501c95efb40d78e4d61fa | tree | snapshot |
parent | 57ec5be33f0a1ac234dc1d1852e8e5e79253e726 | commit | diff |
data: Support some arithmetic expressions on mismatching types.
The following cases are now supported:
- <integer> or <decimal> <mul> <datetime>
- <datetime> <mul> or <div> or <mod> <integer> or <decimal>
Think of <datetime> having a time unit like seconds. It's perfectly fine to
multiply with or divide seconds by a number. However, since we don't have any
type having the unit Hertz, we cannot support numbers divided by <datetime>.
The following cases are now supported:
- <integer> or <decimal> <mul> <datetime>
- <datetime> <mul> or <div> or <mod> <integer> or <decimal>
Think of <datetime> having a time unit like seconds. It's perfectly fine to
multiply with or divide seconds by a number. However, since we don't have any
type having the unit Hertz, we cannot support numbers divided by <datetime>.
src/core/data.c | diff | blob | history | |
src/include/core/data.h | diff | blob | history | |
t/unit/core/data_test.c | diff | blob | history |