Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356384 - Add constructor to dictionary
Summary: Add constructor to dictionary
Status: CLOSED DUPLICATE of bug 357014
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-31 14:36 EDT by Matt Heitz CLA
Modified: 2017-02-23 14:19 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Heitz CLA 2011-08-31 14:36:32 EDT
Dictionary needs a constructor so you can pass in the caseSensitive and ordering values.  Presently they're annotations you can put on a field, like this:

dx dictionary{ caseSensitive = false, ordering = OrderingKind.byKey };

But if there's no field (you create the dictionary on the fly) there's no way to set caseSensitive and ordering:

processDictionary(
  // Invalid!
  new dictionary{ 
    caseSensitive = false, 
    ordering = OrderingKind.byKey, 
    key1 = value1 } );

We should have a constructor for dictionaries, as shown in this example:

processDictionary(
  new dictionary( false, OrderingKind.byKey ) { key1 = value1 } );
Comment 1 Matt Heitz CLA 2011-09-07 17:36:06 EDT

*** This bug has been marked as a duplicate of bug 357014 ***