alias and UFCS

ixid via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 24 15:18:06 PST 2017


On Tuesday, 24 January 2017 at 20:51:49 UTC, Stefan Koch wrote:
> On Tuesday, 24 January 2017 at 16:41:12 UTC, ixid wrote:
>> On Tuesday, 24 January 2017 at 16:27:50 UTC, ixid wrote:
>>> On Tuesday, 24 January 2017 at 15:57:48 UTC, Las wrote:
>>>> On Tuesday, 24 January 2017 at 13:11:41 UTC, ixid wrote:
>>>>> [...]
>>>>
>>>> Submit a bug report then.
>>>
>>> I will if it turns out the behaviour is wrong, that's what 
>>> I'm checking at this stage. =)
>>
>> Apologies for the extra post - does the alias function count 
>> as declared in the same scope as the content of the function? 
>> That would be plausible as UFCS refuses to work on functions 
>> declared in the same scope. Is this something that could be 
>> changed?
>
> UFCS is only applied if the function if defined at module scope.
>
> This to to prevent the meaning of a ufcs function from changing.

Does alias of an existing function count as a new function 
definition in that case?


More information about the Digitalmars-d-learn mailing list