gFTL icon indicating copy to clipboard operation
gFTL copied to clipboard

map::of() should return reference to new object

Open tclune opened this issue 6 years ago • 1 comments

currently if the key is not found, a null pointer is returned, but the underlying set has grown.

Polymorphism gets interesting in this case.

tclune avatar Mar 09 '18 21:03 tclune

Polymorphism should return a new instance for the base class if it is not abstract. But if it is ... then of() should not have been used.

tclune avatar Mar 09 '18 22:03 tclune