Skip to content

Commit 8ef4671

Browse files
Plamen Petkovplamen5kov
authored andcommitted
fixed static binding generator bug
1 parent eb4eee9 commit 8ef4671

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • build/project-template-gradle/build-tools/android-static-binding-generator/ast-parser/visitors

build/project-template-gradle/build-tools/android-static-binding-generator/ast-parser/visitors/es5-visitors.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,17 @@ var es5_visitors = (function () {
260260
}
261261
}
262262
else {
263+
// don't throw here, because there can be a valid js extend that has nothing to do with NS
264+
return;
263265
throw {
264266
message: "Not enough or too many arguments passed(" + extendArguments.length + ") when trying to extend class in file: " + config.filePath,
265267
errCode: 1
266268
}
267269
}
268270
}
269271
else {
272+
// don't throw here, because there can be a valid js extend that has nothing to do with NS
273+
return;
270274
throw {
271275
message: "You need to call the extend with parameters. Example: '...extend(\"a.b.C\", {...overrides...})') in file: " + config.filePath,
272276
errCode: 1
@@ -303,6 +307,8 @@ var es5_visitors = (function () {
303307
normalExtendsArr.push(lineToWrite)
304308
}
305309
else {
310+
// don't throw here, because there can be a valid js extend that has nothing to do with NS
311+
return;
306312
throw {
307313
message: "You need to call the extend '...extend(\"extend_name\", {...overrides...})'), file: " + config.filePath,
308314
errCode: 1

0 commit comments

Comments
 (0)