resolveFileFeatures function

Map<String, String> resolveFileFeatures(
  1. int edition,
  2. Map<String, Object?>? fileFeatures
)

Resolves the file-level FeatureSet for edition with the file's explicit features overrides applied on top of the edition base.

fileFeatures is the file's options.features (a subset of the six keys, string-valued); null/absent leaves the base unchanged. Overriding a feature that is FIXED at edition throws ArgumentError.

Implementation

Map<String, String> resolveFileFeatures(
  int edition,
  Map<String, Object?>? fileFeatures,
) {
  validateEditionInRange(edition);
  final base = baseFeaturesForEdition(edition);
  _applyOverrides(base, fileFeatures, edition);
  return base;
}