swift
943812c9 - Update main resolution tests

Commit
3 years ago
Update main resolution tests The async main resolution has dropped the custom availability checking, so I am able to collapse the resolution checking into a single test (deleting the macos-specific one). Selection of an asynchronous main vs a synchronous main is dependent on an `-async-main` flag. Due to the scoring mechanism, and that the specificity of a given resolution doesn't affect the score, a more general synchronous main will be selected over a more specific asynchronous main when the `-async-main` flag is not passed. If the flag is not passed and the program only contains an asynchronous main, or the asynchronous main is the only main function that is available given the constraints, then it will be selected. Conversely, if the flag is set and no valid asynchronous main functions exist, the main function will resolve to a synchronous main. This is the same behavior that is used to resolve an synchronous and asynchronous static function.
Author
Committer
Parents
Loading