aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Typer.scala
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix #1868 - Fix logic bug in matchMartin Odersky2017-01-021-1/+1
|/
* Address reviewer commentMartin Odersky2016-12-211-1/+1
|
* More lenient handling of mixed parameterless and nullary methodsMartin Odersky2016-12-201-5/+18
| | | | | When faced with a denotation that combines parameterless and nullary method definitions (toString is a common example), ignore any redundant () applications.
* Merge pull request #1775 from dotty-staging/add-implicit-funtypesodersky2016-12-181-16/+40
|\ | | | | Add implicit function types
| * Fix "wrong number of args" reportingMartin Odersky2016-12-171-1/+1
| | | | | | | | | | | | "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.
| * Create implicit closures to math expected implicit functionsMartin Odersky2016-12-171-10/+23
| | | | | | | | | | When the expected type is an implicit function, create an implicit closure to match it.
| * Take nesting into account when ranking implicitsMartin Odersky2016-12-171-2/+2
| | | | | | | | | | | | 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.
| * Refactor function operations in DefinitionsMartin Odersky2016-12-171-2/+4
| | | | | | | | | | | | | | | | | | 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.
| * Always insert apply for expressions of implicit function typeMartin Odersky2016-12-171-8/+13
| |
| * Add syntax for implicit functionsMartin Odersky2016-12-171-2/+6
| |
* | Merge pull request #1817 from dotty-staging/fix-#1802odersky2016-12-181-5/+18
|\ \ | | | | | | Fix #1802: Make sure errors are not swept under the carpet
| * | Make errors are not swept under the carpetMartin Odersky2016-12-171-5/+18
| |/ | | | | | | | | | | | | | | | | 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.
* / Infer type parameters of anonymous class parents from expected typeMartin Odersky2016-12-171-0/+5
|/ | | | | | | 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.
* Merge pull request #1785 from dotty-staging/fix-#1784odersky2016-12-151-1/+1
|\ | | | | Fix #1784: allow to omit types for local implicit vals
| * Drop "Dotty deviation" messages that are no longer applicable.Martin Odersky2016-12-121-1/+1
| |
* | Merge pull request #1682 from dotty-staging/vclassodersky2016-12-151-0/+4
|\ \ | |/ |/| Fix checks related to value classes
| * don't recheck in -Ycheckliu fengyun2016-11-241-1/+1
| |
| * fix #1642: disallow value classe wrapping value classliu fengyun2016-11-241-1/+0
| |
| * fix #1670: move the check of value class to typerliu fengyun2016-11-241-0/+5
| |
* | Merge pull request #1764 from dotty-staging/fix-#1757odersky2016-12-101-2/+2
|\ \ | | | | | | Fix #1757: Be more careful about positions of type variable binders
| * | Fix #1757: Be more careful about positions of type variable bindersMartin Odersky2016-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #1658 from dotty-staging/fix-#1639odersky2016-12-031-9/+23
|\ \ \ | |/ / |/| | Fix #1639: Changes around implicits and apply methods
| * | Avoid inserting multiple .apply's.Martin Odersky2016-11-241-9/+23
| | | | | | | | | | | | | | | | | | This can lead to stackoverflow, as i1639.scala shows. Fixes #1639.
* | | Address reviewers commentsMartin Odersky2016-12-011-1/+5
| | |
* | | Fix #1647 Evaluate annotation arguments in proper contextMartin Odersky2016-12-011-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | Need to evaluate annotation arguments in an expression context, since classes defined in asuch arguments should not be entered into enclosing class. Fixes #1647
* | | New phase for entering annotationsMartin Odersky2016-12-011-5/+5
| | | | | | | | | | | | | | | | | | 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.
* | | Fix import disablingMartin Odersky2016-12-011-17/+21
| | | | | | | | | | | | It was broken before, since it worked only on wildcard imports.
* | | Be more lazy in namedImportRefMartin Odersky2016-12-011-21/+29
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / Enable GADT matching for pattern valuesMartin Odersky2016-11-241-1/+3
|/ | | | | So far, only typed patterns an dunapply had GADT matching. i1737.scala shows that we need to do the same thing for objects.
* Revert fix to #1701.Martin Odersky2016-11-241-5/+10
| | | | | | | | | | | 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.
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-0/+1952