1530 * will have parameter's types (int). So in this case we have to add |
1530 * will have parameter's types (int). So in this case we have to add |
1531 * first the extra type in argtypes and then get the names of the |
1531 * first the extra type in argtypes and then get the names of the |
1532 * parameters from baseInit. |
1532 * parameters from baseInit. |
1533 */ |
1533 */ |
1534 initParams = List.nil(); |
1534 initParams = List.nil(); |
1535 VarSymbol param = new VarSymbol(0, make.paramName(0), argtypes.head, init); |
1535 VarSymbol param = new VarSymbol(PARAMETER, make.paramName(0), argtypes.head, init); |
1536 initParams = initParams.append(param); |
1536 initParams = initParams.append(param); |
1537 argTypesList = argTypesList.tail; |
1537 argTypesList = argTypesList.tail; |
1538 } |
1538 } |
1539 if (baseInit != null && baseInit.params != null && |
1539 if (baseInit != null && baseInit.params != null && |
1540 baseInit.params.nonEmpty() && argTypesList.nonEmpty()) { |
1540 baseInit.params.nonEmpty() && argTypesList.nonEmpty()) { |
1541 initParams = (initParams == null) ? List.<VarSymbol>nil() : initParams; |
1541 initParams = (initParams == null) ? List.<VarSymbol>nil() : initParams; |
1542 List<VarSymbol> baseInitParams = baseInit.params; |
1542 List<VarSymbol> baseInitParams = baseInit.params; |
1543 while (baseInitParams.nonEmpty() && argTypesList.nonEmpty()) { |
1543 while (baseInitParams.nonEmpty() && argTypesList.nonEmpty()) { |
1544 VarSymbol param = new VarSymbol(baseInitParams.head.flags(), |
1544 VarSymbol param = new VarSymbol(baseInitParams.head.flags() | PARAMETER, |
1545 baseInitParams.head.name, argTypesList.head, init); |
1545 baseInitParams.head.name, argTypesList.head, init); |
1546 initParams = initParams.append(param); |
1546 initParams = initParams.append(param); |
1547 baseInitParams = baseInitParams.tail; |
1547 baseInitParams = baseInitParams.tail; |
1548 argTypesList = argTypesList.tail; |
1548 argTypesList = argTypesList.tail; |
1549 } |
1549 } |