| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|\
| |
| | |
Add implicit function types
|
| |
| |
| |
| |
| |
| | |
"Wrong number of args" only works for type arguments but was called also for
term arguments. Ideally we should have a WrongNumberOfArgs message that works for
both, but this will take some refactoring.
|
| | |
|
| |
| |
| |
| |
| | |
When the expected type is an implicit function, create an
implicit closure to match it.
|
| |
| |
| |
| |
| |
| | |
This will need a spec change. It's necessary in
order not to confuse synthetic implicits with each other
or with explicit ones in the environment.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also: show implicit function types correctly.
Also: refine applications of implicit funcitons
- don't do it for closure trees
- don't do it after typer.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix #1802: Make sure errors are not swept under the carpet
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Typer#ensureReported's comment outlines an example where errors
could go unreported, resulting in error trees after typer without
any reported error messages. This commit makes sure that at least
one error is reported if a tree node has an error type.
Fixes #1802.
|
|/
|
|
|
|
|
| |
If a parent type of an anonymous class is an Ident or Select which refers
to a parameterized type, use the expected type to infer its type parameters.
Fixes #1803.
|
|\
| |
| | |
Fix #1790: Change by-name pattern matching.
|
| |
| |
| |
| | |
This implements the rules laid down in #1805.
|
| |
| |
| |
| | |
New implementation following the scheme outlined in #1790.
|
|\ \
| | |
| | | |
Fix #1784: allow to omit types for local implicit vals
|
| | |
| | |
| | |
| | | |
559e49317912ce52c51e295346cebcafbb69462d)
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since we now allow to drop the explicit type of a local implicit val
it can happen that this causes a cyclic reference, namely when the
typechecking of the right-hand side involves an implicit search.
It's unpractical and fragile to avoid this. Instead we give now
a nice error message explaining the problem and how to fix it in
source code.
|
| | |
| | |
| | |
| | |
| | | |
Drop explicit types for local implicit vals of type Context
and Position. Exercises the functionality and shortens the code.
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Fix checks related to value classes
|
| | | |
|
| | | |
|
| | | |
|
| |/
|/| |
|
|\ \
| | |
| | | |
Fix #1757: Be more careful about positions of type variable binders
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We interpolate a type variable if the current tree contains the type variables
binding tree. Previously, this was the application owning the variable. However,
sometimes this tree is transformed so that the containment test fails, and
type variables are instantiated too late (in the case of #1757 this was never).
We fix this by
- setting the binding tree to the type tree that first contains the type variable
- making sure that tree is never copied literally anywhere else.
It's a tricky dance, but I believe we got it right now.
|
|\ \ \
| |/ /
|/| | |
Fix #1639: Changes around implicits and apply methods
|
| | |
| | |
| | |
| | |
| | |
| | | |
This can lead to stackoverflow, as i1639.scala shows.
Fixes #1639.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When tracing i1639.scala it became apparent that we compute
a lot of companion refs. This commit avoids this by better
book-keeping what is valid and what is not and more
aggressive caching.
|
| | |
| | |
| | |
| | |
| | | |
Error messages of nested implicit failures are now
reported with the top-level message if -explaintypes is set.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Need to evaluate annotation arguments in an expression context, since
classes defined in asuch arguments should not be entered into enclosing
class.
Fixes #1647
|
| | |
| | |
| | |
| | |
| | |
| | | |
If we want to do annotation macros right, we need to add
annotations before completing definitions. This commit achieves
that by adding a new "phase" between index and typecheck.
|
| | |
| | |
| | |
| | | |
It was broken before, since it worked only on wildcard imports.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We got a hard to track down error when changing to the new
annotations elaboration scheme (should be in the next commit):
When running `testNonCyclic`, `DotClass` was not found in object Trees
even though it was imported from `util`. It turned out that the import
was ignored because the `util` symbol was completing.
This commit adds a warning when this happens. The warning currently applies
only to named imports because several false negatives were encountered if
we do this also on wildcard imports. I.e. we get a warning, but the searched
after symbol is not a member of the wildcard qualifier.
This commit also refactors namedImportRef, so that `site` is only
computed when the name to reseolve appears in the selector list.
That change made the previously observed error go away because less
is now forced.
|
|/
|
|
|
| |
So far, only typed patterns an dunapply had GADT matching.
i1737.scala shows that we need to do the same thing for objects.
|
|
|
|
|
|
|
|
|
|
|
| |
Fengyun's original solution was the right one. We cannot NOT
enter a package class into its parent scope, because reloading
the denotation with .member will fail. So we need to enter it and
compensate by adding a clause to `qualifies` in `typedIdent`.
Weirdly, this was noted only when running tasty_bootstrap from
a custom classpath in the new build setup. So it was pretty
tricky to diagnose.
|
|
|
|
|
|
| |
The access boundary of a def in a local class is the owner of that
class, previously it was set to the access boundary of the owner of the
class instead.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously Outer2#Inner#foo failed to compile with:
```
non-private method foo refers to private value x in its type signature
```
This should compile because the boundary of `foo` is `class Outer2`
and the boundary of `x` is `object Outer2`. This commit fixes this by
also considering the linked boundary in `checkNoPrivateLeaks`.
|
|
|