Closed eclipse-ocl-bot closed 1 month ago
By Tord Alenljung on Nov 15, 2006 05:42
The following does work
let a:Set(Integer)=Set{1,3,2} in a
which returns\ 2\ 1\ 3
By Christian Damus on Nov 15, 2006 09:34
Bug 164605 has been marked as a duplicate of this bug.
By Christian Damus on Jan 26, 2007 17:02
The inferred element type of empty collection literals is now OclVoid. This will result in the correct generalization of the element type to something more interesting when elements are "added" to it (note that "adding" actually creates new collections).
By Nick Boldt on Jan 28, 2008 16:36
Move to verified as per bug 206558.
By Ed Willink on May 27, 2011 02:40
Closing after over a year in verified state.
By Ed Willink on May 27, 2011 02:41
Closing after over a year in verified state.
| --- | --- | | Bugzilla Link | 164614 | | Status | CLOSED FIXED | | Importance | P1 major | | Reported | Nov 15, 2006 05:37 EDT | | Modified | May 27, 2011 02:41 EDT | | Version | 1.0.1 | | Reporter | Tord Alenljung |
Description
The inferred element type of an empty collection literal (e.g. Set{}) should be OclVoid and should thus conform to all other types. This is not the case unfortunately. The following should work, but it does not:
let a:Set(Integer)=Set{} in a
Error message: 'Init expression type does not conform to type of variable (a).'