aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Pull out isLegal prefix.Martin Odersky2015-09-111-2/+5
| | | | It is used twice, should use same logic each time.
* Merge pull request #775 from dotty-staging/fix-lvDmitry Petrashko2015-09-011-2/+4
|\ | | | | LazyVals: fix volatile lazy vals initialization
| * LazyVals: fix volatile lazy vals initializationDmitry Petrashko2015-08-241-2/+4
| | | | | | | | Used to incorrectly set status field.
* | Merge pull request #767 from dotty-staging/fix-#756-super-accessorsDmitry Petrashko2015-08-286-4/+34
|\ \ | | | | | | Fix #756 super accessors
| * | Add missing negative test.Martin Odersky2015-08-211-0/+8
| | |
| * | Add test caseMartin Odersky2015-08-211-0/+8
| | |
| * | Workaround for #765Martin Odersky2015-08-212-3/+12
| | | | | | | | | | | | | | | Avoid using unexpanded name because it can give wrong results for super accessors of symbolic names. See #765. Without this commit t2183.scala crashes the compiler.
| * | Fix test when abstract override is needed.Martin Odersky2015-08-212-1/+2
| | | | | | | | | | | | | | | There was a transcription error from scalac which caused the scope of a `!` to be wrong.
| * | Expand names of super accessorsMartin Odersky2015-08-212-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | Scalac seems to treat superaccessors of traits in a rather peculiar way. They are left unexpanded so that a class implementing several traits with the same superaccessors will get duplicate methods with the same name. It seems this is then resolved in the backend. Here we solve the issue by expanding the names of trait super accessors immediately.
* | | Merge pull request #770 from odersky/fix-repeatedDmitry Petrashko2015-08-245-5/+33
|\ \ \ | |_|/ |/| | Fix repeated
| * | Avoid T* in closure parameter ValDefMartin Odersky2015-08-221-1/+3
| | | | | | | | | | | | | | | | | | | | | Map a T* via underlyingIFRepeated to a Seq[T] in the parameter ValDef of a closure. Without this change, fun/sammy_repeated.scala fails to YCheck under the new test introduced in the last commit.
| * | When unpickling, translate T* to Seq[T] unless it's a parameter type.Martin Odersky2015-08-222-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Dotty allows T* types only for parameter types of MethodTypes (and for repeated arguments); all other ocurrences have to be translated to the underlying type. TreeChecker now verifies that Ident and Select nodes never carry a repeated parameter type.
| * | When unpickling Scala2, treat VALsyms separately from MODULEsymsMartin Odersky2015-08-221-1/+3
| | | | | | | | | | | | VALsyms don't need the special setup of a module class unpickler.
| * | Refine refOfDef top handle repeated parametersMartin Odersky2015-08-222-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | refOfDef is used in desugaring case classes, specifically the definition of an apply method. Here it is necessary to pass a vararg argument (x: _*) if the case class parameter is repeated. This functionality is now added to `refOfDef`. I verified that the other uses of `refOfDef` are compatible with this change. Fixes #768.
* | | Merge pull request #771 from dotty-staging/fix-final-valsDmitry Petrashko2015-08-2410-11/+96
|\ \ \ | |/ / |/| | Fix final vals
| * | Make it a syntactic criterion whether a literal is a legal typeMartin Odersky2015-08-246-9/+11
| | | | | | | | | | | | | | | Introduce a new non-terminal "SimpleLiteral". Only SimpleLiterals can be types.
| * | Test other forms of singleton types.Martin Odersky2015-08-232-3/+19
| | | | | | | | | | | | | | | Tested are now other numeric values, strings, booleans, which are all legal singleton types.
| * | Better error message for Null and 'sym singleton types.Martin Odersky2015-08-232-1/+8
| | | | | | | | | | | | | | | | | | Null and 'sym are not legal as singleton types because the underlying values are not stable. They are rejected now outright instead of issuing a cryptic "X is not stable" error message.
| * | Update SyntaxSummary to take into account SIP 23.Martin Odersky2015-08-231-0/+1
| | |
| * | Update neg testMartin Odersky2015-08-231-1/+0
| | | | | | | | | | | | It's decided that constant types and purity are independent.
| * | Tests of functionality.Martin Odersky2015-08-233-0/+47
| | | | | | | | | | | | | | | | | | As the comment in pos/singletons.scala says, we currently test only constant propagation during typer. We should also have a test that literalize produces the literals in the right places.
| * | Make literalize work for TermRefs of constant type.Martin Odersky2015-08-232-5/+8
| | |
| * | Make final vals have constant types if rhs is a constant.Martin Odersky2015-08-231-3/+11
| | | | | | | | | | | | | | | | | | This duplicates scalac behavior. Awaiting inline, this is a stopgap because we need this to work for the bootstrap. Once we have inline (and a migration tool that rewrites final to final inline) we can migrate this functionality over to inline values.
| * | Add literal-based singleton types (SIP-23).Martin Odersky2015-08-231-0/+2
| | | | | | | | | | | | Only the parser needed to be updated. Everything else works out of the box.
| * | Make Final a "from-start" flag.Martin Odersky2015-08-231-1/+1
|/ /
* | Merge pull request #764 from dotty-staging/mixin/forwardersodersky2015-08-222-2/+18
|\ \ | | | | | | Mixin: class defined abstract members take precedence over interface defined.
| * | Test that forwarders are correctly created.Dmitry Petrashko2015-08-211-0/+14
| | |
| * | Mixin: class defined abstract members take precedence over interface defined.Dmitry Petrashko2015-08-211-2/+4
| |/ | | | | | | | | In case we have an class-defined abstract member implemented by a trait we need to create an explicit forwarder.
* | Merge pull request #763 from dotty-staging/constructors/settersodersky2015-08-222-1/+13
|\ \ | |/ |/| Constructors: fields should be set before super constructor is invoked.
| * Test that fields are correctly set before super constructor is called.Dmitry Petrashko2015-08-211-0/+12
| |
| * Constructors: fields should be set before super constructor is invoked.Dmitry Petrashko2015-08-211-1/+1
|/
* Merge pull request #758 from ↵Dmitry Petrashko2015-08-2010-42/+73
|\ | | | | | | | | dotty-staging/fix-liftedTry-capturedVars-interaction Fix lift try and captured vars interaction
| * ChangeOwnerAfter should also change owners of denotations defined later.Martin Odersky2015-08-191-1/+1
| |
| * Tweak to installAfterMartin Odersky2015-08-191-1/+1
| | | | | | | | | | | | installAfter now overwrites denotaton also when the first denotation of a symbol is defined after the current phase. Previously, a new denotation with a last valid phase before a first valid phase was created.
| * Add a local val to lifted try to make sure owners are still legal.Martin Odersky2015-08-151-1/+1
| | | | | | | | | | Checks the hypothesis that lifting a try may safely move expressions into a ValDef owned by a new temp var.
| * Fix CaputuredVars/LiftTry interaction.Martin Odersky2015-08-153-10/+43
| | | | | | | | | | | | CapturedVars introduced an assignment that could cause a try to be executed with a non-empty stack, even after LiftTry had already run. We now avoid this by introducing a temporary variable.
| * Fix miniphase assembly.Martin Odersky2015-08-155-29/+26
| | | | | | | | | | | | | | | | There were two architectural errors here, which confused TreeTransforms and MiniPhases and which caused "NotDefinedHere" on transformFollowing: 1. TreeTransforms should not have idx fields, MiniPhases have them.2 2. TreeTransformers initialize arrays of MiniPhases not TreeTransforms.
| * Make changeOwnerAfter more robust wrt NotDefinedHere errorsMartin Odersky2015-08-151-2/+3
| | | | | | | | | | It can happen that changeOwner sees symbols that are not defined yet at the phase where the method is run. Such symbols should be ignored.
* | Merge pull request #757 from senia-psm/patch-1odersky2015-08-201-2/+2
|\ \ | | | | | | Typo fix in trait Lambda$II definition
| * | Typo fixsenia-psm2015-08-141-1/+1
| | |
| * | Typo fix in trait Lambda$II definitionsenia-psm2015-08-141-1/+1
| | |
* | | Merge pull request #760 from dotty-staging/mixin-fixesodersky2015-08-205-4/+32
|\ \ \ | | | | | | | | Fixes to scala2 Mixin
| * | | AugmentScala2Traits: fix typo in comment.Dmitry Petrashko2015-08-201-1/+1
| | | |
| * | | test #760Dmitry Petrashko2015-08-171-0/+23
| | | |
| * | | Helper to get pickler phase.Dmitry Petrashko2015-08-171-0/+3
| | | |
| * | | All non-deferred Scala2 defined methods in traits need a method in implClass.Dmitry Petrashko2015-08-172-1/+2
| | | | | | | | | | | | | | | | As one can call them either indirectly through mixin composition or directly through super[Mixin].foo
| * | | Names of superaccessors can change during the pipelineDmitry Petrashko2015-08-171-1/+1
| | | | | | | | | | | | | | | | If a stable view on names is needed, better access them during a predefined phase.
| * | | Scala2 supecraccessors are pickled as private, but compiled as public expandedDmitry Petrashko2015-08-171-2/+3
| | |/ | |/| | | | | | | Need to do the very same transformation in AugmentScala2Traits.
* | | Merge pull request #762 from dotty-staging/fix-expandSAMSodersky2015-08-201-1/+1
|\ \ \ | | | | | | | | ExpandSAMs: create isDefinedAt with correct name.
| * | | ExpandSAMs: create isDefinedAt with correct name.Dmitry Petrashko2015-08-201-1/+1
|/ / / | | | | | | | | | Used to create a method named $isDefinedAt