Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

strict mode error when implementing interface method overloads #421

@nippur72

Description

@nippur72

I'm trying to implement IPromise:

public class FakePromise : IPromise
{
    public void Then(Delegate fulfilledHandler)
    {
    }

    public void Then(Delegate fulfilledHandler, Delegate errorHandler)
    {
    }

    public void Then(Delegate fulfilledHandler, Delegate errorHandler, Delegate progressHandler)
    {
    }
}

but I get a browser error: unallowed multiple properties definition in strict mode

I think it's because it gets transpiled to:

ss.initClass($FakePromise, $asm, {
        then: function(fulfilledHandler) {
        },
        then: function(fulfilledHandler, errorHandler) {
        },
        then: function(fulfilledHandler, errorHandler, progressHandler) {
        }
    });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions