odersky
changed the title
Generate "Impure" function aliases
Distinguish between pure and impure function types
1. Allow `->` and `?->` and function operators, treated like `=>` and `?=>`.
2. under -Ycc treat `->` and `?->` as immutable function types, whereas `A => B`
is an alias of `{*} A -> B` and `A ?=> B` is an alias of `{*} A ?-> B`.
Closures are unaffected, we still use `=>` for all closures where they are pure or not.
Improve printing of capturing types
Avoid explicit retains annotations also outside phase cc
Generate "Impure" function aliases
For every (possibly erased and/or context) function class
XFunctionN, generate an alias ImpureXFunctionN in the Scala package defined as
type ImpureXFunctionN[...] = {*} XFunctionN[...]
Also:
- Fix a bug in TypeComparer: glb has to test subCapture in a frozen state
- Harden EventuallyCapturingType extractor to not crash on illegal capture sets
- Cleanup transformation of inferred types
This file contains hidden or 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