fuzion icon indicating copy to clipboard operation
fuzion copied to clipboard

Ignore `THIS#TYPE` for duplicate feature error for type features, rename `String.concat1` as `String.concat`

Open fridis opened this issue 1 year ago • 1 comments

#2792 renamed one String.type.concat as String.type.concat1 to avoid an error due to duplicate features since we would have three versions of the corresponding type features

concat(THIS#TYPE type)
concat(THIS#TYPE type, sep String sep)
concat(THIS#TYPE type, a,b String)

which cause duplicate feature errors since the type parameter THIS#TYPE is optional. However, since the type parameter is implicit anyway and type feature constructors are never called, this error could be suppressed and concat1 could be concat.

fridis avatar Apr 09 '24 13:04 fridis

also the reason why discard_all can not be named discard in io.buffered currently.

see:

# NYI naming this feature discard leads to error: Duplicate feature declaration
  public discard_all

michaellilltokiwa avatar Apr 15 '24 08:04 michaellilltokiwa