cat() transtyping rules should be the same as [,] and [;] ones
@sgougeon)
Reported by Samuel GOUGEON (BUG DESCRIPTION:
----------------
Presently, cat() demands that all input arrays to concatenate must have exactly the same type:
Boolean, Double, etc.
It is very restrictive compared to [,] and [;] that for instance allow to concatenate some booleans with
some numbers: then booleans are automatically converted into numbers ; etc:
--> [[1 2 3], [%t %f %t]]
ans =
1. 2. 3. 1. 0. 1.
--> cat(3, [1 2 3], [%t %f %t])
at line 61 of function cat ( SCI\modules\elementary_functions\macros\cat.sci line 72 )
cat: Wrong type for input arguments: Same types expected.
--> [[1 2 3], int8([3 4 5])]
ans =
1. 2. 3. 3. 4. 5.
--> cat(3, [1 2 3], int8([3 4 5]))
at line 61 of function cat ( SCI\modules\elementary_functions\macros\cat.sci line 72 )
cat: Wrong type for input arguments: Same types expected.
cat() transtyping rules should match [,] and [;] ones.
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
cat(3, [1 2 3], int8([3 4 5]))
cat(3, [1 2 3], [%t %f %t])
// etc
OTHER INFORMATION:
------------------
Edited by Samuel GOUGEON