Skip to content

Conversation

@slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jan 7, 2026

Add some debugging code in two places:

  • ConstraintSystem::selectDisjunction()
  • ConstraintSystem::findBestSolution()

This will remain off by default because it calls the predicate O(n^2) times in any case, but also for now, neither predicate is actually transitive so the stdlib doesn't build with these on.


// Pick the disjunction with the smallest number of favored, then active
// choices.
auto bestDisjunction = std::min_element(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the indentation changes here which is why it's a big diff but I didn't change anything in the body of the lambda.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov changed the title Sema: Add debug code to check if ConstraintSystem::selectDisjunction()'s predicate is transitive Sema: Add debug code to check if certain predicates are transitive Jan 7, 2026
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov enabled auto-merge January 8, 2026 14:45
@slavapestov slavapestov merged commit 7064e22 into swiftlang:main Jan 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant