-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Constrain closure parameters and result from expected type before rechecking the closure's body. This gives more precise types and avoids the spurious duplication of some variables. It also avoids the unmotivated special case that we needed before to make tests pass.
- Loading branch information
Showing
7 changed files
with
106 additions
and
105 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
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
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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
object test: | ||
class Plan(elem: Plan) | ||
object SomePlan extends Plan(???) | ||
type PP = (-> Plan) -> Plan | ||
def f1(expr: (-> Plan) -> Plan): Plan = expr(SomePlan) | ||
f1 { onf => Plan(onf) } | ||
def f2(expr: (=> Plan) -> Plan): Plan = ??? | ||
f2 { onf => Plan(onf) } | ||
def f3(expr: (-> Plan) => Plan): Plan = ??? | ||
f1 { onf => Plan(onf) } | ||
f3 { onf => Plan(onf) } | ||
def f4(expr: (=> Plan) => Plan): Plan = ??? | ||
f2 { onf => Plan(onf) } | ||
f4 { onf => Plan(onf) } | ||
def f5(expr: PP): Plan = expr(SomePlan) | ||
f5 { onf => Plan(onf) } |