forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turn on special handling for erased functions in TypeComparer
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -665,7 +665,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling | |
case _ => | ||
isSubType(info1, info2) | ||
|
||
if defn.isFunctionType(tp2) then | ||
if defn.isFunctionType(tp2) || defn.isErasedFunctionType(tp2) then | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nicolasstucki
|
||
tp1w.widenDealias match | ||
case tp1: RefinedType => | ||
return isSubInfo(tp1.refinedInfo, tp2.refinedInfo) | ||
|
The special treatment of
defn.isErasedFunctionType
looks like a footgun. I thinkisFunctionType
should also cover erased functions.