| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fixed up one of the mismatches between how java source is modeled
and how java bytecode is modeled. We should get the rest of them
too. Closes SI-2764.
|
|\ \
| | |
| | |
| | | |
'refs/pull/529/head' into develop
|
| | |
| | |
| | |
| | | |
More details as code comment and in the bug database.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
Prevents the wheels falling off during later compiler phases,
or, worse, during bytecode verification.
Closes SI-4098.
|
|\ \ |
|
| | | |
|
| | |
| | |
| | |
| | | |
They're not traits.
|
| | | |
|
| | |
| | |
| | |
| | | |
If there are no primitives, use the regular boxy one.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If you can't get your hands on something which crashes
scalac - I know, I know - you can try this ready-made crasher.
% cat test/pending/pos/t4717.scala
trait Bounds[@specialized A] {
// okay without `>: A`
def x[B >: A]: Unit = new Bounds[B] {
lazy val it = ??? // def or val okay
it
}
}
% scalac -d /tmp test/pending/pos/t4717.scala
error:
while compiling: test/pending/pos/t4717.scala
during phase: specialize
library version: version 2.10.0-20120510-134429-ce1d68ed19
compiler version: version 2.10.0-20120510-152646-ba4dfd1e63
reconstructed args: -d /tmp
last tree to typer: Select(This(trait Bounds$mcZ$sp), x$mcZ$sp)
symbol: method x$mcZ$sp in trait Bounds$mcZ$sp (flags: override <method> <specialized>)
symbol definition: override def x$mcZ$sp[B >: Boolean](): Unit
tpe: [B >: Boolean]()Unit
symbol owners: method x$mcZ$sp -> trait Bounds$mcZ$sp -> package <empty>
context owners: value it -> anonymous class $anon -> method x$mcZ$sp -> trait Bounds$mcZ$sp -> package <empty>
== Enclosing template or block ==
Block(
Assign(
$anon.this."it "
Apply( // def ???(): Nothing in object Predef, tree.tpe=Nothing
scala.this."Predef"."$qmark$qmark$qmark" // def ???(): Nothing in object Predef, tree.tpe=()Nothing
Nil
)
)
$anon.this."it " // lazy private[this] var it: Nothing, tree.tpe=Nothing
)
== Expanded type of tree ==
PolyType(
typeParams = List(TypeParam(B >: Boolean))
resultType = NullaryMethodType(
resultType = TypeRef(TypeSymbol(final class Unit extends AnyVal))
)
)
// And then the usual stack trace
|
|/ /
| |
| |
| |
| | |
Stuff written during the era of "one symbol table" is
surprised to find two.
|
| | | |
| \ | |
|\ \ \ |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
presentation compiler.
|
| | | |
| | | |
| | | |
| | | | |
No boxing, no MODULE$ indirection.
|
| | | |
| | | |
| | | |
| | | | |
Closes SI-5210.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A hole in the net discovered by retronym makes me put back the
former special casing of module class type inference; there's no
reason to get it wrong. It appears that
TypeRef(pre1, sym1, Nil)
SingleType(pre2, sym2)
are not seen as equivalent if they have different prefixes even
if the prefixes should be equivalent. For now I'm leaving it; in
principle this patch should eventually be reverted after subtyping
and/or the representation of singleton types advances to the point
that it isn't necessary. Closes SI-5777.
|
| | | | | |
| \ \ \ | |
|\ \| | |
| | | | |
| | | | |
| | | | | |
'refs/pull/519/head'; commit 'refs/pull/520/head' into develop
|
| |/ / /
|/| | |
| | | |
| | | | |
expression is a Function0 application
|
| | |/
| |/|
| | |
| | | |
see 9f9932bd20
|
| | | | |
| \ \ | |
|\ \ \ \
| |_|_|/
|/| | | |
|
| | |/
| | |
| | |
| | | |
Catching typer errors in specialization.
|
| | |
| | |
| | |
| | |
| | |
| | | |
conjunction with implicit arguments).
Removed even more code in the presentation compiler testing infrastructure. One less level of indirection,
and a top-level object gone!
|
| |/
| |
| |
| |
| |
| |
| |
| | |
positions in AnnotationInfo to avoid position-less trees there.
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|
| | | |
| \ | |
|\ \| |
|
| | | |
|
| | | | |
| \ \ | |
| \ \ | |
| \ \ | |
| \ \ | |
| \ \ | |
|\ \ \ \ \ \
| | | |_|/ /
| | |/| | /
| | |_|_|/
| |/| | | |
'refs/pull/506/head'; commit 'refs/pull/507/head'; commit 'refs/pull/508/head' into develop
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | |_|/
| |/| | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
it will.
|
| | | |
| | | |
| | | |
| | | | |
Int and Long. And Boolean (hey, he also deserves some credit!).
|
| |/ /
|/| | |
|
| |/
| |
| |
| | |
Retro-reviewing.
|
| |
| |
| |
| | |
Closes SI-5769.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds an additional argument to the unify method in
specialization - `tparams`. When this parameter is set
to `true`, unification is done over type parameters in
poly types as well.
Additionally, the unification in specialization now
works over type bounds.
This ensures that in the below example:
trait Foo[@specialized(Int) A] {
def bar[B <: A](b: B) {}
}
class IntFoo extends Foo[Int] {
override def bar[B <: Int](b: B) {}
}
the method `bar` gets correctly determined
as a method that needs a special override
for its `bar$mcI$sp`.
|
| |/ |
|
| |
| |
| |
| |
| |
| | |
They were sneaking through as polymorphic Arrays and avoiding boxing.
Closes SI-4216
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change should be transparent to anything using sourceFile,
unless it was drinking from the inheritance well too deeply. Rather
than squander the already allocated field for every ClassSymbol not
being compiled from source, I'm now populating it with the file
representing the class. This will make a broad range of things easier,
like debugging, issuing useful error messages, symbol invalidation,
signature verification, you name it.
def sourceFile - still returns only source code files
def binaryFile - returns only class files
def associatedFile - returns whatever is there, if anything
Performance: I may be mistaken, but I believe this is a zero-impact
change. No new fields are allocated; fields which were null now hold
a useful reference. The reference is to a file instance which was
already being allocated and already long-lived.
Compare error messages:
// Version 1
% scalac a.scala
error: type _$1 is defined twice
// Version 2
% scalac a.scala
error: type _$1 is defined twice
conflicting symbols both originated in file './foo/package.class'
Note: this may be due to a bug in the compiler involving wildcards in package objects
one error found
Bonus for people who read commit logs. Try this in the repl
after starting power mode.
ListClass.info.members groupBy (_.associatedFile) foreach {
case (k, vs) => println("%s\n %s\n".format(k, vs map (_.defString) mkString "\n "))
}
|
| |
| |
| |
| | |
sbt needs that spot right after type for its phase xsbt-api
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes SI-963, since it was one of my random 30 it won the prize.
The trick after adding the stability check (which has been sitting
there commented out for 3+ years) was that implicit search depended
on the wrongness, because memberWildcardType would create scopes
with members of the form
?{ val name: tp }
And since a def shouldn't match that, fixing it broke everything
until I flipped it around: memberWildcardType should be seeking
?{ def name: tp }
It could also search for a mutable value: the relevant quality
is that it not be stable so it doesn't have a tighter type than
the members it hopes to match.
|
| |
| |
| |
| |
| | |
Don't change the owner of a return if the new owner is nested
inside the old owner. Closes SI-5612.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New this week, on SCALA.
Implicit class: "Spin me up an implicit method with my name."
Value class: "I need a companion object, pronto."
Narrator: "All was well with this arrangement... UNTIL."
What happens when these two wacky SIPs get together in the very
same class? You'll laugh until, eventually, you cry! Weeknights
at 9:30pm, only on SCALA.
Closes SI-5667.
|
| |
| |
| |
| |
| |
| | |
Removed JacoMetaATTR.
Removed MetaParser.
|