| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And the same for !=
If we tried to declare these signatures in non-fictional classes,
we would be chastised about collapsing into the "same signature after
erasure".
This will have an influence of typing, as the typechecking of
arguments is sensitive to overloading: if multiple variants are
feasible, the argument will be typechecked with a wildcard expected
type. So people inspecting the types of the arguments to `==` before
this change might have seen an interesting type for
`if (true) x else y`, but now the `If` will have type `Any`, as we
don't need to calculate the LUB.
I've left a TODO to note that we should really make `Any#{==, !=}`
non-final and include a final override in `AnyVal`. But I don't think
that is particularly urgent.
|
|
|
|
|
| |
Adds a new marker /*_*/ to trigger scope completion test.
Original type completion test oracles update for the tweaked output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So that they aren't offered as an autocomplete suggestion:
implicit class Shouty(string: String) extends AnyVal {
def SHOUT_! = string.toUpperCase + "!"
}
"". // autocompletion offers `.string` here
The original incarnation of value classes didn't allow this
sort of encapsulation, so we either invented goofy names like
`__thingToAdd` or just picked `x` or `self`. But SI-7859 has
delivered us the freedom to keep the accessor private.
Should we keep any of these accessors around in a deprecated
form?
The implicit classes in Predef were added in 2.11.0-M2
(c26a8db067e4f), so they are okay.
I think we can make reason that these APIs were both accidental
and unlikely to be interpreted as public, so we can break them
immediately.
scala> Left(1).x
res0: scala.util.Either[Int,Int] = Left(1)
scala> import concurrent.duration._
import concurrent.duration._
scala> 1.n
res1: Int = 1
|
|
|
|
|
|
|
|
|
|
|
| |
The nondeterminism presently showing itself in
presentation/implicit-member is a consequence of the
presentation compiler tests relying on details of the
behavior of toString calls. We need to stomp this out,
but it will take a while. Based on the check file
changes enclosed with this commit, this will suffice
for the presentation compiler tests. A broader assault
will have to take place, but not yet.
|
|
|
|
|
|
| |
I resisted the urge to fix "aksTypeCompletion" for as long
as I possibly could. While I was there I threw in what seem
to be like significant output improvements, but you tell me.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Deprecates much of Predef and scala.Console, especially:
- the read* methods (see below)
- the set{Out,Err,In} methods (see SI-4793)
2) Removed long-deprecated:
- Predef#exit
- Predef#error should have gone, but could not due to sbt
At least the whole source base has now been future-proofed
against the eventual removal of Predef#error.
The low justification for the read* methods should be readily
apparent: they are little used and have no call to be in global
namespace, especially given their weird ad hoc semantics and
unreasonably tempting names such as readBoolean().
3) Segregated the deprecated elements in Predef from the part
which still thrives.
4) Converted all the standard Predef implicits into implicit
classes, value classes where possible:
- ArrowAssoc, Ensuring, StringFormat, StringAdd, RichException (value)
- SeqCharSequence, ArrayCharSequence (non-value)
Non-implicit deprecated stubs prop up the names of the
formerly converting methods.
|
| |
|
|
|
|
|
| |
Wasn't me this time (I don't think!) Mr. Robot can't get
here too soon for me.
|
|
|
|
| |
Removed some unneeded indirection in the testing framework.
|
|
|
|
|
| |
Wow, ten tests, that's unexpected. No review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Important note for busy commit log skimmers ***
Symbol method "fullName" has been trying to serve the dual role of "how
to print a symbol" and "how to find a class file." It cannot serve both
these roles simultaneously, primarily because of package objects but
other little things as well. Since in the majority of situations we want
the one which corresponds to the idealized scala world, not the grubby
bytecode, I went with that for fullName. When you require the path to a
class (e.g. you are calling Class.forName) you should use javaClassName.
package foo { package object bar { class Bippy } }
If sym is Bippy's symbol, then
sym.fullName == foo.bar.Bippy
sym.javaClassName == foo.bar.package.Bippy
*** End important note ***
There are many situations where we (until now) forewent revealing
everything we knew about a type mismatch. For instance, this isn't very
helpful of scalac (at least in those more common cases where you didn't
define type X on the previous repl line.)
scala> type X = Int
defined type alias X
scala> def f(x: X): Byte = x
<console>:8: error: type mismatch;
found : X
required: Byte
def f(x: X): Byte = x
^
Now it says:
found : X
(which expands to) Int
required: Byte
def f(x: X): Byte = x
^
In addition I rearchitected a number of methods involving:
- finding a symbol's owner
- calculating a symbol's name
- determining whether to print a prefix
No review.
|
| |
|
|
Major rewrite of the testing infrastructure for the presentation
compiler. Added several new tests that will be part of the nightly
build. Once the move to SBT is completed I will look into how to extract
the test infrastructure (as it should really not be living in the
compiler codebase). Review by dragos
|