Skip to content

Unable to rename accessors #8415

Closed
Closed

Description

@falsandtru

TypeScript Version:

1.8.30

Code

var o: { a: void; } = {
    get a() {
        return;
    },
    set a(p) {
    }
};

Expected behavior:

var o: { b: void; } = {
    get b() {
        return;
    },
    set b(p) {
    }
};

Actual behavior:

var o: { b: void; } = {
    get a() {
        return;
    },
    set a(p) {
    }
};

Activity

  1. basarat commented on May 2, 2016

    @basarat
    Contributor

    Same with member functions:

    var o: {
        foo: () => void , // rename `foo` will fail to rename the one below
        bar: number // rename `bar` will work fine
    } = {
        foo() {
            return;
        },
        bar: 123
    };
  2. falsandtru commented on May 2, 2016

    @falsandtru
    ContributorAuthor

    Basarat Ali Syed (@basarat) nice catch! I think it would be better to file a new issue.

  3. mhegazy commented on May 2, 2016

    @mhegazy
    Contributor

    The issues reported in the OP has been fixed in master. the one reported by Basarat Ali Syed (@basarat) is not though.

  4. added a commit that references this issue on May 4, 2016
    13aff17
  5. added
    Fixed
    on May 4, 2016
  6. added a commit that references this issue on May 10, 2016
    0120d7b
  7. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugFixed

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions