Skip to content

Commit

Permalink
fix: Accessor with a set signature was converted incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Nov 28, 2020
1 parent 5de3bf5 commit 1200212
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/converter/symbols.ts
Expand Up @@ -819,7 +819,7 @@ function convertAccessor(
setDeclaration
);
if (signature) {
reflection.getSignature = createSignature(
reflection.setSignature = createSignature(
rc,
ReflectionKind.SetSignature,
signature,
Expand Down
15 changes: 14 additions & 1 deletion src/test/converter/class/specs-with-lump-categories.json
Expand Up @@ -3072,6 +3072,19 @@
"kindString": "Accessor",
"flags": {},
"getSignature": [
{
"id": 187,
"name": "name",
"kind": 524288,
"kindString": "Get signature",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"setSignature": [
{
"id": 188,
"name": "name",
Expand Down Expand Up @@ -3124,7 +3137,7 @@
"kind": 262144,
"kindString": "Accessor",
"flags": {},
"getSignature": [
"setSignature": [
{
"id": 193,
"name": "writeOnlyName",
Expand Down
15 changes: 14 additions & 1 deletion src/test/converter/class/specs.json
Expand Up @@ -3068,6 +3068,19 @@
"kindString": "Accessor",
"flags": {},
"getSignature": [
{
"id": 187,
"name": "name",
"kind": 524288,
"kindString": "Get signature",
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"setSignature": [
{
"id": 188,
"name": "name",
Expand Down Expand Up @@ -3120,7 +3133,7 @@
"kind": 262144,
"kindString": "Accessor",
"flags": {},
"getSignature": [
"setSignature": [
{
"id": 193,
"name": "writeOnlyName",
Expand Down

0 comments on commit 1200212

Please sign in to comment.