| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
As discussed in #999, #1025 and
https://groups.google.com/forum/?hl=en&fromgroups#!topic/scala-internals/5P5TS9ZWe_w
instrumented.jar is generated from the current source, there's no need
for a bootstrap commit.
Review by @paulp.
|
|\
| |
| | |
SI-6063, SI-4945 and restore :warnings in the REPL
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As seen here.
scala> class A { @deprecated("foo") def a = 1 }
warning: there were 1 deprecation warnings; re-run with -deprecation for details
defined class A
scala> :warnings
<console>:7: warning: @deprecated now takes two arguments; see the scaladoc.
class A { @deprecated("foo") def a = 1 }
^
scala> val x = 5 toString
warning: there were 1 feature warnings; re-run with -feature for details
x: String = 5
scala> :warnings
<console>:7: warning: postfix operator toString should be enabled
by making the implicit value language.postfixOps visible.
This can be achieved by adding the import clause 'import language.postfixOps'
or by setting the compiler option -language:postfixOps.
See the Scala docs for value scala.language.postfixOps for a discussion
why the feature should be explicitly enabled.
val x = 5 toString
^
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Other breakage had accumulated among Settings. I determined
that once upon a time, "MultiStringSetting" accepted arguments
like this:
scala -foo bip bop bar
Somewhere this was changed to force a : argument, like
scala -foo:bip,bop,bar
This incurs breakage. The repl has always advertised its -i
option without a colon and it has always been a MultiStringSetting.
Forcing everything into the : seemed like the wrong thing,
especially because it will stomp on any whitespace containing
arguments, whereas in the original form
scala -foo bip "bop bar" baz
will yield its arguments as given.
So lacking any good ideas and knowing something probably depends
on each way already, I made it work both ways.
|
| |
| |
| |
| | |
Have to rule out access boundaries as well as private/protected.
|
|\ \
| |/
|/| |
SI-6102 Wrong bytecode in lazyval + no-op finally clause
|
| | |
|
| | |
|
|\ \
| | |
| | | |
better error messages for Symbol.asXXX methods
|
| | | |
|
|\ \ \
| |_|/
|/| | |
SI-6188
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
compatibility stub for SBT 0.12.0
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As discussed in http://groups.google.com/group/scala-internals/browse_thread/thread/9ee8df2ae9d43169,
recent change of return type for Type.members (from List[Symbol] to Scope)
broke compiler-interface for SBT 0.12.0-final.
This stub (courtesy of Jason Zaugg) keeps reflection API untouched and
also fixes SBT. Win-win.
|
|\ \ \ \
| | | | |
| | | | | |
adds deprecation annotations on manifest incantations
|
| | |_|/
| |/| | |
|
|\ \ \ \
| |_|/ /
|/| | | |
adds more tests for api.Symbols
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I overlooked some of the tests that should be added to the public API.
This commit fixes my mistake. Also see 027b00171c.
To reiterate the reasoning behind introduction of test methods into the API.
I'd argue that the API duplication w.r.t flags is trumped by unified interface
to tests and better encapsulation (especially since some of the flags have
different meaning depending on whether the flaggee is a term or a type).
|
|\ \ \
| |_|/
|/| | |
SI-6175 reflect over classes with symbolic names
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Top-level classes with symbolic names (having binary names like $colon$colon)
have previously been incorrectly treated as local classes by Scala reflection.
As a result they were loaded as if they weren't pickled (i.e. as Java classes).
Moreover this bug also had a more subtle, but more dangerous manifestation.
If such a class has already been loaded indirectly by unpickling another class
(which refers to it in its pickle) and then someone tried to load it explicitly
via classToScala, then it would be loaded twice (once as a Scala artifact and
once as a Java artifact). This is a short route to ambiguities and crashes.
The fix first checks whether a class with a suspicious name (having dollars)
can be loaded as a Scala artifact (by looking it up in a symbol table).
If this fails, the class is then loaded in Java style (as it was done before).
Ambiguous names that can be interpreted both ways (e.g. foo_$colon$colon)
are first resolved as Scala and then as Java. This prioritization cannot lead
to errors, because Scala and Java artifacts with the same name cannot coexist,
therefore loading a Scala artifact won't shadow a homonymous Java artifact.
|
|\ \ \
| | | |
| | | | |
Clear uniques via perRunCaches.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
That lets this huge cache be cleared eagerly after a run
is over rather than lazily when another run begins. This
arrives pre-LGTMed by Important People.
|
|\ \ \ \
| | | | |
| | | | | |
SI-6074 disallow implicit enrichment with constructor
|
| | |_|/
| |/| |
| | | |
| | | |
| | | | |
When selecting a non-accessible constructor, don't infer a view to
something with an accessible constructor.
|
|\ \ \ \
| |_|/ /
|/| | | |
Promote unchecked warnings into being emitted by default.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
To make that viable, suppression of unchecked warnings is now available
on a per-type-argument basis. The @unchecked annotation has hereby been
generalized beyond exhaustiveness to mean context-dependent "disable further
compiler checking on this entity." Example of new usage:
def f(x: Any) = x match {
case xs: List[String @unchecked] => xs.head // no warning
case xs: List[Int] => xs.head // unchecked warning
}
It turns out -unchecked has been put to other noisy uses such as
the pattern matcher complaining about its budget like a careworn spouse.
This actually simplified the path forward: I left -unchecked in place
for that and general compatibility, so those warnings can be enabled
as before with -unchecked. The erasure warnings I turned into regular
warnings, subject to suppression by @unchecked.
Review by @odersky.
|
|\ \ \ \
| | | | |
| | | | | |
Fix for SI-6084, type alias crasher.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
"no need for pt.normalize here, is done in erasure"
ORLY? Review by @adriaanm.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fixes SI-6172.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
All the credit for fixing magical constants in the encoding algorithm goes to @magarciaEPFL.
This time provided a test case that exercises GenASM.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Made worksheet output wrap around after custimizable # of output columns
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We now move instrumentation info to the end of lines where possible so that line and column positions are kept unchanged wrt original source. This is important for error reporting.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
staticTpe => staticType, actualTpe => actualType
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-5764 Honor -language:_
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | | |
We now enable all language feature if -language:_ is given on the command line. Review by @paulp
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-5930 SI-5897 reduce redundant warnings in matches, fix flags usage
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
trying to compromise between
- easy discovery of what special mix of flags identifies a gadt skolem
- ensuring that hasAllFlags is used and not hasFlag
keeping the secret combo close to the creator/detector methods instead of moving them to Flags
ideally, we'd allocate a new bit in Flags, but that's to invasive right now
these symbols are also relatively short-lived:
thet are created in adaptConstrPattern and removed at the end of typedCase
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
the pattern matching analysis should be more precise anyway
(don't warn twice)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
encapsulate creating synthetic case labels while we're at it
|
|\ \ \ \ \ \ \
| |_|_|_|_|_|/
|/| | | | | | |
minor fixes scaladoc
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
Ultimate reflection pull request
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Instead of trying to serialize the entire universe and failing miserably
(which happens now), exprs and type tags will now serialize their creators
and deserialize into scala.reflect.basis.
Since creators produced by reification are not serializable right now,
serialization will crash. That's a small improvement over state of the art
functionality-wise, but it's a step forward robustness-wise.
Next step in this direction is generation of serialization code for creators.
Related issues: SI-5919 and SI-5908. Also see the discussion at scala-internals
http://groups.google.com/group/scala-internals/browse_thread/thread/ef63f8b5bd194c7c
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
reify has just been moved to base.Universe from api.Universe, so the fast track
in the old starr doesn't know about its existence. Therefore locker is built
without reify having the MACRO flag, thus it won't be able to expand reify.
Strictly speaking we don't need a new starr, because reify isn't used in scalac
so, even though locker won't recognize reify, quick will be fine.
However you don't know where a little sloppiness is going to bite you,
so I took time to rebuild and push the new starr.
It was as simple as "ant build starr.done" of the parent commit.
No file mingling was required.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is the first step in supporting serialization for exprs and type tags.
Generally speaking universes and mirrors cannot be serialized (even not taking
into account all the amount of scalac-specific transient stuff, java mirrors
use classloaders, which are not serializable).
Hence we can only serialize tree and type creators, and deserialize them into
the mirror we surely know will be there - the scala.reflect.basis.rootMirror.
To do that we need to have exprs in scala.reflect.base. Luckily all the trees
are already in base, we only need to move a single file to scala-library.jar.
Another good news is that reification logic is simplified, because we don't
have to special case exprs as being defined in ApiUniverseClass.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Removes the stubs left out to appease the old starr, fixes macro tests.
|