summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1020 from odersky/ticket/5866Josh Suereth2012-07-302-0/+13
|\ | | | | SI-5866 Support casting null to value classes
| * SI-5866 Support casting null to value classesMartin Odersky2012-07-302-0/+13
| | | | | | | | The fix now supports null.asInstanceOf[C] where C is a value class that wraps a primitive type.
* | Merge pull request #1018 from scalamacros/topic/classtag-of-nothingJosh Suereth2012-07-301-30/+30
|\ \ | | | | | | ClassTag.Nothing now throws an exception
| * | ClassTag.Nothing now throws an exceptionEugene Burmako2012-07-301-30/+30
| |/ | | | | | | | | Nothing is a bottom type, so it doesn't make much sense for it to have a meaningful erasure (ClassTag.Nothing.runtimeClass).
* | Merge pull request #1016 from hubertp/2.10.x-issue/5031Josh Suereth2012-07-306-0/+26
|\ \ | | | | | | Fixed SI-5031. Only consider classes when looking for companion class.
| * | Fixed SI-5031. Only consider classes when looking for companion class.Hubert Plociniczak2012-07-306-0/+26
| |/ | | | | | | | | | | | | sym.effectiveOwner revealed this piece of inconsistency. companionModule is fine because similar check is there already. Review by @paulp.
* | Merge pull request #1011 from odersky/ticket/5882Josh Suereth2012-07-304-0/+32
|\ \ | | | | | | Closes SI-5882
| * | SI-5799 Secondary constructors in value classes not allowedMartin Odersky2012-07-292-0/+12
| | | | | | | | | | | | I changed the SIP and added a test.
| * | Closes SI-5882Martin Odersky2012-07-282-0/+20
| | | | | | | | | | | | I have added a restriction that value classes may not contain inner classes or objects. This makes sense as the "outer" field of any such classes or objects would be ephemeral, with surprising results. SIP-15 has been changed accordingly.
* | | Merge pull request #981 from adriaanm/ticket-2038Josh Suereth2012-07-301-0/+5
|\ \ \ | | | | | | | | SI-2038 make pt fully-defined when typing Typed
| * | | SI-2038 make pt fully-defined when typing TypedAdriaan Moors2012-07-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dropExistential turns existentials in the expected type (pt) that's passed to `typed` into `BoundedWildcardType`s, but those should not end up in trees when typing a `Typed` node, we didn't check for the type being fully defined (`isFullyDefined`) (and thus did not make it fully defined by turning these BWTs into existentials again using `makeFullyDefined`)
* | | | Merge pull request #960 from clhodapp/remove-resolve-overloadedJosh Suereth2012-07-309-347/+0
|\ \ \ \ | | | | | | | | | | Remove resolveOverloaded
| * | | | Removed resolveOverloadedclhodapp2012-07-309-347/+0
| | | | | | | | | | | | | | | | | | | | It was decided to remove it until the next release
* | | | | Merge pull request #1015 from hubertp/2.10.x-issue/5603Josh Suereth2012-07-302-0/+71
|\ \ \ \ \ | |/ / / / |/| | | | Fixed SI-5603. Early definitions now get transparent positions.
| * | | | Fixed SI-5603. Early definitions now get transparent positions.Hubert Plociniczak2012-07-302-0/+71
| | |_|/ | |/| | | | | | | | | | | | | | | | | | This includes a fix for a minor problem described in #594 - ensureNonOverlapping still focuses on default position when outside of early defs. Review by @dragos, @odersky.
* | | | Merge pull request #1013 from odersky/ticket/5878odersky2012-07-302-0/+19
|\ \ \ \ | | | | | | | | | | Closes SI-5878
| * | | | Closes SI-5878Martin Odersky2012-07-292-0/+19
| | |_|/ | |/| | | | | | | | | | We need to impose an additional rule on value classes: They may not unbox directly or indirectly to themselves.
* | | | Merge pull request #1005 from odersky/topic/worksheetodersky2012-07-302-0/+4
|\ \ \ \ | |_|/ / |/| | | IDE improvements, with particular focus on making worksheets work.
| * | | Raw string interpolatorMartin Odersky2012-07-272-0/+4
| | | | | | | | | | | | | | | | Adds a raw string interpolator raw"..." which does not do any escape sequence processing.
* | | | Merge pull request #996 from gkossakowski/instrumentation-fixesJosh Suereth2012-07-292-0/+20
|\ \ \ \ | | | | | | | | | | Partest instrumentation fixes
| * | | | Instrument all classes in `instrumented` package.Grzegorz Kossakowski2012-07-262-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend instrumenting infrastructure to instrument classes in `instrumented` package. This is useful because very often you need to put your classes into non-empty package. E.g. inliner doesn't work properly with empty package at the moment so in order to test any behaviour we need to put classes in some other package that is instrumented. Added testing code for that to instrumentation test-case. Review by @phaller.
* | | | | Merge pull request #990 from VladUreche/issue/6140Josh Suereth2012-07-292-0/+19
|\ \ \ \ \ | | | | | | | | | | | | SI-6140 Scaladoc infinite recursion in wiki parser
| * | | | | SI-6140 Scaladoc infinite recursion in wiki parserVlad Ureche2012-07-252-0/+19
| |/ / / / | | | | | | | | | | | | | | | introduced by dc70d1b7.
* | | | | Merge pull request #988 from paulp/issue/4560Josh Suereth2012-07-295-30/+82
|\ \ \ \ \ | | | | | | | | | | | | Issue/4560
| * | | | | SI-4560 - improved testJohannes Rudolph2012-07-243-30/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added all the known cases of failing self-types. Added tests for symbol access (SI-4601) as well which should now be fixed for all of the same cases as well.
| * | | | | Fix SI-4560, NoSuchMethodErrors involving self types.Paul Phillips2012-07-242-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following this commit are reversions of three prior commits which introduced difficulties of their own, plus extra tests for this issue and SI-4601, all of which I pinched from jrudolph. Maybe there was a good reason for some of the complicated code related to this ticket. I took the naive position that if we avoided generating a method call to a particular receiver if the receiver has no such method, we would encounter fewer NoSuchMethodErrors. I would believe one can construct a scenario which this doesn't handle correctly, but it's hard to believe this isn't a big improvement. Review by @jrudolph, @odersky.
* | | | | | Merge pull request #1002 from magarciaEPFL/fixes210Paul Phillips2012-07-283-0/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6142: warn @inline-methods ending up not inlined (rightfully or not)
| * | | | | | SI-6142: warn @inline-methods ending up not inlined (rightfully or not)Miguel Garcia2012-07-263-0/+2
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #991 from adriaanm/ticket-5958Paul Phillips2012-07-281-0/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-5958 This deserves a stable type
| * | | | | | SI-5958 This deserves a stable typeAdriaan Moors2012-07-261-0/+15
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `this` (or the self variable) passed as an actual argument to a method should receive a singleton type when computing the method's resultType this is necessary if the method's type depends on that argument
* | | | / / Closed 6029 ...Martin Odersky2012-07-281-0/+3
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | ... in a less nice way than I would like. Essentially, we mask type errors at later stages that arise from comparing existentials and skolems because we know that they are not tracked correctly through all tree transformations. Never mind that all these types are going erased anyway shortly afterwards. It does not smell nice. But as I write in the comment, maybe the best way out is to avoid skolems altogether. Such a change by far exceeds the scope of this pull request however.
* | | | | Improve unchecked warnings a lot.Paul Phillips2012-07-276-6/+116
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't warn on "uncheckable" type patterns if they can be statically guaranteed, regardless of their runtime checkability. This covers patterns like Seq[Any] and lots more. Review by @adriaanm.
* | | | Merge pull request #976 from adriaanm/ticket-4440bAdriaan Moors2012-07-253-0/+33
|\ \ \ \ | |/ / / |/| | | SI-4440 workaround: avoid outer accessor that'll vanish
| * | | SI-4440 workaround: avoid outer accessor that'll vanishAdriaan Moors2012-07-233-0/+33
| |/ / | | | | | | | | | | | | | | | outer accessors of final classes are dropped in constructors apply some foresight in explicit outer and replace those doomed outer checks by `true` (since this is unfortunate, we generate an unchecked warning)
* | | Merge pull request #966 from paulp/issue/6117Adriaan Moors2012-07-241-0/+19
|\ \ \ | | | | | | | | SI-6117 regression involving import ambiguity.
| * | | Fix SI-6117, regression involving import ambiguity.Paul Phillips2012-07-211-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today I learned that foo.member("bar") != foo.member("bar") if bar is overloaded, because each lookup of an overloaded member creates a new symbol (with equivalent OverloadedTypes.) How should symbols be compared so these do not appear unequal? Is there a method which unpacks the alternatives and compares them individually? It seems likely there are additional bugs which arise from not covering this case. Since this bug is in the context of importing, if the prefixes are identical then I can compare the names instead of the symbols and this issue goes away. But for the rest of the time during which one might encounter overloaded symbols, that would be a very lossy operation, since the overloaded symbol might be encoding any subset of the members with that name. There are lots of references to "OverloadedSymbol" in the comments of various methods in Types, but no such class is visible in the history. If we had such a thing, we could refine its equals method to recognize equivalent overloads. Review by @odersky.
* | | | Merge pull request #974 from adriaanm/repull-unchecked-hkAdriaan Moors2012-07-244-1/+29
|\ \ \ \ | | | | | | | | | | Improve unchecked warnings.
| * | | | Improve unchecked warnings.Paul Phillips2012-07-234-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Spurious test was not good. Better test avoids suppressing some legitimate warnings. Review by @moors.
* | | | | Merge pull request #979 from adriaanm/ticket-6111Adriaan Moors2012-07-244-8/+30
|\ \ \ \ \ | |_|_|_|/ |/| | | | SI-6111 accept single-subpattern unapply pattern
| * | | | SI-6111 accept single-subpattern unapply patternAdriaan Moors2012-07-234-8/+30
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An extractor pattern `X(p)` should type check for any `X.unapply`/`X.unapplySeq` that returns an `Option[_]` -- previously we were confused about the case where it was an `Option[(T1, ... , Tn)]`. In this case, the expected type for the pattern `p` is simply `(T1, ... , Tn)`. While I was at it, tried to clean up unapplyTypeList and friends (by replacing them by extractorFormalTypes). From the spec: 8.1.8 ExtractorPatterns An extractor pattern x(p1, ..., pn) where n ≥ 0 is of the same syntactic form as a constructor pattern. However, instead of a case class, the stable identifier x denotes an object which has a member method named unapply or unapplySeq that matches the pattern. An unapply method in an object x matches the pattern x(p1, ..., pn) if it takes exactly one argument and one of the following applies: n = 0 and unapply’s result type is Boolean. n = 1 and unapply’s result type is Option[T], for some type T. the (only) argument pattern p1 is typed in turn with expected type T n > 1 and unapply’s result type is Option[(T1, ..., Tn)], for some types T1, ..., Tn. the argument patterns p1, ..., pn are typed in turn with expected types T1, ..., Tn
* / | | SI-4881 infer variance from formals, then resultMartin Odersky2012-07-232-4/+32
|/ / / | | | | | | | | | | | | | | | | | | | | | Changed behavior so that when determining the target variance of a method parameter, the variance in formals comes first. If variance is still undecided by that, the variance in the result type is used as a secondary criterion. (This is also done when determining prototype type params.)
* | | Merge pull request #964 from odersky/ticket/6090Adriaan Moors2012-07-231-0/+6
|\ \ \ | |/ / |/| | SI-6090 correct rewriting of overloaded value class ==
| * | SI-6090Martin Odersky2012-07-211-0/+6
| | | | | | | | | | | | Sharpens the test so that only Object_== and Object_!= methods on valueclasses may be rewritten in posterasure, whereas user-defined methods are not rewritten.
* | | SI-6089 test file for pt2Adriaan Moors2012-07-221-0/+18
| |/ |/| | | | | test that matchEnd that's an argument of || that's in tail position is in tail position
* | Merge pull request #958 from adriaanm/ticket-1832Josh Suereth2012-07-211-0/+8
|\ \ | |/ |/| SI-1832 consistent symbols in casedef's pattern&body
| * SI-1832 consistent symbols in casedef's pattern&bodyAdriaan Moors2012-07-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the only change to typedBind in this commit (beyond refactoring to keep my eyes from bleeding), is explained by the added comment: have to imperatively set the symbol for this bind to keep it in sync with the symbols used in the body of a case when type checking a case we imperatively update the symbols in the body of the case those symbols are bound by the symbols in the Binds in the pattern of the case, so, if we set the symbols in the case body, but not in the patterns, then re-type check the casedef (for a second try in typedApply for example -- SI-1832), we are no longer in sync: the body has symbols set that do not appear in the patterns since body1 is not necessarily equal to body, we must return a copied tree, but we must still mutate the original bind
* | Merge pull request #954 from odersky/optimize/outerAdriaan Moors2012-07-201-0/+26
|\ \ | | | | | | Removes redundant outers
| * | Removes redundant outersMartin Odersky2012-07-201-0/+26
| | | | | | | | | | | | | | | | | | Widens the criterion when outer fields can be omitted. It used to be that sub- and superclass had to be enclosed by the same outer class. Only in that case was the outer field of the class omitted. We now omit if subclass is contained in an outer class that is itself a subclass of the superclasses outer class. See test case "outertest.scala" for an example.
* | | Merge pull request #924 from hubertp/2.10.x-issue/5385Adriaan Moors2012-07-205-4/+34
|\ \ \ | | | | | | | | Fix for SI-5385.
| * | | Fix for SI-5385.Paul Phillips2012-07-175-4/+34
| | | | | | | | | | | | | | | | | | | | Nodes which hit EOF with no whitespace afterward had wrong position.