summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* miscellaneous refinements of reflection APIEugene Burmako2012-08-0215-101/+239
| | | | | | | 1) Removed unnecessary (i.e. implementable with pattern matching) type APIs. 2) Renamed isHigherKinded to takesTypeArgs making it easier to understand. 2) typeParams and resultType have been moved from MethodType to MethodSymbol Strictly speaking they are superfluous, but they are used very often.
* navigation between fields and accessorsEugene Burmako2012-08-025-1/+36
| | | | | | This works around SI-5736 that's been deemed too risky to be fixed in 2.10.0. A reflection newbie will be unlikely to acquire a field symbol from its name, but the `accessed` method provides an easy way to navigate to it from a getter.
* moves most of symbol tests in API to descendantsEugene Burmako2012-08-021-73/+61
| | | | Things like tpe.member("foo").isSkolem don't make much sense.
* simplifies flag APIEugene Burmako2012-08-028-42/+14
| | | | | | | | Flag ops now only include | and hasFlag, flag bearer ops now only include flags and hasFlag. These abstractions are enough to implement everything else, so let's stick to them for the sake of minimalism.
* SI-5732 members and derivatives now return ScopeEugene Burmako2012-08-0221-121/+178
| | | | | | | | | | | | | Firstly this unifies the reflection API - now both decls and members return Scope (not Scope and List[Symbol] as it were before). Secondly this fixes SI-5732 without having to sort the result of members. Type.members now returns Scope, a distinguished type, which has the `sorted` method, which does the required sorting if necessary. Also removes nonPrivateMembers and nonPrivateDeclarations to keep the API minimalistic (as can be seen from their implementation in internal.Types they are just members and decls with bridges and private members removed).
* Merge pull request #1030 from scalamacros/ticket/5751Josh Suereth2012-08-029-113/+153
|\ | | | | SI-5751 cleans up toolboxes for the release
| * SI-5751 cleans up toolboxes for the releaseEugene Burmako2012-07-319-113/+153
| | | | | | | | | | | | | | | | Removes the `freeTypes` parameters on `typeCheckExpr` and `runExpr`, since we now have public `substituteTypes` on both trees and types. Also implements long-awaited `inferImplicitValue` and `inferImplicitView` (thanks to Miles Sabin for nudging me!)
* | Merge pull request #1032 from hubertp/issue/asm-long-signaturesJosh Suereth2012-08-011-2/+7
|\ \ | | | | | | I actually managed to hit the limit of Scala signature annotation not fi...
| * | I actually managed to hit the limit of Scala signature annotation not ↵Hubert Plociniczak2012-07-311-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | fitting into a single string (high five everyone) and entered the undisovered region of arrEncode in GenASM. arrEncode returns Array[String] so asm.AnnotationWriter is not going to like it. Already discussed with @magarciaEPFL but please review again.
* | | Merge pull request #1029 from odersky/ide/getlinkposJosh Suereth2012-08-011-4/+15
|\ \ \ | |/ / |/| | Added more variants to achieve getLinkPos
| * | Added more variants to achieve getLinkPosMartin Odersky2012-07-311-4/+15
| |/ | | | | | | getLinkPos is known to be flakey. This commit tries some variants and logs what failed.
* | Merge pull request #1024 from paulp/topic/type-printingJosh Suereth2012-07-312-12/+18
|\ \ | |/ |/| Fixed maddening "..." lately in printed types.
| * Checkfile update.Paul Phillips2012-07-301-10/+10
| | | | | | | | | | | | I screwed around with type printing for a long time and now I have to be done, so I suggest we accept the imperfection in here for now because it's still way ahead of "..." as types go.
| * Fixed maddening "..." lately in printed types.Paul Phillips2012-07-301-2/+8
| | | | | | | | | | | | This must have been me when I eliminated some of the remaining distinction between TypeRef(_, moduleClass, Nil) and SingleType(_, moduleClass). Sorry I didn't track it down sooner. Review by anyone who is around because this is overdue.
* | Merge pull request #1020 from odersky/ticket/5866Josh Suereth2012-07-303-2/+23
|\ \ | | | | | | SI-5866 Support casting null to value classes
| * | SI-5866 Support casting null to value classesMartin Odersky2012-07-303-2/+23
| | | | | | | | | | | | 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-302-32/+37
|\ \ \ | | | | | | | | ClassTag.Nothing now throws an exception
| * | | ClassTag.Nothing now throws an exceptionEugene Burmako2012-07-302-32/+37
| |/ / | | | | | | | | | | | | 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-308-5/+28
|\ \ \ | | | | | | | | 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-308-5/+28
| |/ / | | | | | | | | | | | | | | | | | | 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-305-0/+41
|\ \ \ | | | | | | | | Closes SI-5882
| * | | SI-5799 Secondary constructors in value classes not allowedMartin Odersky2012-07-293-2/+18
| | | | | | | | | | | | | | | | I changed the SIP and added a test.
| * | | Closes SI-5882Martin Odersky2012-07-283-1/+26
| | | | | | | | | | | | | | | | 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-302-1/+8
|\ \ \ \ | | | | | | | | | | SI-2038 make pt fully-defined when typing Typed
| * | | | SI-2038 make pt fully-defined when typing TypedAdriaan Moors2012-07-232-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3011-647/+0
|\ \ \ \ \ | | | | | | | | | | | | Remove resolveOverloaded
| * | | | | Removed resolveOverloadedclhodapp2012-07-3011-647/+0
| | |_|_|/ | |/| | | | | | | | | | | | | It was decided to remove it until the next release
* | | | | Merge pull request #1015 from hubertp/2.10.x-issue/5603Josh Suereth2012-07-305-39/+107
|\ \ \ \ \ | |/ / / / |/| | | | Fixed SI-5603. Early definitions now get transparent positions.
| * | | | Fixed SI-5603. Early definitions now get transparent positions.Hubert Plociniczak2012-07-305-39/+107
| | |_|/ | |/| | | | | | | | | | | | | | | | | | 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 #998 from odersky/topic/bootpackagesJosh Suereth2012-07-301-1/+13
|\ \ \ \ | | | | | | | | | | Avoids loading scala.package and scala.reflect.package from source if a ...
| * | | | Avoids loading scala.package and scala.reflect.package from source if a ↵Martin Odersky2012-07-261-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | classfile exists. We know that loading these packages from source leads to compilation errors. To reproduce: Update scala.reflect.package, make sure it is on the source path and recompile anything using it. You will get a number of errors having to do with ClassTags and macro expansions. With the patch, these errors go away because the package is not loaded as long as a classfile exists.
* | | | | Merge pull request #1013 from odersky/ticket/5878odersky2012-07-303-2/+30
|\ \ \ \ \ | | | | | | | | | | | | Closes SI-5878
| * | | | | Closes SI-5878Martin Odersky2012-07-293-2/+30
| | |_|_|/ | |/| | | | | | | | | | | | | 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-3012-72/+266
|\ \ \ \ \ | |_|_|/ / |/| | | | IDE improvements, with particular focus on making worksheets work.
| * | | | New Worksheet mixing schemeMartin Odersky2012-07-275-100/+196
| | | | | | | | | | | | | | | | | | | | Debug changes
| * | | | Raw string interpolatorMartin Odersky2012-07-273-4/+24
| | | | | | | | | | | | | | | | | | | | Adds a raw string interpolator raw"..." which does not do any escape sequence processing.
| * | | | Adds method askForResponseMartin Odersky2012-07-273-2/+31
| | | | | | | | | | | | | | | | | | | | Adds method askForResponse which returns a response immediately instead of waiting for a result. That way, one can wait for an ask's result using a timeout.
| * | | | Disable interrupts during code instrumentationMartin Odersky2012-07-271-4/+8
| | | | | | | | | | | | | | | | | | | | Code instrumentation needs to see a consistent snapshot of a source file. To achieve that we disable interrupts during getInstrumented.
| * | | | New Executor.Martin Odersky2012-07-273-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To try it out: run "instrument worksheet" as usual in the REPL. Worksheet needs to have enclosing object definition. Say it is named "Obj". This will generate a file Obj$instrumented. You can compile that file separately and run it using Java. It should reproduce itself.
* | | | | Merge pull request #997 from dragos/ide/range-positions-in-script-sourcesJosh Suereth2012-07-291-1/+1
|\ \ \ \ \ | | | | | | | | | | | | `ScriptSourceFile` should not hard-code `OffsetPosition`.
| * | | | | `ScriptSourceFile` should not hard-code `OffsetPosition`.Iulian Dragos2012-07-261-1/+1
| | |_|/ / | |/| | | | | | | | | | | | | The presentation compiler should support script source files as well, but it needs range positions. This commit fixes an oversight when `RangePosition` was introduced.
* | | | | Merge pull request #996 from gkossakowski/instrumentation-fixesJosh Suereth2012-07-295-3/+35
|\ \ \ \ \ | | | | | | | | | | | | Partest instrumentation fixes
| * | | | | Fix `Instrumentation.getStatistics` method in partest.Grzegorz Kossakowski2012-07-262-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation was wrong because it would always enable profiling after call to `Instrumenation.getStatistics` method. Now we are checking the profiling status and enable it again only when it was enabled before. Review by @phaller.
| * | | | | Instrument all classes in `instrumented` package.Grzegorz Kossakowski2012-07-263-1/+23
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-293-1/+20
|\ \ \ \ \ | | | | | | | | | | | | SI-6140 Scaladoc infinite recursion in wiki parser
| * | | | | SI-6140 Scaladoc infinite recursion in wiki parserVlad Ureche2012-07-253-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | introduced by dc70d1b7.
* | | | | | Merge pull request #988 from paulp/issue/4560Josh Suereth2012-07-299-73/+115
|\ \ \ \ \ \ | | | | | | | | | | | | | | 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.
| * | | | | | Revert "tentative fix for RC5 lift build problem."Johannes Rudolph2012-07-242-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cb4fd65825f3c88908103e48d0d7e89d70d26c22. Conflicts: src/compiler/scala/tools/nsc/symtab/Types.scala src/compiler/scala/tools/nsc/typechecker/Contexts.scala
| * | | | | | Revert "Closes #4560. Review by dragos." (introduction of safeREF)Johannes Rudolph2012-07-241-32/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 124cf3f9cbdc582a432c13edd229ba9b8726b99f. Conflicts: src/compiler/scala/tools/nsc/transform/CleanUp.scala