broken codegen when using floating-point types as type parameters
void main() {
var x = new Gee.ArrayList<float> ();
x.add(3.5f);
var y = new Gee.ArrayList<double> ();
y.add(3.5);
}
% valac --pkg gee-0.8 gee.vala
/home/pferro/gee.vala.c: In function ‘_vala_main’:
/home/pferro/gee.vala.c:23:59: error: incompatible type for argument 2 of ‘gee_abstract_collection_add’
23 | gee_abstract_collection_add ((GeeAbstractCollection*) x, 3.5f);
| ^~~~
| |
| float
In file included from /home/pferro/gee.vala.c:4:
/usr/include/gee-0.8/gee.h:1476:53: note: expected ‘gconstpointer’ {aka ‘const void *’} but argument is of type ‘float’
1476 | gconstpointer item);
| ~~~~~~~~~~~~~~^~~~
/home/pferro/gee.vala.c:26:59: error: incompatible type for argument 2 of ‘gee_abstract_collection_add’
26 | gee_abstract_collection_add ((GeeAbstractCollection*) y, 3.5);
| ^~~
| |
| double
In file included from /home/pferro/gee.vala.c:4:
/usr/include/gee-0.8/gee.h:1476:53: note: expected ‘gconstpointer’ {aka ‘const void *’} but argument is of type ‘double’
1476 | gconstpointer item);
| ~~~~~~~~~~~~~~^~~~
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)