Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#97 FlexList and FlexMap (& FlexSet?) type problems

open
local elib (53)
3
2005-06-01
2005-06-01
Steve Jenson
No

A6
http://www.eros-os.org/pipermail/e-lang/2004-November/010128.html
Kevin Reid writes

Simple example:

? [].diverge(float64).__optUncall()
# value: [[], "diverge", []]

I expected the value to be instead [[], "diverge",
[float64]].

Demonstration of how this would affect a persistent
application:

? def flexList1 := [1, 2.0, 3].diverge(float64)
# value: [1.0, 2.0, 3.0].diverge()

? flexList1.push(4)
? flexList1
# value: [1.0, 2.0, 3.0, 4.0].diverge()

? def flexList2 := E.call(E, "call",
flexList1.__optUncall())
# value: [1.0, 2.0, 3.0, 4.0].diverge()

? flexList2.push(5)
? flexList2
# value: [1.0, 2.0, 3.0, 4.0, 5].diverge()

FlexMap has the same bug:

? ["a" => "b"].diverge(String, String).__optUncall()
# value: [["a" => "b"], "diverge", []]

- and some others:

? [1 => 2].diverge(int, int).__optUncall()
# problem: <ArrayStoreException>

? [1.0 => 2.0].diverge(float64, float64).__optUncall()
# problem: <ClassCastException: [D>

Discussion