summaryrefslogtreecommitdiff
path: root/test/files/pos
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | *boxContext => *box.Context , *boxMacro => *box.MacroEugene Burmako2014-01-1222-42/+42
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performs the following renamings: * scala.reflect.macros.BlackboxContext to scala.reflect.macros.blackbox.Context * scala.reflect.macros.BlackboxMacro to scala.reflect.macros.blackbox.Macro * scala.reflect.macros.WhiteboxContext to scala.reflect.macros.whitebox.Context * scala.reflect.macros.WhiteboxMacro to scala.reflect.macros.whitebox.Macro https://groups.google.com/forum/#!topic/scala-internals/MX40-dM28rk
* | | | | Merge pull request #3275 from paulp/pr/patmatAdriaan Moors2014-01-132-0/+32
|\ \ \ \ \ | | | | | | | | | | | | Improves name-based patmat.
| * | | | | SI-8128 Fix regression in extractors returning existentialsJason Zaugg2014-01-091-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The advent of the named based pattern matcher brought with it a change in the way we determine the type of the value in the "match monad". We used to take the base type to `Option` or `Seq` (guided by the method name in `unapply` vs `unapplySeq`), and simply use the type argument. Name-based patmat, instead, uses the result type of methods in the type. For example, the element type of an Option-like extractor result is given by the result type of the no-args `get` method. This approach, however, swiftly runs aground when navigating the existential atolls. Here's why: scala> class F[_] defined class F scala> val tp = typeOf[Some[F[X]] forSome { type X }] warning: there were 1 feature warning(s); re-run with -feature for details tp: $r.intp.global.Type = scala.this.Some[F[X]] forSome { type X } scala> tp.baseType(typeOf[Option[_]].typeSymbol).typeArgs.head res10: $r.intp.global.Type = F[X] forSome { type X } scala> tp.memberType(tp.member(nme.get)).finalResultType res11: $r.intp.global.Type = F[X] `res10` corresponds to 2.10.x approach in `matchMonadResult`. `res11` corresponds to the new approach in `resultOfMatchingMethod`. The last result is not wrapped by the existential type. This results in errors like (shown under -Ydebug to turn un accurate printing of skolems): error: error during expansion of this match (this is a scalac bug). The underlying error was: type mismatch; found : _$1&0 where type _$1&0 required: _$1 (0: Any) match { ^ one error found This commit addresses the regression in 2.10.x compatible extractors by using the 2.10 approach for them. The residual problem is shown in the enclosed pending test.
| * | | | | SI-8045 type inference of extracted valuePaul Phillips2013-12-231-0/+17
| | |/ / / | |/| | | | | | | | | | | | | Test case for SI-8045, fixed by the preceding commits.
* | | | | Merge pull request #3242 from retronym/ticket/8046Adriaan Moors2014-01-133-0/+55
|\ \ \ \ \ | | | | | | | | | | | | SI-8046 BaseTypeSeq fixes with aliases
| * | | | | SI-8046 Only use fast TypeRef#baseTypeSeq with concrete base typesJason Zaugg2013-12-101-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can only compute the base type sequence (BTS) of a `TypeRef` by element-wise transforming the BTS of the referenced symbol if there are no abstract types in its BTS type symbols. In the now-working test case, `pos/t8046.scala`, the difference between the old and new calculation of the BTS is: this = Three.this.Alias[Int] sym.info.baseTypeSeq = BTS(One.this.Op[A],Any) mapped BTS = BTS(Three.this.Op[Int],Any) full BTS = BTS(Three.this.Op[Int],Int => Int,Object,Any) The change to account for PolyType in ArgsTypeRef#transform is now needed to avoid the full BTS of: BTS(Three.this.Op[A],A => A,Object,Any) Interestingly, everything actually works without that change.
| * | | | | SI-8046 Fix baseTypeSeq in presence of type aliasesJason Zaugg2013-12-092-0/+36
| | | | | |
* | | | | | Merge pull request #3184 from retronym/ticket/2066Adriaan Moors2014-01-131-0/+25
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | SI-2066 Plug a soundness hole higher order type params, overriding
| * | | | | SI-2066 Plug a soundness hole higher order type params, overridingJason Zaugg2013-11-271-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PolyType-s parameterized by higher order type parameters (HOTPs) should only be relatable with <:< or =:= if the variances of their type parameters line up. This is only enforced for HOTPs defined in method type arguments. Invariant type parameters subsume variant ones. Concretely, as described by @S11001001: > A method taking [F[_]] can implement a method taking [F[+_]]. > Likewise, a method taking [F[_[+_]]] can implement a method > taking [F[_[_]]], as with [F[_[_[_]]]] implementing [F[_[_[+_]]]], > and so on, the variance subsumption flipping at each step. > > This is just the opposite of the variance for passing type > parameters to either instantiate types or call methods; a F[+_] > is a suitable F[_]-argument, a F[_[_]] a suitable F[_[+_]]-argument, > and so on. > > All of the above rules can be duplicated for contravariant positions > by substituting - for +. Also, something similar happens for > weakening/strengthening bounds, I believe. These cases are tested in the `// okay` lines in `neg/t2066.scala`.
* | | | | | SI-8064 Automatic position repair for macro expansionJason Zaugg2014-01-086-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace NoPosition with the focus of the macro application - Focus all range positions, for example, those of spliced arguments
* | | | | | SI-8120 Avoid tree sharing when typechecking patmat anon functionsJason Zaugg2014-01-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When typechecking an empty selector `Match` corresponding to: { case ... => ... }: (A => B) We wrap it in a `Function` and typecheck: (x$1 => x$1 match { case ... => ... }) Local symbols in this expression (representing values bound by the pattern, or just definitions in the body or guard) are then owned by the anonymous function's symbol. However, if we ever discard this `Function` and start anew with the empty selector match, as happens during the fallback to use a view on the receiver in `tryTypedApply`, we found that we had mutated the cases of the original tree, and allowed orphaned local symbols to escape into the compiler pipeline. This commit uses duplicated trees for the the cases in the synthetic `Match` to avoid this problem. `duplicateAndKeepPositions` is used to preserve range positions; without this scala-refactoring PrettyPrinterTest fails. `Tree#duplicate` uses offset positions in the copied tree, which is appropriate when both the original and the copy are going to end up in the final tree.
* | | | | | Merge pull request #3254 from xeno-by/topic/typeCheckJason Zaugg2014-01-034-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | typeCheck => typecheck
| * | | | | | typeCheck => typecheckEugene Burmako2013-12-104-4/+4
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | This method has always been slightly bothering me, so I was really glad when Denys asked me to rename it. Let’s see how it pans out.
* | | | | | SI-5508 Fix crasher with private[this] in nested traitsJason Zaugg2013-12-196-0/+122
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, accessors for private local trait fields are added very late in the game when the `Mixin` tree transformer treats the trait. By contrast, fields with weaker access have accessors created eagerly in `Namers`. // Mixin#addLateInterfaceMembers val getter = member.getter(clazz) if (getter == NoSymbol) addMember(clazz, newGetter(member)) `addMember` mutates the type of the interface to add the getter. (This seems like a pretty poor design: usually if a phase changes types, it should do in an `InfoTransformer`.) However, if an inner class or anonymous function of the trait has been flattened to a spot where it precedes the trait in the enclosing packages info, this code hasn't had a chance to run, and the lookup of the getter crashes as mixins `postTransform` runs over a selection of the not-yet-materialized getter. // Mixin#postTransform case Select(qual, name) if sym.owner.isImplClass && !isStaticOnly(sym) => val iface = toInterface(sym.owner.tpe).typeSymbol val ifaceGetter = sym getter iface This commit ensures that `Flatten` lifts inner classes to a position *after* the enclosing class in the stats of the enclosing package. Bonus fix: SI-7012 (the followup ticket to SI-6231 / SI-2897)
* | | | | Merge pull request #3263 from retronym/ticket/6780Adriaan Moors2013-12-131-0/+20
|\ \ \ \ \ | | | | | | | | | | | | SI-6780 Better handling of cycles in in-scope implicit search
| * | | | | SI-6780 Better handling of cycles in in-scope implicit searchJason Zaugg2013-12-111-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit searches in the body of implicit members with inferred types were leading to cycles. Before we used to resolve that by saying there were no implicits in scope at all; now we just skip the current context and still include the enclosing implicits. Care is taken not to cache results under these circumstances. This entails reworking `Context#implicitss` so that: - the implicit info cache only contains implicits from the current level. The List[List[_]] is now contructed on demand; - we can detect cycles by setting `implicitsCacheRunId` to -1 during the computation. The outer implicits when we encounter that. - we avoid caching when we hit a cycle or when the owner is uninitialized.
* | | | | | Merge pull request #3265 from retronym/merge/2.10.x-to-masterAdriaan Moors2013-12-131-0/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | Merge 2.10.x to master
| * \ \ \ \ \ Merge commit '9cdbe28' into merge/2.10.x-to-masterJason Zaugg2013-12-111-0/+11
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | / / | | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: build.examples.xml build.xml docs/examples/actors/pingpong.scala docs/examples/fors.scala docs/examples/iterators.scala docs/examples/jolib/Ref.scala docs/examples/jolib/parallelOr.scala docs/examples/monads/callccInterpreter.scala docs/examples/monads/directInterpreter.scala docs/examples/monads/errorInterpreter.scala docs/examples/monads/simpleInterpreter.scala docs/examples/monads/stateInterpreter.scala docs/examples/parsing/ArithmeticParser.scala docs/examples/patterns.scala docs/examples/pilib/elasticBuffer.scala docs/examples/pilib/handover.scala docs/examples/pilib/piNat.scala docs/examples/typeinf.scala src/build/pack.xml
| | * | | | SI-8060 Avoid infinite loop with higher kinded type aliasJason Zaugg2013-12-101-0/+11
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `dealiasLocals` map was assuming that: tp.isAliasType implies (tp.dealias ne tp) This isn't true if `!typeParamsMatchArgs`. This commit avoids the infinite loop by checking whether or not dealiasing progresses.
| | * | | [backport] SI-7776 post-erasure signature clashes are now macro-awareEugene Burmako2013-11-082-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "double definition: macro this and method that have same type after erasure" This error doesn't make sense when macros are involved, because macros expand at compile-time, where we're not affected by erasure. Moreover, macros produce no bytecode, which means that we're safe from VerifyErrors.
* | | | | Merge pull request #3241 from retronym/ticket/8054Jason Zaugg2013-12-121-0/+31
|\ \ \ \ \ | | | | | | | | | | | | SI-8054 Fix regression in TypeRef rebind with val overriding object
| * | | | | SI-8054 Fix regression in TypeRef rebind with val overriding objectJason Zaugg2013-12-091-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regressed in 80767383fd / SI-7928 The condition added in that commit are necessary after refchecks but poisonous before. This still seems rather fragile: I wonder if `eliminateModuleDefs` in `RefChecks` ought to flag the module symbol as `ARTIFACT` after creating the accessor, so as to signal that it shouldn't be bound anymore?
* | | | | | Move Liftable into the Universe cake; add additional standard LiftablesDen Shabalin2013-12-101-10/+7
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we believed that having Liftable outside of the Universe will bring some advantages but it turned out this wasn’t worth it. Due to infectious nature of path dependent types inside of the universe one had to cast a lot. A nice example of what I’m talking about is a change in trait ArbitraryTreesAndNames. Additionally a number of standard Liftables is added for types that are available through Predef and/or default scala._ import: Array, Vector, List, Map, Set, Option, Either, TupleN.
* | | | | deprecates macro def return type inferenceEugene Burmako2013-12-101-1/+1
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the new focus on quasiquotes in macro implementations, we now have to change the way how inference of macro def return types works. Previously, if the return type of a macro def wasn’t specified, we looked into the signature of its macro impl, took its return type (which could only be c.Expr[T]) and then assigned T to be the return type of the macro def. We also had a convenient special case which inferred Any in case when the body of the macro impl wasn’t an expr. That avoided reporting spurious errors if the macro impl had its body typed incorrectly (because in that case we would report a def/impl signature mismatch anyway) and also provided a convenience by letting macro impls end with `???`. However now we also allow macro impls to return c.Tree, which means that we are no longer able to do any meaningful type inference, because c.Tree could correspond to tree of any type. Unfortunately, when coupled with the type inference special case described above, this means that the users who migrate from exprs to quasiquotes are going to face an unpleasant surprise. If they haven’t provided explicit return types for their macro defs, those types are going to be silently inferred as `Any`! This commit plugs this loophole by prohibiting type inference from non-expr return types of macro impls (not counting Nothing). Moreover, it also deprecates c.Expr[T] => T inference in order to avoid confusion when switching between exprs and quasiquotes.
* | | | Merge pull request #3225 from som-snytt/issue/8013-interp-nowarnAdriaan Moors2013-12-083-0/+45
|\ \ \ \ | | | | | | | | | | SI-8013 Nowarn on macro str interpolation
| * | | | SI-8013 Nowarn on macro str interpolationSom Snytt2013-12-043-0/+45
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When warning about stray "foo $bar" under `-Xlint`, which may be missing an interpolator id, suppress the warning if we're in the middle of a macro expansion, since we have no useful heuristic to apply to the expanded tree. The test for whether the string is part of an expanded tree is to check all open macros for an expanded tree that contains the literal tree under scrutiny. (This is deemed more paranoid than looking for a macro application that is an enclosing position.)
* | | | Merge pull request #3191 from retronym/ticket/deprecate-par-viewJason Zaugg2013-12-063-7/+9
|\ \ \ \ | |_|/ / |/| | | Remove parallel collection views and, with them, Gen*View
| * | | Removes Gen*View and Par*ViewJason Zaugg2013-11-263-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - code that used to be inherited in *View is now inlined - the `view` methods on `ParIteratoa` and `ParSeq` now convert to sequential collections, and are deprecated asking the user to do this explicitly in the future. Should be largely source compatible with 2.10.x, on the assumption that the removed classes, while being public, were internal implementation details. A few tests used now-removed classes to demonstrate compiler crashes. I managed to confirm that after my decoupling, t4365 still exercises the bug: % qbin/scalac test/files/pos/t4365/*.scala warning: there were 2 deprecation warning(s); re-run with -deprecation for details one warning found % scalac-hash 7b4e450 test/files/pos/t4365/*.scala warning: there were 2 deprecation warning(s); re-run with -deprecation for details one warning found % scalac-hash 7b4e450~1 test/files/pos/t4365/*.scala 2<&1 | grep -i wrong error: something is wrong: cannot make sense of type application something is wrong: cannot make sense of type application something is wrong: cannot make sense of type application I didn't manage to do the same for specializes-sym-crash.scala, and instead just made it compile.
* | | | SI-8023 Address review comments around typedHigherKindedTypeJason Zaugg2013-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make `WildCardType` kind polymorphic - Factory methods for expected kinds. They are still just `Type`-s, though. - Check if the type parameter is initialized, rather than its owner. - Take advantage of these to cleanup `typedAppliedTypeTree` TODO: is this comment totally accurate? If so, should we refactor `Kind.FromParams(tparams)` to `Kind.Arity(tparams.length)`? // @M: kind-arity checking is done here and in adapt, // full kind-checking is in checkKindBounds (in Infer)
* | | | SI-8023 Fix symbol-completion-order type var pattern bugJason Zaugg2013-12-021-0/+22
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing the `isComplete` check altogether leads to cycles in, for instatnce, F-bound type parameters: trait LSO[+A, +Repr <: LSO[A, Repr]] // error: illegal cyclic reference involving type Repr But, I believe that we can (and must) eagerly initialize the type parameter symbols if we are typechecking a pattern. While this appeared to regress in 2.11.x, but the problem was in fact dormant and was merely uncovered in the fix for SI-7756, 3df1d77fc.
* | | Merge pull request #3189 from retronym/ticket/8002Jason Zaugg2013-11-261-0/+20
|\ \ \ | | | | | | | | private access for local companions
| * | | SI-8002 private access for local companionsJason Zaugg2013-11-241-0/+20
| |/ / | | | | | | | | | | | | | | | We go through similar gymnastics to make companion implicits work for local class/object pairings, so we ought to be consistent when it comes to access
* | | SI-8011 Test case for recently fixed value class bugJason Zaugg2013-11-261-0/+8
| | | | | | | | | | | | | | | The improvements to symbol substitution in cb37548ef made this one work.
* | | Merge pull request #3183 from xeno-by/topic/pure-expression-does-nothingAdriaan Moors2013-11-254-0/+15
|\ \ \ | | | | | | | | SI-8001 spurious "pure expression does nothing" warning
| * | | SI-8001 spurious "pure expression does nothing" warningEugene Burmako2013-11-234-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `isPureExprForWarningPurposes` doesn’t warn on `()`, but `(): Unit` leaves it confused. This patch fixes the problem. The fix is important in the context of the recent split between blackbox and whitebox macros. Macro engines wrap expansions of blackbox macros in type ascriptions, so a macro that expands into `()` would actually produce `(): Unit`, which would trigger a spurious warning. Thanks @milessabin for spotting this problem!
* | | | Merge pull request #3137 from xeno-by/topic/implicit-macros-invalidate-on-errorAdriaan Moors2013-11-222-0/+28
|\ \ \ \ | | | | | | | | | | correctly fails implicit search for invalid implicit macros
| * | | | correctly fails implicit search for invalid implicit macrosEugene Burmako2013-11-142-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a rare corner case when implicit search wouldn’t discard an invalid implicit macro (e.g. the one with mismatching macro impl or the one with macro impl defined in the same compilation run) during typechecking the corresponding candidate in typedImplicit1. This is now fixed.
* | | | | Merge pull request #3160 from retronym/ticket/7983Adriaan Moors2013-11-221-0/+31
|\ \ \ \ \ | | | | | | | | | | | | Fix implicit divergence regression
| * | | | | SI-7983 Fix regression in implicit divergence checkingJason Zaugg2013-11-191-0/+31
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As seen in Slick. Regressed in 039b1cb1a5b8. In that commit, a call to `normalize` was replaced with `dealiasWiden` as part of a broad sweeping change. However, while the latter does less than the former with regards to eta expansion ofhigher kinded type refs (the motivation of that commit), it also does more when it comes to singleton types: they are widened to the underlying type. This was widening away `SingleType(<<package a.b>>, <<package c>>)` before the special case assiging that type component a complexity of zero could kick in. In the test case, extracted from Slick, this meant that the divergence check would consider that the second type below to outrank the first in the complexity measure, and abort the implicit search. Shape[?, ? (Coffees, Coffees), ?] Shape[DivergenceTest.this.Flat, ?, Coffees, ?] After this change, the number of packages enclosing `DivergenceTest` no longer has a bearing on the complexity score of the type. Here's how the race was run before hand: complexity(<noprefix>): 0 complexity(<root>): 1 complexity(foo.type): 2 complexity(foo.bar.type): 3 complexity(foo.bar.baz.type): 4 complexity(DivergenceTest.this.type): 5 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(foo.type): 2 complexity(foo.bar.type): 3 complexity(foo.bar.baz.type): 4 complexity(DivergenceTest.this.type): 5 complexity(DivergenceTest.this.Flat): 6 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(scala.type): 2 complexity(Int): 3 complexity(?): 1 complexity(DivergenceTest.this.Shape2[DivergenceTest.this.Flat,Int,?]): 16 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(foo.type): 2 complexity(foo.bar.type): 3 complexity(foo.bar.baz.type): 4 complexity(DivergenceTest.this.type): 5 complexity(?): 1 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(scala.type): 2 complexity(<noprefix>): 0 complexity(Coffees): 1 complexity(<noprefix>): 0 complexity(<root>): 1 complexity(scala.type): 2 complexity(Int): 3 complexity((Coffees, Int)): 7 complexity(?): 1 complexity(DivergenceTest.this.Shape2[?,(Coffees, Int),?]): 15 dominates(DivergenceTest.this.Shape2[_ <: DivergenceTest.this.Flat, Int, U2], DivergenceTest.this.Shape2[_ <: Level, (Coffees, Int), U1]): true And afterwards: complexity(DivergenceTest.this.type): 1 complexity(DivergenceTest.this.type): 1 complexity(DivergenceTest.this.Flat): 2 complexity(scala.type): 1 complexity(Int): 2 complexity(?): 1 complexity(DivergenceTest.this.Shape2[DivergenceTest.this.Flat,Int,?]): 7 complexity(DivergenceTest.this.type): 1 complexity(?): 1 complexity(scala.type): 1 complexity(<noprefix>): 0 complexity(Coffees): 1 complexity(scala.type): 1 complexity(Int): 2 complexity((Coffees, Int)): 5 complexity(?): 1 complexity(DivergenceTest.this.Shape2[?,(Coffees, Int),?]): 9 dominates(DivergenceTest.this.Shape2[_ <: DivergenceTest.this.Flat, Int, U2], DivergenceTest.this.Shape2[_ <: Level, (Coffees, Int), U1]): false Notice that even in the after shot, `scala.Int` has a complexity of 2. It should be 1; this will be fixed in a separate commit.
* | | | | Merge pull request #3131 from densh/pr/deprecate-pair-and-tripleJason Zaugg2013-11-2213-31/+31
|\ \ \ \ \ | |_|_|/ / |/| | | | Deprecate Pair and Triple
| * | | | deprecate Pair and TripleDen Shabalin2013-11-2013-31/+31
| |/ / /
* / / / SI-7987 Test case for "macro not expanded" error with implicitsJason Zaugg2013-11-212-0/+18
|/ / / | | | | | | | | | | | | | | | Fixed, serendipitously, a handful of commits ago in 4a6882e772, "SI-7944 FOUND: stray undetermined type params in vicinity of implicits".
* | | Merge pull request #3135 from adriaanm/revive-xml-testsJames Iry2013-11-185-0/+68
|\ \ \ | | | | | | | | Revived tests that once depended on xml
| * | | Revived tests that once depended on xmlAdriaan Moors2013-11-145-0/+68
| |/ / | | | | | | | | | | | | | | | | | | I was a bit overzealous in moving stuff over to scala-xml in 9c50dd5274 These were all compiler tests that accidentally touched on xml. I've tried to delicately decouple them so they can roam the scalac pastures as intended.
* | | Merge pull request #3133 from adriaanm/merge-2.10Adriaan Moors2013-11-142-0/+22
|\ \ \ | |/ / |/| | Merge 2.10
| | |
| | \
| *-. | Merge commit '075f6f260c'; commit 'e09a8a2b7f' into merge-2.10Adriaan Moors2013-11-132-0/+22
| |\ \|
| | | * SI-4012 Mixin and specialization work wellVlad Ureche2013-11-052-0/+22
| | |/ | | | | | | | | | The bug was fixed along with SI-7638 in 504b5f3.
* | | Merge pull request #3129 from adriaanm/pr-rebase-3001Adriaan Moors2013-11-1316-37/+42
|\ \ \ | |/ / |/| | [rebase] blackbox and whitebox macros
| * | blackbox and whitebox macrosEugene Burmako2013-11-1216-37/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first commit in the series. This commit only: 1) Splits Context into BlackboxContext and WhiteboxContext 2) Splits Macro into BlackboxMacro and WhiteboxMacro 3) Introduces the isBundle property in the macro impl binding Here we just teach the compiler that macros can now be blackbox and whitebox, without actually imposing any restrictions on blackbox macros. These restrictions will come in subsequent commits. For description and documentation of the blackbox/whitebox separation see the official macro guide at the scaladoc website: http://docs.scala-lang.org/overviews/macros/blackbox-whitebox.html Some infrastructure work to make evolving macros easier: compile partest-extras with quick so they can use latest library/reflect/...
* | | SI-7958 Deprecate methods `future` and `promise` in the `scala.concurrent` ↵Philipp Haller2013-11-121-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | package object - The corresponding `apply` methods in the `Future` and `Promise` objects should be used instead. - Adjusted tests to use non-deprecated versions - Fixed doc comments not to use deprecated methods - Added comment about planned removal in 2.13.0