xtclang / xvm

Ecstasy and XVM
Other
195 stars 15 forks source link

Add default args for Map.toString() API #194

Closed ggleyzer closed 3 months ago

ggleyzer commented 3 months ago

About six month ago we expanded Collection.toString() API to simplify the use of all the extra arguments on appendTo() method.

It seems very natural to do the same for the Map.toString().

As a minor wrinkle, while doing that change, I discovered two issues:

  1. An assertion in TypeConstant.layerOnMethods() that should've been an error.
  2. An incorrect order of "re-base", "extends" and "into" contributions. Since the actual processing happens in reverse order (the last added contribution is processed first), the addition order should be "into", "extends" and "re-base" )so "re-base" would be processed first.)