junit-team/junit5 · error · JUnitException

Unsupported parameter kind: ${parameter.getKind()}

Error message

Unsupported parameter kind: ${parameter.getKind()}

What it means

Error "Unsupported parameter kind: ${parameter.getKind()}" thrown in junit-team/junit5.

Source

Thrown at junit-platform-commons/src/main/java/org/junit/platform/commons/util/KotlinFunctionUtils.java:123

			}
			catch (Exception e) {
				throw throwAsUncheckedException(getUnderlyingCause(e));
			}
		});
	}

	private static Map<KParameter, @Nullable Object> toArgumentMap(@Nullable Object target, @Nullable Object[] args,
			KFunction<?> function) {
		Map<KParameter, @Nullable Object> arguments = new HashMap<>(args.length + 1);
		int index = 0;
		for (KParameter parameter : function.getParameters()) {
			switch (parameter.getKind()) {
				case INSTANCE -> arguments.put(parameter, target);
				case VALUE, EXTENSION_RECEIVER -> {
					arguments.put(parameter, args[index]);
					index++;
				}
				default -> throw new JUnitException("Unsupported parameter kind: " + parameter.getKind());
			}
		}
		return arguments;
	}

	private static KFunction<?> getKotlinFunction(Method method) {
		return Preconditions.notNull(ReflectJvmMapping.getKotlinFunction(method),
			() -> "Failed to get Kotlin function for method: " + method);
	}

	private KotlinFunctionUtils() {
	}
}

View on GitHub (pinned to 956246301e)

When it happens

Trigger: Thrown at junit-platform-commons/src/main/java/org/junit/platform/commons/util/KotlinFunctionUtils.java:123 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of junit-team/junit5@956246301e (2026-08-04). Data as JSON: /data/errors/a6fbb3242a271979.json. Report an issue: GitHub.