1TypeError: Bad operand type, the types of the operands must be same type. [instanceof_object_long.sts:21:12] 2{ 3 "type": "Program", 4 "statements": [ 5 { 6 "type": "ClassDeclaration", 7 "definition": { 8 "id": { 9 "type": "Identifier", 10 "name": "ETSGLOBAL", 11 "decorators": [], 12 "loc": { 13 "start": { 14 "line": 1, 15 "column": 1 16 }, 17 "end": { 18 "line": 1, 19 "column": 1 20 } 21 } 22 }, 23 "superClass": null, 24 "implements": [], 25 "body": [ 26 { 27 "type": "MethodDefinition", 28 "key": { 29 "type": "Identifier", 30 "name": "_$init$_", 31 "decorators": [], 32 "loc": { 33 "start": { 34 "line": 1, 35 "column": 1 36 }, 37 "end": { 38 "line": 1, 39 "column": 1 40 } 41 } 42 }, 43 "kind": "method", 44 "accessibility": "public", 45 "static": true, 46 "optional": false, 47 "computed": false, 48 "value": { 49 "type": "FunctionExpression", 50 "function": { 51 "type": "ScriptFunction", 52 "id": { 53 "type": "Identifier", 54 "name": "_$init$_", 55 "decorators": [], 56 "loc": { 57 "start": { 58 "line": 1, 59 "column": 1 60 }, 61 "end": { 62 "line": 1, 63 "column": 1 64 } 65 } 66 }, 67 "generator": false, 68 "async": false, 69 "expression": false, 70 "params": [], 71 "body": { 72 "type": "BlockStatement", 73 "statements": [], 74 "loc": { 75 "start": { 76 "line": 1, 77 "column": 1 78 }, 79 "end": { 80 "line": 1, 81 "column": 1 82 } 83 } 84 }, 85 "loc": { 86 "start": { 87 "line": 1, 88 "column": 1 89 }, 90 "end": { 91 "line": 1, 92 "column": 1 93 } 94 } 95 }, 96 "loc": { 97 "start": { 98 "line": 1, 99 "column": 1 100 }, 101 "end": { 102 "line": 1, 103 "column": 1 104 } 105 } 106 }, 107 "overloads": [], 108 "decorators": [], 109 "loc": { 110 "start": { 111 "line": 1, 112 "column": 1 113 }, 114 "end": { 115 "line": 1, 116 "column": 1 117 } 118 } 119 }, 120 { 121 "type": "MethodDefinition", 122 "key": { 123 "type": "Identifier", 124 "name": "fn", 125 "decorators": [], 126 "loc": { 127 "start": { 128 "line": 20, 129 "column": 10 130 }, 131 "end": { 132 "line": 20, 133 "column": 12 134 } 135 } 136 }, 137 "kind": "method", 138 "accessibility": "public", 139 "static": true, 140 "optional": false, 141 "computed": false, 142 "value": { 143 "type": "FunctionExpression", 144 "function": { 145 "type": "ScriptFunction", 146 "id": { 147 "type": "Identifier", 148 "name": "fn", 149 "decorators": [], 150 "loc": { 151 "start": { 152 "line": 20, 153 "column": 10 154 }, 155 "end": { 156 "line": 20, 157 "column": 12 158 } 159 } 160 }, 161 "generator": false, 162 "async": false, 163 "expression": false, 164 "params": [ 165 { 166 "type": "ETSParameterExpression", 167 "name": { 168 "type": "Identifier", 169 "name": "o", 170 "typeAnnotation": { 171 "type": "ETSTypeReference", 172 "part": { 173 "type": "ETSTypeReferencePart", 174 "name": { 175 "type": "Identifier", 176 "name": "Object", 177 "decorators": [], 178 "loc": { 179 "start": { 180 "line": 20, 181 "column": 16 182 }, 183 "end": { 184 "line": 20, 185 "column": 22 186 } 187 } 188 }, 189 "loc": { 190 "start": { 191 "line": 20, 192 "column": 16 193 }, 194 "end": { 195 "line": 20, 196 "column": 23 197 } 198 } 199 }, 200 "loc": { 201 "start": { 202 "line": 20, 203 "column": 16 204 }, 205 "end": { 206 "line": 20, 207 "column": 23 208 } 209 } 210 }, 211 "decorators": [], 212 "loc": { 213 "start": { 214 "line": 20, 215 "column": 13 216 }, 217 "end": { 218 "line": 20, 219 "column": 23 220 } 221 } 222 }, 223 "loc": { 224 "start": { 225 "line": 20, 226 "column": 13 227 }, 228 "end": { 229 "line": 20, 230 "column": 23 231 } 232 } 233 } 234 ], 235 "returnType": { 236 "type": "ETSPrimitiveType", 237 "loc": { 238 "start": { 239 "line": 20, 240 "column": 25 241 }, 242 "end": { 243 "line": 20, 244 "column": 32 245 } 246 } 247 }, 248 "body": { 249 "type": "BlockStatement", 250 "statements": [ 251 { 252 "type": "ReturnStatement", 253 "argument": { 254 "type": "BinaryExpression", 255 "operator": "instanceof", 256 "left": { 257 "type": "Identifier", 258 "name": "o", 259 "decorators": [], 260 "loc": { 261 "start": { 262 "line": 21, 263 "column": 12 264 }, 265 "end": { 266 "line": 21, 267 "column": 13 268 } 269 } 270 }, 271 "right": { 272 "type": "ETSPrimitiveType", 273 "loc": { 274 "start": { 275 "line": 21, 276 "column": 25 277 }, 278 "end": { 279 "line": 21, 280 "column": 29 281 } 282 } 283 }, 284 "loc": { 285 "start": { 286 "line": 21, 287 "column": 12 288 }, 289 "end": { 290 "line": 21, 291 "column": 29 292 } 293 } 294 }, 295 "loc": { 296 "start": { 297 "line": 21, 298 "column": 5 299 }, 300 "end": { 301 "line": 21, 302 "column": 30 303 } 304 } 305 } 306 ], 307 "loc": { 308 "start": { 309 "line": 20, 310 "column": 33 311 }, 312 "end": { 313 "line": 22, 314 "column": 2 315 } 316 } 317 }, 318 "loc": { 319 "start": { 320 "line": 20, 321 "column": 12 322 }, 323 "end": { 324 "line": 22, 325 "column": 2 326 } 327 } 328 }, 329 "loc": { 330 "start": { 331 "line": 20, 332 "column": 12 333 }, 334 "end": { 335 "line": 22, 336 "column": 2 337 } 338 } 339 }, 340 "overloads": [], 341 "decorators": [], 342 "loc": { 343 "start": { 344 "line": 20, 345 "column": 1 346 }, 347 "end": { 348 "line": 22, 349 "column": 2 350 } 351 } 352 } 353 ], 354 "loc": { 355 "start": { 356 "line": 1, 357 "column": 1 358 }, 359 "end": { 360 "line": 1, 361 "column": 1 362 } 363 } 364 }, 365 "loc": { 366 "start": { 367 "line": 1, 368 "column": 1 369 }, 370 "end": { 371 "line": 1, 372 "column": 1 373 } 374 } 375 } 376 ], 377 "loc": { 378 "start": { 379 "line": 1, 380 "column": 1 381 }, 382 "end": { 383 "line": 23, 384 "column": 1 385 } 386 } 387} 388