• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "ClassDeclaration",
6      "definition": {
7        "id": {
8          "type": "Identifier",
9          "name": "A",
10          "decorators": [],
11          "loc": {
12            "start": {
13              "line": 16,
14              "column": 7,
15              "program": "generics_instantiation_3.ets"
16            },
17            "end": {
18              "line": 16,
19              "column": 8,
20              "program": "generics_instantiation_3.ets"
21            }
22          }
23        },
24        "typeParameters": {
25          "type": "TSTypeParameterDeclaration",
26          "params": [
27            {
28              "type": "TSTypeParameter",
29              "name": {
30                "type": "Identifier",
31                "name": "T",
32                "decorators": [],
33                "loc": {
34                  "start": {
35                    "line": 16,
36                    "column": 9,
37                    "program": "generics_instantiation_3.ets"
38                  },
39                  "end": {
40                    "line": 16,
41                    "column": 10,
42                    "program": "generics_instantiation_3.ets"
43                  }
44                }
45              },
46              "constraint": {
47                "type": "ETSTypeReference",
48                "part": {
49                  "type": "ETSTypeReferencePart",
50                  "name": {
51                    "type": "Identifier",
52                    "name": "Object",
53                    "decorators": [],
54                    "loc": {
55                      "start": {
56                        "line": 16,
57                        "column": 19,
58                        "program": "generics_instantiation_3.ets"
59                      },
60                      "end": {
61                        "line": 16,
62                        "column": 25,
63                        "program": "generics_instantiation_3.ets"
64                      }
65                    }
66                  },
67                  "loc": {
68                    "start": {
69                      "line": 16,
70                      "column": 19,
71                      "program": "generics_instantiation_3.ets"
72                    },
73                    "end": {
74                      "line": 16,
75                      "column": 26,
76                      "program": "generics_instantiation_3.ets"
77                    }
78                  }
79                },
80                "loc": {
81                  "start": {
82                    "line": 16,
83                    "column": 19,
84                    "program": "generics_instantiation_3.ets"
85                  },
86                  "end": {
87                    "line": 16,
88                    "column": 26,
89                    "program": "generics_instantiation_3.ets"
90                  }
91                }
92              },
93              "loc": {
94                "start": {
95                  "line": 16,
96                  "column": 9,
97                  "program": "generics_instantiation_3.ets"
98                },
99                "end": {
100                  "line": 16,
101                  "column": 26,
102                  "program": "generics_instantiation_3.ets"
103                }
104              }
105            }
106          ],
107          "loc": {
108            "start": {
109              "line": 16,
110              "column": 8,
111              "program": "generics_instantiation_3.ets"
112            },
113            "end": {
114              "line": 16,
115              "column": 26,
116              "program": "generics_instantiation_3.ets"
117            }
118          }
119        },
120        "superClass": null,
121        "implements": [],
122        "body": [
123          {
124            "type": "MethodDefinition",
125            "key": {
126              "type": "Identifier",
127              "name": "foo",
128              "decorators": [],
129              "loc": {
130                "start": {
131                  "line": 17,
132                  "column": 12,
133                  "program": "generics_instantiation_3.ets"
134                },
135                "end": {
136                  "line": 17,
137                  "column": 15,
138                  "program": "generics_instantiation_3.ets"
139                }
140              }
141            },
142            "kind": "method",
143            "accessibility": "public",
144            "static": false,
145            "optional": false,
146            "computed": false,
147            "value": {
148              "type": "FunctionExpression",
149              "function": {
150                "type": "ScriptFunction",
151                "id": {
152                  "type": "Identifier",
153                  "name": "foo",
154                  "decorators": [],
155                  "loc": {
156                    "start": {
157                      "line": 17,
158                      "column": 12,
159                      "program": "generics_instantiation_3.ets"
160                    },
161                    "end": {
162                      "line": 17,
163                      "column": 15,
164                      "program": "generics_instantiation_3.ets"
165                    }
166                  }
167                },
168                "generator": false,
169                "async": false,
170                "expression": false,
171                "params": [
172                  {
173                    "type": "ETSParameterExpression",
174                    "name": {
175                      "type": "Identifier",
176                      "name": "e",
177                      "typeAnnotation": {
178                        "type": "ETSTypeReference",
179                        "part": {
180                          "type": "ETSTypeReferencePart",
181                          "name": {
182                            "type": "Identifier",
183                            "name": "T",
184                            "decorators": [],
185                            "loc": {
186                              "start": {
187                                "line": 17,
188                                "column": 19,
189                                "program": "generics_instantiation_3.ets"
190                              },
191                              "end": {
192                                "line": 17,
193                                "column": 20,
194                                "program": "generics_instantiation_3.ets"
195                              }
196                            }
197                          },
198                          "loc": {
199                            "start": {
200                              "line": 17,
201                              "column": 19,
202                              "program": "generics_instantiation_3.ets"
203                            },
204                            "end": {
205                              "line": 17,
206                              "column": 21,
207                              "program": "generics_instantiation_3.ets"
208                            }
209                          }
210                        },
211                        "loc": {
212                          "start": {
213                            "line": 17,
214                            "column": 19,
215                            "program": "generics_instantiation_3.ets"
216                          },
217                          "end": {
218                            "line": 17,
219                            "column": 21,
220                            "program": "generics_instantiation_3.ets"
221                          }
222                        }
223                      },
224                      "decorators": [],
225                      "loc": {
226                        "start": {
227                          "line": 17,
228                          "column": 16,
229                          "program": "generics_instantiation_3.ets"
230                        },
231                        "end": {
232                          "line": 17,
233                          "column": 21,
234                          "program": "generics_instantiation_3.ets"
235                        }
236                      }
237                    },
238                    "loc": {
239                      "start": {
240                        "line": 17,
241                        "column": 16,
242                        "program": "generics_instantiation_3.ets"
243                      },
244                      "end": {
245                        "line": 17,
246                        "column": 21,
247                        "program": "generics_instantiation_3.ets"
248                      }
249                    }
250                  }
251                ],
252                "returnType": {
253                  "type": "ETSPrimitiveType",
254                  "loc": {
255                    "start": {
256                      "line": 17,
257                      "column": 23,
258                      "program": "generics_instantiation_3.ets"
259                    },
260                    "end": {
261                      "line": 17,
262                      "column": 27,
263                      "program": "generics_instantiation_3.ets"
264                    }
265                  }
266                },
267                "body": {
268                  "type": "BlockStatement",
269                  "statements": [
270                    {
271                      "type": "ExpressionStatement",
272                      "expression": {
273                        "type": "BinaryExpression",
274                        "operator": "==",
275                        "left": {
276                          "type": "MemberExpression",
277                          "object": {
278                            "type": "MemberExpression",
279                            "object": {
280                              "type": "ThisExpression",
281                              "loc": {
282                                "start": {
283                                  "line": 18,
284                                  "column": 9,
285                                  "program": "generics_instantiation_3.ets"
286                                },
287                                "end": {
288                                  "line": 18,
289                                  "column": 13,
290                                  "program": "generics_instantiation_3.ets"
291                                }
292                              }
293                            },
294                            "property": {
295                              "type": "Identifier",
296                              "name": "data",
297                              "decorators": [],
298                              "loc": {
299                                "start": {
300                                  "line": 18,
301                                  "column": 14,
302                                  "program": "generics_instantiation_3.ets"
303                                },
304                                "end": {
305                                  "line": 18,
306                                  "column": 18,
307                                  "program": "generics_instantiation_3.ets"
308                                }
309                              }
310                            },
311                            "computed": false,
312                            "optional": false,
313                            "loc": {
314                              "start": {
315                                "line": 18,
316                                "column": 9,
317                                "program": "generics_instantiation_3.ets"
318                              },
319                              "end": {
320                                "line": 18,
321                                "column": 18,
322                                "program": "generics_instantiation_3.ets"
323                              }
324                            }
325                          },
326                          "property": {
327                            "type": "NumberLiteral",
328                            "value": 2,
329                            "loc": {
330                              "start": {
331                                "line": 18,
332                                "column": 19,
333                                "program": "generics_instantiation_3.ets"
334                              },
335                              "end": {
336                                "line": 18,
337                                "column": 20,
338                                "program": "generics_instantiation_3.ets"
339                              }
340                            }
341                          },
342                          "computed": true,
343                          "optional": false,
344                          "loc": {
345                            "start": {
346                              "line": 18,
347                              "column": 9,
348                              "program": "generics_instantiation_3.ets"
349                            },
350                            "end": {
351                              "line": 18,
352                              "column": 21,
353                              "program": "generics_instantiation_3.ets"
354                            }
355                          }
356                        },
357                        "right": {
358                          "type": "Identifier",
359                          "name": "e",
360                          "decorators": [],
361                          "loc": {
362                            "start": {
363                              "line": 18,
364                              "column": 25,
365                              "program": "generics_instantiation_3.ets"
366                            },
367                            "end": {
368                              "line": 18,
369                              "column": 26,
370                              "program": "generics_instantiation_3.ets"
371                            }
372                          }
373                        },
374                        "loc": {
375                          "start": {
376                            "line": 18,
377                            "column": 9,
378                            "program": "generics_instantiation_3.ets"
379                          },
380                          "end": {
381                            "line": 18,
382                            "column": 26,
383                            "program": "generics_instantiation_3.ets"
384                          }
385                        }
386                      },
387                      "loc": {
388                        "start": {
389                          "line": 18,
390                          "column": 9,
391                          "program": "generics_instantiation_3.ets"
392                        },
393                        "end": {
394                          "line": 18,
395                          "column": 27,
396                          "program": "generics_instantiation_3.ets"
397                        }
398                      }
399                    }
400                  ],
401                  "loc": {
402                    "start": {
403                      "line": 17,
404                      "column": 28,
405                      "program": "generics_instantiation_3.ets"
406                    },
407                    "end": {
408                      "line": 19,
409                      "column": 6,
410                      "program": "generics_instantiation_3.ets"
411                    }
412                  }
413                },
414                "loc": {
415                  "start": {
416                    "line": 17,
417                    "column": 15,
418                    "program": "generics_instantiation_3.ets"
419                  },
420                  "end": {
421                    "line": 19,
422                    "column": 6,
423                    "program": "generics_instantiation_3.ets"
424                  }
425                }
426              },
427              "loc": {
428                "start": {
429                  "line": 17,
430                  "column": 15,
431                  "program": "generics_instantiation_3.ets"
432                },
433                "end": {
434                  "line": 19,
435                  "column": 6,
436                  "program": "generics_instantiation_3.ets"
437                }
438              }
439            },
440            "overloads": [],
441            "decorators": [],
442            "loc": {
443              "start": {
444                "line": 17,
445                "column": 5,
446                "program": "generics_instantiation_3.ets"
447              },
448              "end": {
449                "line": 19,
450                "column": 6,
451                "program": "generics_instantiation_3.ets"
452              }
453            }
454          },
455          {
456            "type": "ClassProperty",
457            "key": {
458              "type": "Identifier",
459              "name": "data",
460              "decorators": [],
461              "loc": {
462                "start": {
463                  "line": 21,
464                  "column": 13,
465                  "program": "generics_instantiation_3.ets"
466                },
467                "end": {
468                  "line": 21,
469                  "column": 17,
470                  "program": "generics_instantiation_3.ets"
471                }
472              }
473            },
474            "value": {
475              "type": "ArrayExpression",
476              "elements": [],
477              "loc": {
478                "start": {
479                  "line": 21,
480                  "column": 25,
481                  "program": "generics_instantiation_3.ets"
482                },
483                "end": {
484                  "line": 21,
485                  "column": 27,
486                  "program": "generics_instantiation_3.ets"
487                }
488              }
489            },
490            "accessibility": "private",
491            "static": false,
492            "readonly": false,
493            "declare": false,
494            "optional": false,
495            "computed": false,
496            "typeAnnotation": {
497              "type": "ETSTypeReference",
498              "part": {
499                "type": "ETSTypeReferencePart",
500                "name": {
501                  "type": "Identifier",
502                  "name": "Array",
503                  "decorators": [],
504                  "loc": {
505                    "start": {
506                      "line": 1,
507                      "column": 1,
508                      "program": "generics_instantiation_3.ets"
509                    },
510                    "end": {
511                      "line": 1,
512                      "column": 3,
513                      "program": "generics_instantiation_3.ets"
514                    }
515                  }
516                },
517                "typeParams": {
518                  "type": "TSTypeParameterInstantiation",
519                  "params": [
520                    {
521                      "type": "ETSTypeReference",
522                      "part": {
523                        "type": "ETSTypeReferencePart",
524                        "name": {
525                          "type": "Identifier",
526                          "name": "T",
527                          "decorators": [],
528                          "loc": {
529                            "start": {
530                              "line": 1,
531                              "column": 3,
532                              "program": "generics_instantiation_3.ets"
533                            },
534                            "end": {
535                              "line": 1,
536                              "column": 3,
537                              "program": "generics_instantiation_3.ets"
538                            }
539                          }
540                        },
541                        "loc": {
542                          "start": {
543                            "line": 1,
544                            "column": 3,
545                            "program": "generics_instantiation_3.ets"
546                          },
547                          "end": {
548                            "line": 1,
549                            "column": 3,
550                            "program": "generics_instantiation_3.ets"
551                          }
552                        }
553                      },
554                      "loc": {
555                        "start": {
556                          "line": 1,
557                          "column": 3,
558                          "program": "generics_instantiation_3.ets"
559                        },
560                        "end": {
561                          "line": 1,
562                          "column": 3,
563                          "program": "generics_instantiation_3.ets"
564                        }
565                      }
566                    }
567                  ],
568                  "loc": {
569                    "start": {
570                      "line": 1,
571                      "column": 3,
572                      "program": "generics_instantiation_3.ets"
573                    },
574                    "end": {
575                      "line": 1,
576                      "column": 3,
577                      "program": "generics_instantiation_3.ets"
578                    }
579                  }
580                },
581                "loc": {
582                  "start": {
583                    "line": 1,
584                    "column": 1,
585                    "program": "generics_instantiation_3.ets"
586                  },
587                  "end": {
588                    "line": 1,
589                    "column": 3,
590                    "program": "generics_instantiation_3.ets"
591                  }
592                }
593              },
594              "loc": {
595                "start": {
596                  "line": 21,
597                  "column": 20,
598                  "program": "generics_instantiation_3.ets"
599                },
600                "end": {
601                  "line": 21,
602                  "column": 22,
603                  "program": "generics_instantiation_3.ets"
604                }
605              }
606            },
607            "definite": false,
608            "decorators": [],
609            "loc": {
610              "start": {
611                "line": 21,
612                "column": 13,
613                "program": "generics_instantiation_3.ets"
614              },
615              "end": {
616                "line": 21,
617                "column": 27,
618                "program": "generics_instantiation_3.ets"
619              }
620            }
621          },
622          {
623            "type": "MethodDefinition",
624            "key": {
625              "type": "Identifier",
626              "name": "constructor",
627              "decorators": [],
628              "loc": {
629                "start": {
630                  "line": 16,
631                  "column": 28,
632                  "program": "generics_instantiation_3.ets"
633                },
634                "end": {
635                  "line": 16,
636                  "column": 28,
637                  "program": "generics_instantiation_3.ets"
638                }
639              }
640            },
641            "kind": "constructor",
642            "static": false,
643            "optional": false,
644            "computed": false,
645            "value": {
646              "type": "FunctionExpression",
647              "function": {
648                "type": "ScriptFunction",
649                "id": {
650                  "type": "Identifier",
651                  "name": "constructor",
652                  "decorators": [],
653                  "loc": {
654                    "start": {
655                      "line": 16,
656                      "column": 28,
657                      "program": "generics_instantiation_3.ets"
658                    },
659                    "end": {
660                      "line": 16,
661                      "column": 28,
662                      "program": "generics_instantiation_3.ets"
663                    }
664                  }
665                },
666                "generator": false,
667                "async": false,
668                "expression": false,
669                "params": [],
670                "body": {
671                  "type": "BlockStatement",
672                  "statements": [],
673                  "loc": {
674                    "start": {
675                      "line": 16,
676                      "column": 28,
677                      "program": "generics_instantiation_3.ets"
678                    },
679                    "end": {
680                      "line": 16,
681                      "column": 28,
682                      "program": "generics_instantiation_3.ets"
683                    }
684                  }
685                },
686                "loc": {
687                  "start": {
688                    "line": 16,
689                    "column": 28,
690                    "program": "generics_instantiation_3.ets"
691                  },
692                  "end": {
693                    "line": 16,
694                    "column": 28,
695                    "program": "generics_instantiation_3.ets"
696                  }
697                }
698              },
699              "loc": {
700                "start": {
701                  "line": 16,
702                  "column": 28,
703                  "program": "generics_instantiation_3.ets"
704                },
705                "end": {
706                  "line": 16,
707                  "column": 28,
708                  "program": "generics_instantiation_3.ets"
709                }
710              }
711            },
712            "overloads": [],
713            "decorators": [],
714            "loc": {
715              "start": {
716                "line": 1,
717                "column": 1,
718                "program": null
719              },
720              "end": {
721                "line": 1,
722                "column": 1,
723                "program": null
724              }
725            }
726          }
727        ],
728        "loc": {
729          "start": {
730            "line": 16,
731            "column": 27,
732            "program": "generics_instantiation_3.ets"
733          },
734          "end": {
735            "line": 23,
736            "column": 1,
737            "program": "generics_instantiation_3.ets"
738          }
739        }
740      },
741      "loc": {
742        "start": {
743          "line": 16,
744          "column": 1,
745          "program": "generics_instantiation_3.ets"
746        },
747        "end": {
748          "line": 23,
749          "column": 1,
750          "program": "generics_instantiation_3.ets"
751        }
752      }
753    },
754    {
755      "type": "ClassDeclaration",
756      "definition": {
757        "id": {
758          "type": "Identifier",
759          "name": "ETSGLOBAL",
760          "decorators": [],
761          "loc": {
762            "start": {
763              "line": 1,
764              "column": 1,
765              "program": "generics_instantiation_3.ets"
766            },
767            "end": {
768              "line": 1,
769              "column": 1,
770              "program": "generics_instantiation_3.ets"
771            }
772          }
773        },
774        "superClass": null,
775        "implements": [],
776        "body": [
777          {
778            "type": "MethodDefinition",
779            "key": {
780              "type": "Identifier",
781              "name": "main",
782              "decorators": [],
783              "loc": {
784                "start": {
785                  "line": 1,
786                  "column": 1,
787                  "program": null
788                },
789                "end": {
790                  "line": 1,
791                  "column": 1,
792                  "program": null
793                }
794              }
795            },
796            "kind": "method",
797            "accessibility": "public",
798            "static": true,
799            "optional": false,
800            "computed": false,
801            "value": {
802              "type": "FunctionExpression",
803              "function": {
804                "type": "ScriptFunction",
805                "id": {
806                  "type": "Identifier",
807                  "name": "main",
808                  "decorators": [],
809                  "loc": {
810                    "start": {
811                      "line": 1,
812                      "column": 1,
813                      "program": null
814                    },
815                    "end": {
816                      "line": 1,
817                      "column": 1,
818                      "program": null
819                    }
820                  }
821                },
822                "generator": false,
823                "async": false,
824                "expression": false,
825                "params": [],
826                "body": {
827                  "type": "BlockStatement",
828                  "statements": [],
829                  "loc": {
830                    "start": {
831                      "line": 1,
832                      "column": 1,
833                      "program": null
834                    },
835                    "end": {
836                      "line": 1,
837                      "column": 1,
838                      "program": null
839                    }
840                  }
841                },
842                "loc": {
843                  "start": {
844                    "line": 1,
845                    "column": 1,
846                    "program": null
847                  },
848                  "end": {
849                    "line": 1,
850                    "column": 1,
851                    "program": null
852                  }
853                }
854              },
855              "loc": {
856                "start": {
857                  "line": 1,
858                  "column": 1,
859                  "program": null
860                },
861                "end": {
862                  "line": 1,
863                  "column": 1,
864                  "program": null
865                }
866              }
867            },
868            "overloads": [],
869            "decorators": [],
870            "loc": {
871              "start": {
872                "line": 1,
873                "column": 1,
874                "program": "generics_instantiation_3.ets"
875              },
876              "end": {
877                "line": 1,
878                "column": 1,
879                "program": "generics_instantiation_3.ets"
880              }
881            }
882          },
883          {
884            "type": "MethodDefinition",
885            "key": {
886              "type": "Identifier",
887              "name": "_$init$_",
888              "decorators": [],
889              "loc": {
890                "start": {
891                  "line": 1,
892                  "column": 1,
893                  "program": null
894                },
895                "end": {
896                  "line": 1,
897                  "column": 1,
898                  "program": null
899                }
900              }
901            },
902            "kind": "method",
903            "accessibility": "public",
904            "static": true,
905            "optional": false,
906            "computed": false,
907            "value": {
908              "type": "FunctionExpression",
909              "function": {
910                "type": "ScriptFunction",
911                "id": {
912                  "type": "Identifier",
913                  "name": "_$init$_",
914                  "decorators": [],
915                  "loc": {
916                    "start": {
917                      "line": 1,
918                      "column": 1,
919                      "program": null
920                    },
921                    "end": {
922                      "line": 1,
923                      "column": 1,
924                      "program": null
925                    }
926                  }
927                },
928                "generator": false,
929                "async": false,
930                "expression": false,
931                "params": [],
932                "body": {
933                  "type": "BlockStatement",
934                  "statements": [],
935                  "loc": {
936                    "start": {
937                      "line": 1,
938                      "column": 1,
939                      "program": null
940                    },
941                    "end": {
942                      "line": 1,
943                      "column": 1,
944                      "program": null
945                    }
946                  }
947                },
948                "loc": {
949                  "start": {
950                    "line": 1,
951                    "column": 1,
952                    "program": null
953                  },
954                  "end": {
955                    "line": 1,
956                    "column": 1,
957                    "program": null
958                  }
959                }
960              },
961              "loc": {
962                "start": {
963                  "line": 1,
964                  "column": 1,
965                  "program": null
966                },
967                "end": {
968                  "line": 1,
969                  "column": 1,
970                  "program": null
971                }
972              }
973            },
974            "overloads": [],
975            "decorators": [],
976            "loc": {
977              "start": {
978                "line": 1,
979                "column": 1,
980                "program": "generics_instantiation_3.ets"
981              },
982              "end": {
983                "line": 1,
984                "column": 1,
985                "program": "generics_instantiation_3.ets"
986              }
987            }
988          }
989        ],
990        "loc": {
991          "start": {
992            "line": 1,
993            "column": 1,
994            "program": "generics_instantiation_3.ets"
995          },
996          "end": {
997            "line": 1,
998            "column": 1,
999            "program": "generics_instantiation_3.ets"
1000          }
1001        }
1002      },
1003      "loc": {
1004        "start": {
1005          "line": 1,
1006          "column": 1,
1007          "program": "generics_instantiation_3.ets"
1008        },
1009        "end": {
1010          "line": 1,
1011          "column": 1,
1012          "program": "generics_instantiation_3.ets"
1013        }
1014      }
1015    }
1016  ],
1017  "loc": {
1018    "start": {
1019      "line": 1,
1020      "column": 1,
1021      "program": "generics_instantiation_3.ets"
1022    },
1023    "end": {
1024      "line": 23,
1025      "column": 1,
1026      "program": "generics_instantiation_3.ets"
1027    }
1028  }
1029}
1030