ballerina-platform / ballerina-spec

Ballerina Language and Platform Specifications
Other
167 stars 53 forks source link

When are two function signatures the same? #1234

Open MaryamZi opened 1 year ago

MaryamZi commented 1 year ago

Description: Creating this issue based on a discussion related to https://github.com/ballerina-platform/ballerina-spec/issues/1230.

The spec says for object type inclusion

It is an error if an object-type-descriptor has two or more object-type-inclusions that include method-decls with the same name but different function-signatures, unless those method-decls are overridden by a method-decl in the including object-type-descriptor.

What does same/different signature mean with default values, named arguments (and therefore parameter names), etc.?