summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* removes extraneous methods from api.StandardNamesEugene Burmako2012-10-041-2/+0
| | | | | nme.ROOT doesn't have much use in the public API (unlike nme.ROOTPKG). tpnme.EMPTY duplicates a method inherited from the base class.
* removes extraneous methods from api.StandardDefinitionsEugene Burmako2012-10-041-11/+0
| | | | Never got to use these guys, so let's better remove them.
* removes extraneous methods from api.TreesEugene Burmako2012-10-031-3/+0
| | | | Tree.hasSymbol is really too much to document for its merit.
* hides internal methods of api.PrintersEugene Burmako2012-10-031-3/+3
|
* removes extraneous methods from api.MirrorsEugene Burmako2012-10-032-41/+1
| | | | | We decided to give up on providing symbol table traversal facilities in the current incarnation of mirrors. Let's be consistent with ourselves.
* removes extraneous methods from api.ScopesEugene Burmako2012-10-031-10/+4
| | | | It's been more than a year, and I never used these methods.
* removes extraneous indirection from FlagValuesEugene Burmako2012-10-032-5/+1
| | | | We don't really need that abstract type.
* removes extraneous methods from api.ConstantsEugene Burmako2012-10-031-3/+0
| | | | The next round of scaladoc-driven cleanup kicks in.
* removes EmptyTermName and EmptyTypeNameEugene Burmako2012-10-033-11/+3
| | | | We have nme.EMPTY and tpnme.EMPTY for that.
* renames macros.ReificationError to ReificationExceptionEugene Burmako2012-10-037-25/+33
| | | | | And again, this is not a fatal error, so it should end with an Error, and it should subclass not Throwable, but Exception.
* renames macros.TypeError to TypecheckExceptionEugene Burmako2012-10-033-23/+19
| | | | | | | | | Again, this is not a fatal error, so it should end with an Error, and it should subclass not Throwable, but Exception. Also moved the exception outside the cake to simplify error handling, along the same lines of what've been done for parsing and reification exceptions.
* renames macros.ParseError to ParseExceptionEugene Burmako2012-10-032-3/+4
| | | | Because it's not a fatal error. Neither it should subclass Throwable.
* turns on documentation of scala.reflect.runtimeEugene Burmako2012-10-039-11/+11
| | | | | | | | We definitely need to document scala.reflect.runtime.universe, therefore adding scala.reflect.runtime to skipPackages was a mistake. But then we need to make a bunch of internal classes private to reflect or to scala. Not very pretty, but it works.
* Merge pull request #1443 from gkossakowski/anyval-restrictionsGrzegorz Kossakowski2012-10-033-26/+69
|\ | | | | AnyVal/value classes restrictions
| * Put more implementation restrictions on value classes.Grzegorz Kossakowski2012-10-031-10/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nested objects, classes and lazy vals are disallowed at any nesting level in value classes; e.g. lazy vals local to a method defined in a value class. There are still allowed in universal traits. This is a temporary, implementation restriction that is planned to be addressed in future releases of Scala. Error messages has been updated to communicate that intent. Moved tests for SI-5582 and SI-6408 to pending folder. They have to stay there until implementation restrictions are addressed. Closes SI-6408 and SI-6432. Review by @odersky, @harrah and @adriaanm.
| * Fixed problem in SI-6408Martin Odersky2012-10-031-1/+2
| | | | | | | | Fixed problem reported in comment, where inner classes of value classe caused a compiler crash.
| * Revised restrictions for value classes and unversal traitsMartin Odersky2012-10-032-25/+29
| | | | | | | | | | | | | | | | | | and brought compiler in line with them. One thing we can accept IMO are nested classes (nested objects are still a problem). In fact, it makes no sense to exclude nested classes from value classes but not from universal traits. A class nested in universal trait will becomes a class nested in a value class by inheritance. Note that the reflection library already contains a universal trait with a nested class (IndexedSeqLike), so we should accept them if we can.
* | Merge pull request #1446 from retronym/ticket/6436-2Grzegorz Kossakowski2012-10-031-1/+1
|\ \ | | | | | | SI-6436 Handle ambiguous string processors
| * | SI-6436 Handle ambiguous string processorsJason Zaugg2012-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Before, we got in an inifinite loop by chasing the error typed result of adaptToMemberWithArgs. One point of befuddlement remains: why did t6436 and t6436b behave differently before this change?
* | | Merge pull request #1439 from scalamacros/topic/reflective-uniquesJosh Suereth2012-10-021-1/+2
|\ \ \ | |_|/ |/| | fixes a bug in a weak cache in runtime reflection
| * | fixes a bug in a weak cache in runtime reflectionEugene Burmako2012-10-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Entries in SynchronizedTypes.uniques could previously be garbage collected in-between a successful call to contains and an actual cache lookup. The patch could be a one-liner, but I don't want to use HOFs in this function, whose prototype is a hotspot in the compiler. Also the fix doesn't touch scalac in any way. It only applies to reflective universes that provide runtime reflection functionality.
* | | Merge pull request #1434 from jsuereth/fix/SI-6449Grzegorz Kossakowski2012-10-022-5/+5
|\ \ \ | | | | | | | | Fixes deprecation annotations for 2.10.0
| * | | Fixes deprecation annotations for 2.10.0Josh Suereth2012-09-303-7/+7
| | |/ | |/|
* | | Merge pull request #1440 from VladUreche/issue/language-docGrzegorz Kossakowski2012-10-024-27/+77
|\ \ \ | | | | | | | | Improved the `scala.language` documentation
| * | | Improved the `scala.language` documentationVlad Ureche2012-10-024-27/+77
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Also corrected the links in the library rootdoc. **Note: We need to fast track this commit so it reaches master in the next 12 hours, before we generate the next nightly docs.** Review by @odersky
* | | Merge pull request #1425 from phaller/issue/6442Grzegorz Kossakowski2012-10-023-42/+61
|\ \ \ | |/ / |/| | SI-6442 - Add ActorDSL object for actor migration kit
| * | SI-6442 - Add ActorDSL object for actor migration kitphaller2012-09-293-42/+61
| |/ | | | | | | Removes MigrationSystem, since ActorDSL replaces it.
* | Merge pull request #1435 from paulp/stringcontext-docPaul Phillips2012-10-011-6/+6
|\ \ | | | | | | Fix StringContext documentation.
| * | Fix StringContext documentation.Paul Phillips2012-10-011-6/+6
| |/ | | | | | | | | It doesn't call "new", as I discovered after some head scratching.
* | Merge pull request #1428 from paulp/issue/6311Paul Phillips2012-10-011-13/+2
|\ \ | | | | | | Issue/6311
| * | Revert "SI-4881 infer variance from formals, then result"Paul Phillips2012-09-291-13/+2
| |/ | | | | | | This reverts commit 5c5e8d4dcd151a6e2bf9e7c259c618b9b4eff00f.
* | Merge pull request #1424 from soc/SI-6449Paul Phillips2012-10-0113-15/+15
|\ \ | |/ |/| SI-6449 Adds version arg to @deprecated usages (non-compiler sources)
| * Fix incomplete version strings (2.10 -> 2.10.0)Simon Ochsenreither2012-09-2910-11/+11
| |
| * SI-6449 Adds version arg to @deprecated usages (non-compiler sources)Simon Ochsenreither2012-09-293-4/+4
| |
* | Merge remote-tracking branch 'scala/2.10.x' into 2.10.0-wipGrzegorz Kossakowski2012-09-2922-181/+651
|\ \ | |/ |/|
| * Merge pull request #1415 from scalamacros/is-value-typeEugene Burmako2012-09-284-11/+125
| |\ | | | | | | a fork of isValueType and isNonValueType
| | * fully initializes symbols on `typeSignature`Eugene Burmako2012-09-281-2/+2
| | | | | | | | | | | | | | | | | | only affects runtime reflection, because Symbol.typeSignature is only defined in the reflection API. the rest of the compiler uses Symbol.info instead.
| | * Implementations of isValueType and isNonValueType.Paul Phillips2012-09-282-12/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restrictions regarding how non-value types can be used have generally not been enforced explicitly, depending instead on the fact that the compiler wouldn't attempt to use them in strange ways like offering a method type as a type argument. Since users can now create most types from scratch, it has become important to enforce the restrictions in a more direct fashion. This was a lot harder than it probably should have been because there are so many types which go unmentioned by the specification. Hopefully a useful exercise in any case.
| | * SI-6417 correctly reifies non-value typesEugene Burmako2012-09-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're reifying non-value types (e.g. MethodTypes), we can't use them as type arguments for TypeTag/WeakTypeTag factory methods, otherwise the macro expansion won't typecheck: http://groups.google.com/group/scala-internals/browse_thread/thread/2d7bb85bfcdb2e2 This situation is impossible if one uses only reify and type tags, but c.reifyTree and c.reifyType exposes in the macro API let anyone feed anything into the reifier. Therefore I now check the tpe that is about to be used in TypeApply wrapping TypeTag/WeakTypeTag factory methods and replace it with AnyTpe if it doesn't fit.
| | * showRaw no longer crashes on NoSymbolEugene Burmako2012-09-281-1/+2
| | |
| * | Merge pull request #1395 from odersky/topic/valueclass-cleanupGrzegorz Kossakowski2012-09-281-1/+1
| |\ \ | | | | | | | | Removes discrepancy between SIP 15 and compiler
| | * | Removes discrepancy between SIP 15 and compilerMartin Odersky2012-09-251-1/+1
| | | | | | | | | | | | | | | | There was a discrepancy in that the compiler alternatively accepts a val parameter or an unbox method for a value class but SIP 15 does not mention the unbox method. I commented out the line in the compiler that does it.
| * | | Merge pull request #1347 from soc/SI-6380Grzegorz Kossakowski2012-09-285-15/+30
| |\ \ \ | | |_|/ | |/| | SI-6380 Add @throws[Exception]
| | * | SI-6380 #1 Add @throws[Exception]Simon Ochsenreither2012-09-215-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows an additional notation of the @throws annotation: Old-style: @throws(classOf[Exception]) New-style: @throws[Exception] The optional String argument moves @throws in line with @deprecated, @migration, etc. and prevents confusion caused by the default inheritance of ScalaDoc comments and the non-inheritance of annotations. Before: /** This method does ... * @throws IllegalArgumentException if `a` is less than 0. */ @throws(classOf[IllegalArgumentException]) def foo(a: Int) = ... Now: /** This method does ... */ @throws[IllegalArgumentException]("if `a` is less than 0") def foo(a: Int) = ... ScalaDoc @throws tags remain supported for cases where documentation of thrown exceptions is needed, but are not supposed to be added to the exception attribute of the class file. In this commit the necessary compiler support is added. The code to extract exceptions from annotations is now shared instead of being duplicated all over the place. The change is completely source and binary compatible, except that the code is now enforcing that the type thrown is a subtype of Throwable as mandated by the JVM spec instead of allowing something like @throws(classOf[String]). Not in this commit: - ScalaDoc support to add the String argument to ScalaDoc's exception list - Adaption of the library
| * | | Merge pull request #1399 from paulp/210-uncheckedGrzegorz Kossakowski2012-09-2810-123/+337
| |\ \ \ | | | | | | | | | | Much better unchecked warnings.
| | * | | Added logic and tests for unchecked refinements.Paul Phillips2012-09-271-4/+20
| | | | |
| | * | | Moved isNonRefinementClassType somewhere logical.Paul Phillips2012-09-272-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | It's not Typer's personal method. All should be able to drink of its wisdom.
| | * | | Nailed down the "impossible match" logic.Paul Phillips2012-09-271-28/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I will again defer to a comment. /** Given classes A and B, can it be shown that nothing which is * an A will ever be a subclass of something which is a B? This * entails not only showing that !(A isSubClass B) but that the * same is true of all their subclasses. Restated for symmetry: * the same value cannot be a member of both A and B. * * 1) A must not be a subclass of B, nor B of A (the trivial check) * 2) One of A or B must be completely knowable (see isKnowable) * 3) Assuming A is knowable, the proposition is true if * !(A' isSubClass B) for all A', where A' is a subclass of A. * * Due to symmetry, the last condition applies as well in reverse. */
| | * | | Restored warning for impossible type tests.Paul Phillips2012-09-261-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I had this in before, then removed it since it is sometimes redundant with an error message later issued by the pattern matcher (e.g. scrutinee is incompatible with pattern type.) However it also catches a lot of cases which are not errors, so I think the modest redundancy is tolerable for now. I also enhanced the logic for recognizing impossible type tests, taking sealedness into account.
| | * | | Annotate non local returns with @unchecked.Paul Phillips2012-09-262-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Newly available @unchecked annotation enables removing the special case from the unchecked logic.