aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Move files out of the dotty packageMartin Odersky2016-10-2011-32/+20
| | | | | | | | | | - Remove unused classes Pair and Singleton. - Move classes from dotty.annotation.internal to scala.annotation.internal. The only classes remaining now are in dotty.runtime and DottyPredef. We should probably do something about them as well at some point.
* Introduce scalaShadowing packageMartin Odersky2016-10-202-0/+213
| | | | | | | | | The `scalaShadowing` package is used to safely modify classes and objects in scala so that they can be used from dotty. They will be visible as members of the `scala` package, replacing any objects or classes with the same name. But their binary artifacts are in `scalaShadowing` so they don't clash with the same-named `scala` members at runtime.
* Merge pull request #1594 from dotty-staging/fix-#1576Olivier Blanvillain2016-10-201-1/+1
|\ | | | | Fix #1576: Parameters of Java annotations should be public
| * Fix #1576: Parameters of Java annotations should be publicMartin Odersky2016-10-131-1/+1
| | | | | | | | | | Parameters of annotation classes parsed by the Java parser should have public val parameters. Otherwise they cannot be accessed as fields.
* | Merge pull request #1595 from dotty-staging/fix-#1567odersky2016-10-201-5/+15
|\ \ | | | | | | Fix #1567: Widen private constructor in value class
| * | Fix #1567: Widen private constructor in value classMartin Odersky2016-10-141-5/+15
| |/ | | | | | | | | | | | | | | Private or protected constructors of value classes need to be widenened to public in order to enable boxing anywhere. Technically we should also do something about qualified private constructors, but since we want to get rid of them anyway it's urgent.
* | Improved error messages in Desugar.scalaShane Delmore2016-10-192-5/+87
| |
* | Merge pull request #1592 from dotty-staging/fix-#1590odersky2016-10-161-1/+23
|\ \ | | | | | | Fix #1590: Eliminate wildcards when approximating a type
| * | Refinement of interpolation directionMartin Odersky2016-10-131-1/+19
| | |
| * | Fix #1590: Eliminate wildcards when approximating a typeMartin Odersky2016-10-131-1/+5
| |/ | | | | | | | | Fixes #1590. Type variables should never be instantiated to types containing wildcards.
* | Merge pull request #1588 from dotty-staging/fix-#1502odersky2016-10-161-5/+13
|\ \ | | | | | | Fix #1544: Allow long signatures in names
| * | Fix #1544: Allow long signatures in namesMartin Odersky2016-10-131-5/+13
| | | | | | | | | | | | | | | Fixes #1544 by making the length field use 1 or 2 bytes, depending on the number of parameters in a signature.
* | | explanation for error message related to use of early definitionsSebastian Harko2016-10-162-1/+45
| | |
* | | Merge pull request #1597 from dotty-staging/fix-i1540odersky2016-10-141-9/+13
|\ \ \ | | | | | | | | Fix #1540: overloaded get and isDefined in option-less patmat
| * | | add another test for i1540liu fengyun2016-10-141-1/+1
| | | |
| * | | fix #1540: overloaded get and isDefined in option-less patmatliu fengyun2016-10-141-9/+13
| | | |
* | | | Merge pull request #1598 from dotty-staging/fix-#1515Guillaume Martres2016-10-141-21/+22
|\ \ \ \ | | | | | | | | | | Fix #1515: Don't narrow gadt bounds when frozen
| * | | | Fix #1515: Don't narrow gadt bounds when frozenMartin Odersky2016-10-141-21/+22
| |/ / / | | | | | | | | | | | | Fixes #1515. Review by @smarter.
* | | | Merge pull request #1596 from dotty-staging/fix-#1531Guillaume Martres2016-10-142-5/+5
|\ \ \ \ | | | | | | | | | | Fix #1531: Ignore private members when looking for abstract ones
| * | | | Fix #1531: Ignore private members when looking for abstract onesMartin Odersky2016-10-142-5/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Private members do not override abstract ones. So when looking for abstract members we need to search with `nonPrivateMember`, not `member`. Fixes #1531. Review by @smarter.
* | | | Merge pull request #749 from smarter/fix/escaping-refs-2odersky2016-10-143-14/+15
|\ \ \ \ | |/ / / |/| | | Typer#escapingRefs: don't let the types of lower bounds escape
| * | | Typer#escapingRefs: remove dead codeGuillaume Martres2016-03-241-9/+1
| | | |
| * | | Typer#escapingRefs: don't let the types of lower bounds escapeGuillaume Martres2016-03-242-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 0efa171e8ccca0d49fc6d800fd21e29f7b7336fd I changed the definition of NamedPartsAccumulator to exclude lower bounds as this is required for the implicit search, but NamedPartsAccumulator is also used by Typer#escapingRefs so in the following code: class Foo[T] val z = { class C ??? : Foo[_ >: C] } the type of z was inferred to be Foo[_ >: C] instead of Foo. To avoid this, NamedPartsAccumulator will only exclude lower bounds if the parameter excludeLowerBounds is explicitely set to true. No test because there is no way to detect that a type has escaped, this might be something that could be added to TreeChecker.
* | | | Merge pull request #1565 from Blaisorblade/warningsFelix Mulder2016-10-144-7/+7
|\ \ \ \ | | | | | | | | | | Small fixes to some warnings/comment typos
| * | | | Fix non-spurious unchecked warningPaolo G. Giarrusso2016-10-071-1/+1
| | | | |
| * | | | Suppress some spurious unchecked warningsPaolo G. Giarrusso2016-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | The warning is invalid but Scalac can't tell.
| * | | | Fix typosPaolo G. Giarrusso2016-10-072-4/+4
| | | | |
* | | | | Merge pull request #1577 from dotty-staging/fix-1543-2odersky2016-10-131-3/+4
|\ \ \ \ \ | | | | | | | | | | | | Fix #1543: Ignore IgnoredProto when normalizing method application.
| * | | | | Fix #1543: Ignore IgnoredProto when normalizing method application.Nicolas Stucki2016-10-111-3/+4
| | | | | |
* | | | | | Merge pull request #1586 from dotty-staging/fix/poly-unitGuillaume Martres2016-10-131-1/+1
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Fix erasure of "def foo[T]: Unit", do not box the return type
| * | | | | Fix erasure of "def foo[T]: Unit", do not box the return typeGuillaume Martres2016-10-131-1/+1
| | | | | |
* | | | | | fix #1274: test for dotty bootstrap based on tastyliu fengyun2016-10-133-5/+11
| | | | | |
* | | | | | Merge pull request #1585 from dos65/repl_file_loadingFelix Mulder2016-10-131-16/+7
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Fix #1552: REPL file loading
| * | | | | Fix #1552: loading file inside REPLdos652016-10-131-16/+7
| | | | | |
* | | | | | Use => instead of -> for PolyTypesMartin Odersky2016-10-123-23/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If PolyTypes are to become value types we want to keep `=>` as the arrow for consistency. `->` should be reserved for PolyTypes that do not have side effects on instantiation.
* | | | | | Merge GenericType, TypeLambda and PolyTypeMartin Odersky2016-10-1231-259/+184
| | | | | |
* | | | | | Refactor from distribute{And,Or} to {meet,join}InfoMartin Odersky2016-10-122-176/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactored logic only applies to infos of denotations, not general types. The reactoring avoids special cases down the road then PolyTypes and MethodTypes can be used for terms as well as type(bounds).
* | | | | | Make PolyType a subtype of TypeLambdaMartin Odersky2016-10-122-30/+45
| | | | | |
* | | | | | Don't let import symbols go staleMartin Odersky2016-10-122-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we can run into problems when checking imports for e.g. scala2Mode in later runs.
* | | | | | Fix rebase problemMartin Odersky2016-10-121-1/+1
| | | | | |
* | | | | | Change type inheritance diagramMartin Odersky2016-10-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | to account for the fact the GenericTypes are now TypeProxies.
* | | | | | Harmonize PolyType and TypeLambdaMartin Odersky2016-10-1211-84/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let them inherit the same traits and push as much functionality as possibly into the common superclass GenericType.
* | | | | | Make TypeLambdas not be ValueTypesMartin Odersky2016-10-124-4/+7
| | | | | |
* | | | | | Fix cutting problemMartin Odersky2016-10-112-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test case: orInf.scala. This showed a problem where an `either` operation had to arbitrarily pick one constraint over another, leading to a type error down the line. What happened was that a `constrainResult` generated the constraint Set[A] <: Set[String] | Set[Int] But this constraint cannot be simplified without a cut and a resulting loss of information. We avoid the problem by not constraining the result if the prototype is a disjunction.
* | | | | | Drop dotty.language from DefinitionsMartin Odersky2016-10-112-6/+4
| | | | | |
* | | | | | Don't report double def errors if symbol's type is erroneousMartin Odersky2016-10-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This happened for singletonOrs, and led to spurious errors there.
* | | | | | Disallow singleton types in unionsMartin Odersky2016-10-112-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the moment, we do not know how to handle something like 1 | 2 or x.type | y.type correctly. So it's better to disallow these situations until we find a proper solution.
* | | | | | Refactor Splitter functionalityMartin Odersky2016-10-112-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Splitting or types is no longer needed with new scheme. Replacing idents with This nodes is better done in ExplicitSelf. So splitter now just distributes applications into and ifs.
* | | | | | Scrutinize selections in TreeCheckerMartin Odersky2016-10-111-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes sure the symbol in the tree can be approximately reconstructed by calling member on the qualifier type. Approximately means: The two symbols might be different but one still overrides the other.
* | | | | | Remove unused language optionMartin Odersky2016-10-111-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | In fact all of dotty.language can be removed.