diff options
author | Paul Phillips <paulp@improving.org> | 2012-11-05 11:48:40 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-11-05 11:48:40 -0800 |
commit | a5714183d1a197f5b7b69306db6be28b2724bbb7 (patch) | |
tree | 5c02ba1dd15e0312c3b066059aa6013dc517c336 /test/files/pos | |
parent | 3d248efcc1925acb7f73b2b2db2184f8d33b68ad (diff) | |
parent | aedc853040d7774bd39df43a51715f674f99471e (diff) | |
download | scala-a5714183d1a197f5b7b69306db6be28b2724bbb7.tar.gz scala-a5714183d1a197f5b7b69306db6be28b2724bbb7.tar.bz2 scala-a5714183d1a197f5b7b69306db6be28b2724bbb7.zip |
Merge commit 'refs/pull/1574/head' into merge-210
* commit 'refs/pull/1574/head': (24 commits)
Fixing issue where OSGi bundles weren't getting used for distribution.
Fixes example in Type.asSeenFrom
Fix for SI-6600, regression with ScalaNumber.
SI-6562 Fix crash with class nested in @inline method
Brings copyrights in Scaladoc footer and manpage up-to-date, from 2011/12 to 2013
Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013
SI-6606 Drops new icons in, replaces abstract types placeholder icons
SI-6132 Revisited, cleaned-up, links fixed, spelling errors fixed, rewordings
Labeling scala.reflect and scala.reflect.macros experimental in the API docs
Typo-fix in scala.concurrent.Future, thanks to @pavelpavlov
Remove implementation details from Position (they are still under reflection.internal). It probably needs more cleanup of the api wrt to ranges etc but let's leave it for later
SI-6399 Adds API docs for Any and AnyVal
Removing actors-migration from main repository so it can live on elsewhere.
Fix for SI-6597, implicit case class crasher.
SI-6578 Harden against synthetics being added more than once.
SI-6556 no assert for surprising ctor result type
Removing actors-migration from main repository so it can live on elsewhere.
Fixes SI-6500 by making erasure more regular.
Modification to SI-6534 patch.
Fixes SI-6559 - StringContext not using passed in escape function.
...
Conflicts:
src/actors-migration/scala/actors/migration/StashingActor.scala
src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
src/compiler/scala/tools/nsc/settings/AestheticSettings.scala
src/compiler/scala/tools/nsc/transform/Erasure.scala
src/library/scala/Application.scala
src/library/scala/collection/immutable/GenIterable.scala.disabled
src/library/scala/collection/immutable/GenMap.scala.disabled
src/library/scala/collection/immutable/GenSeq.scala.disabled
src/library/scala/collection/immutable/GenSet.scala.disabled
src/library/scala/collection/immutable/GenTraversable.scala.disabled
src/library/scala/collection/mutable/GenIterable.scala.disabled
src/library/scala/collection/mutable/GenMap.scala.disabled
src/library/scala/collection/mutable/GenSeq.scala.disabled
src/library/scala/collection/mutable/GenSet.scala.disabled
src/library/scala/collection/mutable/GenTraversable.scala.disabled
src/library/scala/collection/parallel/immutable/ParNumericRange.scala.disabled
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t5031_3/Foo_1.scala | 5 | ||||
-rw-r--r-- | test/files/pos/t5031_3/Main_2.scala | 6 | ||||
-rw-r--r-- | test/files/pos/t5031_3/package.scala | 6 | ||||
-rw-r--r-- | test/files/pos/t6556.scala | 32 | ||||
-rw-r--r-- | test/files/pos/t6562.scala | 14 | ||||
-rw-r--r-- | test/files/pos/t6600.scala | 8 |
6 files changed, 71 insertions, 0 deletions
diff --git a/test/files/pos/t5031_3/Foo_1.scala b/test/files/pos/t5031_3/Foo_1.scala new file mode 100644 index 0000000000..5934a6ba79 --- /dev/null +++ b/test/files/pos/t5031_3/Foo_1.scala @@ -0,0 +1,5 @@ +package foo.bar + +object Foo { + def bar = 42 +} diff --git a/test/files/pos/t5031_3/Main_2.scala b/test/files/pos/t5031_3/Main_2.scala new file mode 100644 index 0000000000..2079460b83 --- /dev/null +++ b/test/files/pos/t5031_3/Main_2.scala @@ -0,0 +1,6 @@ +package org.example + +object Main extends App { + println(foo.bar.Foo.bar) +} + diff --git a/test/files/pos/t5031_3/package.scala b/test/files/pos/t5031_3/package.scala new file mode 100644 index 0000000000..23fede7d04 --- /dev/null +++ b/test/files/pos/t5031_3/package.scala @@ -0,0 +1,6 @@ +package foo + +package object bar { + type Foo = Int => String +} + diff --git a/test/files/pos/t6556.scala b/test/files/pos/t6556.scala new file mode 100644 index 0000000000..e1a6f49b86 --- /dev/null +++ b/test/files/pos/t6556.scala @@ -0,0 +1,32 @@ +package nl.ndervorst.commons.scalapimps + +trait Adapter[X] {self => + type This = self.type + val adaptee: X + val adapt: This = self +} + +object Adapter { + implicit def adaptee[Adaptee](adapter: Adapter[Adaptee]) = adapter.adaptee +} + + + +object IterableW { + def zipMerge[E](it1: Iterable[E], it2: Iterable[E])(implicit o: Ordering[E]): Iterable[(Option[E], Option[E])] = null +} + + +class Series[X: Ordering, Y](val adaptee: Iterable[(X, Y)]) extends Adapter[Iterable[(X, Y)]] { + val order = implicitly[Ordering[X]] + def zipMerge(other: Series[X, Y]): Series[X, (Option[Y], Option[Y])] = IterableW.zipMerge(this, other)(new Ordering[(X, Y)] { + def compare(xy1: (X, Y), xy2: (X, Y)) = order.compare(xy1._1, xy2._1) + }).map { + case _ => null + } +} + + +object Series { + implicit def wrap[X: Ordering, Y](itble: Iterable[(X, Y)]): Series[X, Y] = new Series(itble) +} diff --git a/test/files/pos/t6562.scala b/test/files/pos/t6562.scala new file mode 100644 index 0000000000..eec7aa5199 --- /dev/null +++ b/test/files/pos/t6562.scala @@ -0,0 +1,14 @@ +class Test { + + @inline + def foo { + def it = new {} + (_: Any) => it + } + + @inline + private def bar { + def it = new {} + (_: Any) => it + } +} diff --git a/test/files/pos/t6600.scala b/test/files/pos/t6600.scala new file mode 100644 index 0000000000..1e8137894c --- /dev/null +++ b/test/files/pos/t6600.scala @@ -0,0 +1,8 @@ +final class Natural extends scala.math.ScalaNumber with scala.math.ScalaNumericConversions { + def intValue(): Int = 0 + def longValue(): Long = 0L + def floatValue(): Float = 0.0F + def doubleValue(): Double = 0.0D + def isWhole(): Boolean = false + def underlying() = this +} |