forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix guarding & converting SAM result type to a function type
In decomposeProtoFunction I wanted to reuse WithFunctionType by running toFunctionType on the whole SAM and then dropping the first parameters. But with result dependent functions that results in a refined type, which is composed of: * the function with a result that is a non-depedent approximation * the original, non-function, method type So I went back to calling toFunctionType on the method result type specifically, like it used to be. Which means I stopped using the SAMType.WithFunctionType extract, so I merged it with its remaining usage with subtype checking and called the SAMType.isSamCompatible.
- Loading branch information
Showing
3 changed files
with
19 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters