aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Move refType/Class maps from Definitions to CapturedVarsMartin Odersky2015-11-092-20/+27
| | | | | | | Maps should not have TypeRefs as keys, yet symbols are not stable for recompilation. Solution: Construct these maps over symbols but move them to CapturedVars#Transform where they will be re-built on each run.
* Make BoxedUnit_UNIT a defMartin Odersky2015-11-091-2/+1
| | | | Was a lazy val, but this is not stable under recompilation.
* Match on _name rather than TypeRef in scalaPrimitivesMartin Odersky2015-11-092-32/+32
|
* Standardize requiredMethod callsMartin Odersky2015-11-095-44/+34
| | | | | Remve versions in Symbols, always go through version in Denotations. Avoids having two equivalent ways to do the same thing.
* Standardize naming and definition order of annotation classesMartin Odersky2015-11-093-28/+28
|
* Use more standard way to define LanguageModuleClassMartin Odersky2015-11-091-3/+3
|
* Make isPolymorphicAfterErasure a methodMartin Odersky2015-11-091-2/+2
| | | | | Can't be a lazy val, because one of the symbols it tests (`newRefArray`) can be recomputed.
* Harmonize naming conventions for BoxedUnitMartin Odersky2015-11-092-5/+3
| | | | Also, delete unused `uncheckedStableClassRef` entry.
* Index primitive value class maps by name, not TypeRefMartin Odersky2015-11-092-16/+18
| | | | | TypeRefs can have several representations for logically the same type, so they don't make good keys.
* First versions of Definitions based on TypeRefs not Symbols.Martin Odersky2015-11-0923-351/+487
| | | | | | | | | | | | | | | Symbols are not stable between runs, so if some symbol referred to from Definitions gets recompiled, there are then two Symbols that are both visible, one referenced from Definitions, the other the one that got compiled. Thos led to a crash when e.g. compiling scala.Short, because the newly compiled symbol was not recognized as a primitive value class. The present commit tries to make systematic changes without regard to simplicity or aesthetics. This will be polished in future commits. // ### comments signal areas that need further attention.
* Merge pull request #899 from dotty-staging/fix-#880Dmitry Petrashko2015-11-091-3/+8
|\ | | | | Require outer pointer also for proxies of enclosing classes.
| * Require outer pointer also for proxies of enclosing classes.Martin Odersky2015-10-311-3/+8
| | | | | | | | There was a missing case where an outer pointer is required.
* | Merge pull request #927 from dotty-staging/stdlib-boundsodersky2015-11-095-12/+14
|\ \ | | | | | | Drop checking that lower bound is a subtype of upper bound.
| * | Check bounds of inferred typevars in PostTyper.Martin Odersky2015-11-053-10/+12
| | |
| * | Add more info on missing references in unpickler.Martin Odersky2015-11-051-0/+2
| | | | | | | | | | | | Trying to hunt down the flakey build.
| * | Drop test that lower bound must be a subtype of upper bound.Martin Odersky2015-11-051-2/+0
| | | | | | | | | | | | | | | | | | As discussed in #780 and #525, the test is not needed. This makes t1279a compile, which got moved now to pos. Fixes #780 and #915. It also makes scala.List compile. Review by @smarter.
* | | Merge pull request #905 from dotty-staging/fix-nested-pkg-member-2odersky2015-11-091-1/+3
|\ \ \ | | | | | | | | Fix nested pkg member 2
| * | | Fix problem when accessing same identifier from nested packages.Martin Odersky2015-11-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous rules picked the once outer removed member rather than the innermost one, of both members exist. Seen in the wild in scala.sys.ShutdownHookThread. No separate test here, because we'll include large parts of stdlib anyway as a build test.
* | | | Merge pull request #902 from dotty-staging/fix-numeric-implicit-argsodersky2015-11-093-6/+32
|\| | | | | | | | | | | Fix numeric implicit args
| * | | Disable failing testMartin Odersky2015-11-011-5/+5
| | | | | | | | | | | | | | | | | | | | Dotty delivers an ambiguity error. The comment in the test argues why this is OK.
| * | | Better handling of implicits over numeric types.Martin Odersky2015-11-013-6/+32
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling scala.math.BigDecimal and scala.math.BigInteger shows a problem. The conversion `int2bigInt` is not applicable to a Byte because `Byte -> Int` requires another implicit conversion. We fix that by using a new method relaxed_<:< for implicit compatibility checks, which always admits numeric widenings. This leads to another problem. Now the conversions implicit def byteToInt(x: Byte): Int implicit def byteToShort(x: Byte): Short are ambiguous when we try to convert from Byte to Int. We fix that by adding a "tie-break" to implicit search where if several methods match a numeric value result type and all have numeric value types as result types, we pick the numerically largest type that matches.
* | | Avoid spurious procedure syntax migration warningMartin Odersky2015-11-091-1/+1
| | |
* | | Remove println accidentally left in code.Martin Odersky2015-11-051-3/+1
| | |
* | | Handle variance unsoundness in scalacMartin Odersky2015-11-051-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The included test pos-special/variances-constr.scala demonstrates an unsoundness in the variance checking of scalac. Scalac excludes symbols owned by constructors from the checking. This is unsound, as can be demonstrated by compiling the test and observing output of the program run: Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at Test$.main(variances-constr.scala:17) at Test.main(variances-constr.scala) Dotty allows this code only under -language:Scala2 and issues a migration warning.
* | | Add scalaMode and testScalaMode to TypeOpsMartin Odersky2015-11-052-2/+12
| | |
* | | 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
| | | | |