Generate typed QX bindings and add source editing tools
This commit is contained in:
@@ -928,6 +928,7 @@ const validatePackages = (
|
||||
}
|
||||
break;
|
||||
case "constructor":
|
||||
if (port.requirement.inputType) validateValueType(issues, port.requirement.inputType, `${portPath}.requirement.inputType`, indexes);
|
||||
if (!indexes.atoms.has(port.requirement.atomId)) {
|
||||
issue(
|
||||
issues,
|
||||
@@ -1260,6 +1261,14 @@ const validateBoundDependencies = (
|
||||
`Atom ${requirement.atomId} has no constructor binding`,
|
||||
);
|
||||
}
|
||||
if (requirement.inputType) {
|
||||
const selected = params.indexes.constructors.get(requirement.atomId);
|
||||
const implementation = selected ? params.indexes.packages.get(selected.packageRevisionId)?.exports.get(selected.exportId) : undefined;
|
||||
if (implementation && !valueTypesEqual(requirement.inputType, implementation.inputType)) {
|
||||
issue(issues, "invalid-dependency-binding", `${path}.binding.atomId`,
|
||||
`Constructor port requires input ${typeLabel(requirement.inputType)}, but selected constructor accepts ${typeLabel(implementation.inputType)}`);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user