aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Allow refinements of new typesMartin Odersky2016-07-115-18/+50
| | | | | | Previously a refinement could only apply to a type bound in the parent. This restriction needs to be dropped for the new encoding of hk type parameters.
* Merge pull request #1371 from dotty-staging/fix-#1366Nicolas Stucki2016-07-111-4/+11
|\ | | | | Fix #1366: constant adaptation
| * Fix: #1366, constant adaptationMartin Odersky2016-07-081-4/+11
| | | | | | | | | | Fix: #1366. Constant adaptation did not work if the expected type was an as yet uninstantiated type variable.
* | Remove print option from ScalaSettingsEdmund Noble2016-07-061-1/+0
| |
* | Revert "Implement -print as -Xprint:(last phase)"Edmund Noble2016-07-061-2/+1
| | | | | | | | This reverts commit 8a39160e8375dd1707f686e13a2a796aed310ef7.
* | Implement -print as -Xprint:(last phase)Edmund Noble2016-07-021-1/+2
|/
* Add straightforward fix to #1308jvican2016-07-011-1/+1
|
* Merge pull request #1315 from nicolasstucki/optimize-try-casesDmitry Petrashko2016-06-303-75/+103
|\ | | | | Fix #856: Handle try/catch cases as catch cases if possible.
| * Fix #856: Handle try/catch cases as catch cases if possible.Nicolas Stucki2016-06-283-75/+103
| | | | | | | | | | | | | | Previously they were all lifted into a match with the came cases. Now the first cases are handled directly by by the catch. If one of the cases can not be handled the old scheme is applied to to it and all subsequent cases.
* | Merge pull request #1338 from dotty-jvican/non-deferred-ycheckDmitry Petrashko2016-06-301-0/+21
|\ \ | |/ |/| Check non-deferred declarations are implemented
| * Add postcondition check that ensures #971jvican2016-06-291-0/+21
| |
* | Merge pull request #1226 from dotty-staging/static-fixesDmitry Petrashko2016-06-2213-34/+145
|\ \ | | | | | | Multiple fixes to @static
| * | Make class initialisers private. Otherwise they break GenBCode.Dmitry Petrashko2016-06-071-1/+1
| | | | | | | | | | | | | | | GenBCode checks if class already has static initialiser, the check is fooled if class inherited a static initialisers.
| * | MoveStatics: Fix classes without companion not getting static <clinit>Dmitry Petrashko2016-06-071-19/+20
| | | | | | | | | | | | This broke lazy vals, as unsafe offsets were not initialised.
| * | LazyVals: do even more verbose debugging.Dmitry Petrashko2016-06-071-1/+5
| | |
| * | LazyVals: fix leftover moduleClass usage.Dmitry Petrashko2016-06-071-1/+1
| | |
| * | CheckStatic: report error position in case of disallowed overrideDmitry Petrashko2016-06-071-1/+1
| | |
| * | MoveStatics: fix a bug.Dmitry Petrashko2016-06-071-1/+2
| | | | | | | | | | | | Nicely spotted by Ycheck.
| * | DottyBackendInterface: fix a bug in methodSymbols.Dmitry Petrashko2016-06-071-1/+1
| | | | | | | | | | | | | | | This method is only used to find static initialisers. Previously, it was always wrong, but we didn't care as we never had them.
| * | MoveStatics: survive absence of companions.Dmitry Petrashko2016-06-071-14/+24
| | | | | | | | | | | | | | | | | | | | | Now moveStatics can correctly create static constructors for objects. Those static constructors would later be merged with synthetic module initialisers by GenBCode. This is a bit of magic, it would be good to move all this into this phase.
| * | SymDenotations: fix comment.Dmitry Petrashko2016-06-071-1/+1
| | |
| * | LazyVals: support debug mode.Dmitry Petrashko2016-06-071-2/+19
| | | | | | | | | | | | Helps to spot usage of unsafe that would lead to undefined behaviour.
| * | Fix Ycheck: allow assigning fields in static constructors.Dmitry Petrashko2016-06-073-1/+6
| | |
| * | MoveStatics: fix two bugs.Dmitry Petrashko2016-06-071-1/+2
| | | | | | | | | | | | | | | Unlink the static from the old scope, and don't drop top-level trees that are not TypeDefs.
| * | LazyVals: do not share offsets between companions.Dmitry Petrashko2016-06-071-12/+9
| | | | | | | | | | | | | | | | | | There used to be a rare test when companion class and companion object would have gotten the very same offset, causing undefined behaviour in runtime.
| * | Fix #1224: static members do not override\implement parent symbols.Dmitry Petrashko2016-06-071-3/+5
| | |
| * | Fix type in SymDenotations.Dmitry Petrashko2016-06-071-1/+1
| | |
| * | Drop support for @static lazy vals.Dmitry Petrashko2016-06-071-0/+3
| | | | | | | | | | | | It's not clear how they should be implemented.
| * | MoveStatic: Move static methods & fields into companion classDmitry Petrashko2016-06-073-3/+71
| | | | | | | | | | | | | | | | | | | | | As a funny side-effect this allows to execute arbitrary code in static initialisers: @static val a: Unit = {println("loaded")}
| * | Allow creating static initialisers.Dmitry Petrashko2016-06-072-1/+5
| | |
| * | Getters: do not generate getters for static valsDmitry Petrashko2016-06-071-0/+1
| | |
| * | Constructors: do not lift static val initialisation into constructors.Dmitry Petrashko2016-06-071-2/+2
| | |
| * | SymDenotations: Allow entering Static symbols.Dmitry Petrashko2016-06-071-1/+1
| | | | | | | | | | | | They aren't inherited and can be entered into frozen owners.
| * | Fix #1220. Dont die when having incorect static methodsDmitry Petrashko2016-06-071-7/+4
| | |
* | | Merge pull request #1309 from felixmulder/topic/fix#1307Dmitry Petrashko2016-06-221-0/+4
|\ \ \ | | | | | | | | Fix issue with GADT not typechecking without bind in match
| * | | Move GADT check to `typeTyped`Felix Mulder2016-06-071-4/+5
| | | |
| * | | Fix issue with GADT not typechecking without bind in matchFelix Mulder2016-06-061-1/+4
| | | |
* | | | better handling of overloaded extractorsliu fengyun2016-06-201-2/+2
| |_|/ |/| |
* | | Add loader support for dotty bridgeFelix Mulder2016-06-092-7/+17
| |/ |/|
* | Merge pull request #1302 from dotty-staging/fix/partest-cli-errorDmitry Petrashko2016-06-071-1/+1
|\ \ | |/ |/| Properly report errors when cli flags are malformed
| * Properly report errors when cli flags are malformedGuillaume Martres2016-06-021-1/+1
| | | | | | | | | | Previously we returned an empty Reporter with no errors so partest reported the test as a success.
* | Merge pull request #1288 from dotty-staging/fix/implicit-caching-2Guillaume Martres2016-06-033-15/+41
|\ \ | | | | | | Implicit scope caching: bug fixes and performance improvements
| * | Overloading resolution: prefer directly applicable methodsGuillaume Martres2016-06-031-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If directly applicable alternatives exists, do not try other alternatives. The original motivation for this change was to reduce the number of searches for implicit views we do since some overloaded methods like `Int#+` are used a lot, but it turns out that this also makes more code compile (see `overload_directly_applicable.scala` for an example), this change does not seem to match what the specification says (it does not define a notion of "directly applicable") but it does match the behavior of scalac, and it seems useful in general.
| * | Don't compute implicit scopes for synthetic Lambda traitsGuillaume Martres2016-05-311-1/+4
| | |
| * | Avoid creating AndTypes with AnyGuillaume Martres2016-05-312-2/+7
| | | | | | | | | | | | This reduces the number of implicit scopes we cache.
| * | OfTypeImplicits: compute refs lazilyGuillaume Martres2016-05-311-1/+1
| | | | | | | | | | | | | | | | | | Many intermediate `OfTypeImplicits` are created during a call to `implicitScope`, but they won't all be used so there is no need to compute `OfTypeImplicits#refs` unless it's actually used.
| * | Never include self types in named parts of a typeGuillaume Martres2016-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to SLS ยง 7.2, self types are not a named part of a type, so they're not part of the implicit scope. Before this commit, this was usually the case because we normally refer to a class using a TypeRef, but in some cases a class might appear as a ThisType, and ThisType#underlying returns the self type, we now use ThisType#tref instead which just returns a TypeRef corresponding to the class.
| * | Do not miss implicits in type parameters of parentsGuillaume Martres2016-05-311-1/+1
| | | | | | | | | | | | | | | This did not work before because we incorrectly looked for their value in the prefix of the type instead of the type itself.
| * | Fix implicit scope caching bugGuillaume Martres2016-05-311-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue is subtle: the `tp` in scope in `def ofTypeImplicits` is the `tp` passed to the top-level `implicitScope` method, not the `tp` passed to the recursively called `iscope`, this means that before this commit, all intermediate `OfTypeImplicit` scopes cached while computing an implicit scope had their `tp` field incorrectly set, which means that we could miss implicits in later implicit searches. Note that the `implicit_cache.scala` test worked before this commit because of the restrictions on caching that exist since b8b0f381ef2cbcb7bad66fd3e7a9ae929baa45f6, it is included anyway because our caching strategy might change in the future.
| * | Document why we cannot cache all implicit scopesGuillaume Martres2016-05-311-1/+12
| | |