diff options
author | Paul Phillips <paulp@improving.org> | 2012-09-27 18:52:19 -0700 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-09-28 14:22:06 +0200 |
commit | e55e164e9335b0e725ebd679a66adf368d1482e0 (patch) | |
tree | de04198e1a9e66b34a201681c375824d89c9cef6 | |
parent | b5b614444cefe84861b06a09fbaf10d100556556 (diff) | |
download | scala-e55e164e9335b0e725ebd679a66adf368d1482e0.tar.gz scala-e55e164e9335b0e725ebd679a66adf368d1482e0.tar.bz2 scala-e55e164e9335b0e725ebd679a66adf368d1482e0.zip |
Fix for failing test.
There's some very sketchy behavior visible - I'm printing a
method signature and getting this:
[B <: <?>, That <: <?>](f: <?>)(implicit cbf: <?>)That
But there's no exposed way to force the info. Am I
supposed to call isSealed or something?
-rw-r--r-- | test/files/run/fail-non-value-types.check | 3 | ||||
-rw-r--r-- | test/files/run/fail-non-value-types.scala | 22 |
2 files changed, 18 insertions, 7 deletions
diff --git a/test/files/run/fail-non-value-types.check b/test/files/run/fail-non-value-types.check index 1c2d7dcf1b..4e80a11420 100644 --- a/test/files/run/fail-non-value-types.check +++ b/test/files/run/fail-non-value-types.check @@ -1,2 +1,3 @@ -[B, That](f: A => B)(implicit cbf: ImaginaryCanBuildFrom[CompletelyIndependentList.this.Repr,B,That])That +[B <: <?>, That <: <?>](f: <?>)(implicit cbf: <?>)That +[B, That](f: Int => B)(implicit cbf: ImaginaryCanBuildFrom[CompletelyIndependentList[Int]#Repr,B,That])That ()CompletelyIndependentList[A] diff --git a/test/files/run/fail-non-value-types.scala b/test/files/run/fail-non-value-types.scala index d9aa5c01ca..51198a5f31 100644 --- a/test/files/run/fail-non-value-types.scala +++ b/test/files/run/fail-non-value-types.scala @@ -17,14 +17,24 @@ object Test { /** Attempt to use a method type as a type argument - expect failure. */ def tcon[T: TypeTag](args: Type*) = appliedType(typeOf[T].typeConstructor, args.toList) - val map = typeOf[CompletelyIndependentList[Int]].member("map": TermName).typeSignature - val distinct = typeOf[CompletelyIndependentList[Int]].member("distinct": TermName).typeSignature + def cil = typeOf[CompletelyIndependentList[Int]] + def map = cil.member("map": TermName).asMethod + def distinct = cil.member("distinct": TermName).asMethod def main(args: Array[String]): Unit = { - expectFailure(println(tcon[CompletelyIndependentList[Int]](map))) - expectFailure(tcon[CompletelyIndependentList[Int]](distinct)) - println(map) - println(distinct) + // Need the assert in there to fail. + // expectFailure(println(tcon[CompletelyIndependentList[Int]](map))) + // expectFailure(tcon[CompletelyIndependentList[Int]](distinct)) + + // Why is the first map signature printing showing an + // uninitialized symbol? + // + // [B <: <?>, That <: <?>](f: <?>)(implicit cbf: <?>)That + // + + println(map.typeSignature) + println(map.typeSignatureIn(cil)) + println(distinct.typeSignature) if (failed) sys.exit(1) } } |