aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Emit a migration warning in Parser when hitting a Scala2 feature.Martin Odersky2015-11-051-4/+9
|
* Add migration warningsMartin Odersky2015-11-053-1/+10
| | | | | The idea is that whenever Dotty detects a migration problem under -language:Scala2, it should issue a migration warning, so we know what needs to be rewritten.
* Merge pull request #889 from dotty-staging/fix-#877odersky2015-11-054-13/+18
|\ | | | | Fix #877
| * Make a new fresh name creator for each unitMartin Odersky2015-10-303-12/+17
| | | | | | | | Needed to make builds deterministic.
| * Fix #877Martin Odersky2015-10-301-1/+1
| | | | | | | | Use freshName to name evidence parameters.
* | Merge pull request #923 from dotty-staging/fix-typeparam-orderodersky2015-11-052-2/+17
|\ \ | | | | | | Reorder unpickled type params if necessary
| * | Reorder unpickled type params if necessaryMartin Odersky2015-11-042-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling Iterator.scala it was observed that the type parameters of BufferedCanBuildFrom appeared inm the wrong order. This fix corrects that, making sure that type parameters appear in the decls scope in the same order as they are given in the epxlicitly unpickled type parameter list.
* | | Merge pull request #900 from dotty-staging/fix-#871odersky2015-11-051-3/+15
|\ \ \ | |/ / |/| | Deal gracefully with missing return types of abstract menthods.
| * | Deal gracefully with missing return types of abstract menthods.Martin Odersky2015-11-011-3/+15
| | | | | | | | | | | | | | | | | | | | | 1) Better error message: "missing return type" instead of `=' expected. 2) Allow them under language:Scala2 Fixes #871
* | | Merge pull request #901 from dotty-staging/fix-#851Dmitry Petrashko2015-11-032-2/+3
|\ \ \ | | | | | | | | Fix #851 Java parsing forgot type parameters
| * | | Don't interpreter $init$ as a constructor when parsing Java files.Martin Odersky2015-11-011-1/+1
| | | | | | | | | | | | | | | | Fixes #851.
| * | | Allow -Xprint:parser option to print parse treesMartin Odersky2015-11-011-1/+2
| |/ / | | | | | | | | | | | | | | | | | | `parser` is strictly speaking not a phase, but it makes sense to allow parsed trees being printed. Before this was only possible if the `typr` printer was enabled, but this was cumbersome, non-intuitive, and did too much.
* | | Enable <:< implicits as conversions.Martin Odersky2015-11-032-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | These were disabled before, which means that having evidence of S <:< T did not introduce a usable implicit conversion from S to T. We do do it like scalac: just disable Predef.$conforms. This makes TraversableOnce compile. Fixes #914.
* | | Retain `case` flags for module classes representing case objectsMartin Odersky2015-11-021-8/+10
| | | | | | | | | | | | | | | This will cause them to automatically implement a certain number of synthetic methods.
* | | Make isDefined override if necessaryMartin Odersky2015-11-021-1/+3
| | | | | | | | | | | | | | | isDefined is now always auto-generated for case classes. It need to get an automatic override if there is a version that's inherited.
* | | Merge pull request #860 from dotty-staging/change-allow-ex-in-hkDmitry Petrashko2015-11-0210-94/+105
|\ \ \ | | | | | | | | Change allow ex in hk
| * | | Represent references to Scala2 inner classes as WithFixedSym typesMartin Odersky2015-10-252-16/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason: An inner Scala2 class might be shadowed by a same-named class in a subtype. In Dotty this is disallowed butin Scala 2 it is possible. For instance, math.Numeric and math.Ordering both have an inner class "Ops". Normal TypeRef types could not select the shadowed class in Ordering is the prefix is of type Numeric.
| * | | Make Lazy and Trait "From Start" flagsMartin Odersky2015-10-251-2/+4
| | | |
| * | | Make SuperAccessor and Scala2x "FromStart" flags.Martin Odersky2015-10-252-2/+4
| | | |
| * | | Remove redundant testsMartin Odersky2015-10-241-3/+1
| | | | | | | | | | | | | | | | isHK already does a dealias.
| * | | Don't drop $apply when eliminating existentials in unpicklerMartin Odersky2015-10-242-2/+2
| | | |
| * | | Revise typeParams to account for existential hk typesMartin Odersky2015-10-242-28/+37
| | | |
| * | | Allow existential types in hk typesMartin Odersky2015-10-244-43/+35
| | | |
* | | | Merge pull request #887 from dotty-staging/fix-#873odersky2015-11-022-15/+24
|\ \ \ \ | | | | | | | | | | Allow pattern matching anonymous functions of arity > 1
| * | | | Also handle SAM functions when adaptiing arity of case lambdas.Martin Odersky2015-10-301-14/+13
| | | | |
| * | | | Revert nullary function patchMartin Odersky2015-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | Nullary functions are handled by scalac, and dotty should do the same.
| * | | | Fix case expansion for nullary functions.Martin Odersky2015-10-301-3/+3
| | | | | | | | | | | | | | | | | | | | Always expand to at least one parameter.
| * | | | Allow pattern matching anonymous functions of arity > 1Martin Odersky2015-10-302-6/+16
| | | | | | | | | | | | | | | | | | | | This is sepcified in Sec. 8.5 of the SLS. Fixes #873. Review by @smarter.
* | | | | Parentheses around a wildcard should not produce a lambdaMartin Odersky2015-11-021-0/+1
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | `(_)` and `(_: T)` should not be converted to functions x => x (x: T) => x
* | | | Merge pull request #894 from dotty-staging/check-singlethreadedDmitry Petrashko2015-10-312-0/+11
|\ \ \ \ | | | | | | | | | | Check that access to context base is singlethreaded.
| * | | | Check that access to context base is singlethreaded.Martin Odersky2015-10-312-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ContextBase is not intended to be threadsafe, We now test that indeed it is not shared by compileUnits calls operating on different threads.
* | | | | Merge pull request #890 from dotty-staging/fix-#879Dmitry Petrashko2015-10-311-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | Fix #879
| * | | | Address reviewer commentsMartin Odersky2015-10-301-2/+2
| | | | |
| * | | | Fix #879Martin Odersky2015-10-302-3/+3
| | |_|/ | |/| | | | | | | | | | Don't insert a constructor call when typechecking Java classes.
* / | | Avoid printing expanded names when displaying type parameters.Martin Odersky2015-10-301-6/+5
|/ / / | | | | | | | | | | | | Differences can be observed when checking neg/variances.scala. Review and any necessary polishing by @smarter.
* | | Merge pull request #886 from dotty-staging/fix-#884Guillaume Martres2015-10-301-1/+1
|\ \ \ | |/ / |/| | Fix #884 - misdiagnosed ambiguous definition.
| * | Fix #884 - misdiagnosed ambiguous definition.Martin Odersky2015-10-291-1/+1
| | | | | | | | | | | | | | | Universal equality strikes again. Caused a bug in isDefinedInCurrentUnit.
* | | Merge pull request #882 from dotty-staging/fix/java-annots-posodersky2015-10-301-1/+1
|\ \ \ | | | | | | | | Set position on annotations parsed from Java
| * | | Set position on annotations parsed from JavaGuillaume Martres2015-10-291-1/+1
| | | | | | | | | | | | | | | | Fix a crash in Typer#assertPositioned
* | | | Make it easier to call the compiler using reflectionGuillaume Martres2015-10-291-1/+7
|/ / /
* | | Don't count suppressed errorsMartin Odersky2015-10-264-16/+21
| | | | | | | | | | | | If an error message was supressed to count it in the total.
* | | Keep separate chain of outer reporters for StoreReportersMartin Odersky2015-10-265-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | Used in rewritten `errorsReported` method. This fixes #866. The problem before was that `TyperState#trywithFallBack` temporarily updates the reporter, so crawling up the context chain to check for reporters with errors missed some reported errors, which triggered the assertion in `Tree#withType`.
* | | Shorten ctx.typerState.reporter to ctx.reporterMartin Odersky2015-10-266-6/+6
|/ / | | | | | | ... making use of method in `ctx`.
* | Fix hole in subtyping of modulesMartin Odersky2015-10-251-4/+9
| | | | | | | | | | We did not handle correctly the case exemplified by `range.scala`: A module this type, which is compared with a getter to the same module. Seen in the wild in scala.math.BigDecimal.
* | Readd `.widen` which was accidentally removed from the previous commitGuillaume Martres2015-10-251-1/+1
| |
* | Simplify logic in adaptMartin Odersky2015-10-251-10/+2
| |
* | Fix issue that prevented instantiating some tvars before implicit searchGuillaume Martres2015-10-251-1/+1
| |
* | Less eager tvar interpolation: wait until method calls are fully appliedGuillaume Martres2015-10-251-2/+11
| | | | | | | | Fix #738
* | Merge pull request #843 from dotty-staging/fix-#830odersky2015-10-251-3/+19
|\ \ | | | | | | Fix #830: Compiler hangs on implicit search with singleton &/|
| * | Only replace intersections of constants with NothingMartin Odersky2015-10-231-4/+10
| | |