| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
nme.ROOT doesn't have much use in the public API (unlike nme.ROOTPKG).
tpnme.EMPTY duplicates a method inherited from the base class.
|
|
|
|
| |
Never got to use these guys, so let's better remove them.
|
|
|
|
| |
Tree.hasSymbol is really too much to document for its merit.
|
| |
|
|
|
|
|
| |
We decided to give up on providing symbol table traversal facilities
in the current incarnation of mirrors. Let's be consistent with ourselves.
|
|
|
|
| |
It's been more than a year, and I never used these methods.
|
|
|
|
| |
We don't really need that abstract type.
|
|
|
|
| |
The next round of scaladoc-driven cleanup kicks in.
|
|
|
|
| |
We have nme.EMPTY and tpnme.EMPTY for that.
|
|
|
|
|
| |
And again, this is not a fatal error, so it should end with an Error,
and it should subclass not Throwable, but Exception.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Because it's not a fatal error. Neither it should subclass Throwable.
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
AnyVal/value classes restrictions
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 reported in comment, where inner classes of value classe caused a compiler crash.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
SI-6436 Handle ambiguous string processors
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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?
|
|\ \ \
| |_|/
|/| | |
fixes a bug in a weak cache in runtime reflection
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
Fixes deprecation annotations for 2.10.0
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
Improved the `scala.language` documentation
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |/ /
|/| | |
SI-6442 - Add ActorDSL object for actor migration kit
|
| |/
| |
| |
| | |
Removes MigrationSystem, since ActorDSL replaces it.
|
|\ \
| | |
| | | |
Fix StringContext documentation.
|
| |/
| |
| |
| |
| | |
It doesn't call "new", as I discovered after some head
scratching.
|
|\ \
| | |
| | | |
Issue/6311
|
| |/
| |
| |
| | |
This reverts commit 5c5e8d4dcd151a6e2bf9e7c259c618b9b4eff00f.
|
|\ \
| |/
|/| |
SI-6449 Adds version arg to @deprecated usages (non-compiler sources)
|
| | |
|
| | |
|
|\ \
| |/
|/| |
|
| |\
| | |
| | | |
a fork of isValueType and isNonValueType
|
| | |
| | |
| | |
| | |
| | |
| | | |
only affects runtime reflection, because Symbol.typeSignature
is only defined in the reflection API. the rest of the compiler
uses Symbol.info instead.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| |\ \
| | | |
| | | | |
Removes discrepancy between SIP 15 and compiler
|
| | | |
| | | |
| | | |
| | | | |
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.
|
| |\ \ \
| | |_|/
| |/| | |
SI-6380 Add @throws[Exception]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \
| | | | |
| | | | | |
Much better unchecked warnings.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It's not Typer's personal method. All should be able to
drink of its wisdom.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
*/
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Newly available @unchecked annotation enables removing the
special case from the unchecked logic.
|