| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Need to skip type bounds in `underlying` chain, since
TypeBounds is not a legal operand type for OrType.
|
|\
| |
| | |
Fix #2056: Backend crash when inlined method contains try
|
| |
| |
| |
| |
| |
| | |
In various places we do "case EmptyTree =>", since Tree#equals uses
reference equality this means that EmptyTree should never be copied,
otherwise some other code path will be taken.
|
| |
| |
| |
| |
| |
| | |
Deleting an error message changes all subsequent error message umbers,
which means that REPL tests were invalidated. This is a bit unfortunate
from a testing standpoint.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the [type T] syntax, and what's associated to make it work.
Motivation: It's an alternative way of doing things for which there seems
to be little need. The implementation was provisional and bitrotted during
the various iterations to introduce higher-kinded types. So in the end the
complxity-cost for language and compiler was not worth the added benefit
that [type T] parameters provide.
Noe that we still accept _named arguments_ [A = T] in expressions; these are useful
for specifying some parameters and letting others be inferred.
|
|\
| |
| | |
Fix #2030: Don't chain implicit conversions
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
When inferring a view, we are not allowed to use another
implicit conversion to adapt its result. Fixing this revealed
another problem where we have to re-enable implicit conversions
when pre-typing arguments in overloading resolution.
|
| | |
|
|\ \
| | |
| | | |
Fix #2033: Improve handling of unresolved overloaded arguments
|
| |/ |
|
|\ \
| |/
|/| |
HMap test case
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Treat implicit by-name arguments as lazy values
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With the previous rules, the two test cases produce a
diverging implicit expansion. We avoid this by creating
for every implicit by-name argument of type T a lazy implicit
value of the same type. The implicit value is visible for all
nested implicit searches of by-name arguments. That way,
we tie the knot and obtain a recursive lazy value instead of
a diverging expansion.
|
|\ \ \
| | | |
| | | | |
Better error messages for missing type of recursive definitions
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Add overloading support for case-closures
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
case-closures (which are represented as Match nodes) have a known
arity just like other function literals. So shape analysis for
overloading resolution should apply to them as well.
|
|\ \ \ \
| | | | |
| | | | | |
Fix #2020: Only the first parameters of a case class are caseaccessors
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Only the parameters in the first parameter list of a case class should get
the `CaseAccessor` flag. Fixes #2020.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Fix #2009: Fix placeholder params logic for lambdas
Logic was missing placeholders in rhs of lambdas.
* Add comment
* Fix typo
|
|\ \ \ \
| | | | |
| | | | | |
Fix #2000: Make implicit and non-implicit functions incomparable
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Implicit and non-implicit functions are incomparable with <:<, but are
treated as equivalent with `matches`. This means implicit and non-implicit
functions of the same types override each other, but RefChecks will
give an error because their types are not subtypes.
Also contains a test for #2002.
|
|\ \ \ \
| | | | |
| | | | | |
Fix off-by-one error in forward reference checking
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Avoid accidental captures of Context
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously, the following code accidentally used the implicit Context
parameter of `typedApply`:
tryEither {
implicit ctx => typedOpAssign
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix #1747: Improve error message for Scala/Java type mismatch
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Omit the `=>' if a PolyType has a MethodType as result type.
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
Don't inline when errors are detected
|
| | |_|_|/ /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Inlining is only well-defined if the body to inline does not
have any errors. We therefore check for errors before we
perform any transformation of trees related to inlining.
The error check is global, i.e. we stop on any error
not just on errors in the code to be inlined. This is a safe
approximation, of course.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Fix #1990: Handle inlining where this proxies change types
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It turns out that we simply cannot do reliable outer path
computation that fills in the right hand sides of this-proxies
from the types of these proxies. As-seen-from logic can mangle
the types of proxies enough to scramble the necessary information.
What we now do instead is simply count: We record the number
of outer accesses to an outer this in inlineable code, and do the same number
of outer accesses when computing the proxy.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
They are sorted according to the nesting depth of the classes they
represent. This is no necessarily the same as the nesting level of
the symbols of the proxy classes. i1990a.scala shows an example where
the two differ.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This shows that the builder pattern can be expressed
with implicit function types.
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The new situation in the test was that outer of the inlined method
was `A` but it's as seen from type is a subtype `B`.
We need two fixes:
- Ignore outerSelects in TreeChecker. These are treated as having fixed symbols.
- Adapt the outer-path logic to deal with code that's moved to another context.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Remove unused flags
|
| |/ / / |
|
|\ \ \ \
| |_|_|/
|/| | | |
Disable tests that require scala-compiler
|
| |/ /
| | |
| | |
| | | |
This is necessary if we ever want to get rid of our dependency on scala-compiler
|
| | |
| | |
| | |
| | |
| | |
| | | |
We cannot assume that the untyped rhs of the bind is a `Typed` tree,
with extractors it might be an `Apply` node, and in general it might
also be a `Parens` node.
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
This is a gross hack to support the need for a $scope
binding when XML literals are created. It should go away
once we phase out XML literals. A library-based
solution should use implicits instead.
|
|/
|
|
|
|
|
|
| |
val definitions and for expressions both distinguish whether
something is a pattern or a variable binding. They no do it
the same way: `ident` or an `ident: type` is a variable binding,
everything else is a pattern. Previously, capitalized idents
were considered as bindings in valdefs but as pattern in fors.
|