Bladeren bron

Fixed NPE in FunctionHeader and Stackoverflow

kindlich 4 jaren geleden
bovenliggende
commit
5b231b0574
Geen bekende sleutel gevonden voor deze handtekening in de database

+ 4
- 6
CodeModel/src/main/java/org/openzen/zenscript/codemodel/type/member/TypeMemberBuilder.java Bestand weergeven

@@ -284,7 +284,6 @@ public class TypeMemberBuilder implements TypeVisitorWithContext<Void, Void, Run
284 284
 					new TypeParameter[] { mappedConstructorParameter },
285 285
 					VOID,
286 286
 					null,
287
-					null,
288 287
 					new FunctionParameter(registry.getArray(registry.getGeneric(mappedConstructorParameter), dimension), "original"),
289 288
 					new FunctionParameter(registry.getFunction(mappedConstructorHeaderWithoutIndex), "projection"));
290 289
 			members.addConstructor(new ConstructorMember(
@@ -307,7 +306,6 @@ public class TypeMemberBuilder implements TypeVisitorWithContext<Void, Void, Run
307 306
 					new TypeParameter[] { mappedConstructorParameter },
308 307
 					VOID,
309 308
 					null,
310
-					null,
311 309
 					new FunctionParameter(registry.getArray(registry.getGeneric(mappedConstructorParameter), dimension), "original"),
312 310
 					new FunctionParameter(registry.getFunction(mappedConstructorHeaderWithIndex), "projection"));
313 311
 			constructor(definition, ARRAY_CONSTRUCTOR_PROJECTED_INDEXED, mappedConstructorFunctionWithIndex);
@@ -388,7 +386,7 @@ public class TypeMemberBuilder implements TypeVisitorWithContext<Void, Void, Run
388 386
 				registry.getOptional(valueType),
389 387
 				null,
390 388
 				FunctionParameter.NONE);
391
-		FunctionHeader putHeader = new FunctionHeader(new TypeParameter[] { functionParameter }, VOID, null, null, new FunctionParameter(valueType));
389
+		FunctionHeader putHeader = new FunctionHeader(new TypeParameter[] { functionParameter }, VOID, null, new FunctionParameter(valueType));
392 390
 		FunctionHeader containsHeader = new FunctionHeader(new TypeParameter[] { functionParameter }, BOOL, null, FunctionParameter.NONE);
393 391
 		
394 392
 		ClassDefinition builtin = new ClassDefinition(BUILTIN, Module.BUILTIN, null, "", Modifiers.PUBLIC);
@@ -1351,9 +1349,9 @@ public class TypeMemberBuilder implements TypeVisitorWithContext<Void, Void, Run
1351 1349
 				id);
1352 1350
 	}
1353 1351
 	
1354
-	private void add(HighLevelDefinition definition, BuiltinID id, BasicTypeID operand, BasicTypeID result) {
1355
-		add(definition, id, operand, result);
1356
-	}
1352
+	////private void add(HighLevelDefinition definition, BuiltinID id, BasicTypeID operand, BasicTypeID result) {
1353
+	////	add(definition, id, operand, (TypeID) result);
1354
+	////}
1357 1355
 	
1358 1356
 	private void add(HighLevelDefinition definition, BuiltinID id, TypeID operand, TypeID result) {
1359 1357
 		addOp(definition, id, operand, result).registerTo(members, TypeMemberPriority.SPECIFIED, null);

Laden…
Annuleren
Opslaan