Last active
August 29, 2015 14:08
-
-
Save retronym/60b1abfecb69970bf543 to your computer and use it in GitHub Desktop.
SI-8947 analysis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% tail -n1000 test/files/pos/t8947/*.scala | |
==> test/files/pos/t8947/Client_2.scala <== | |
object Test { X.extractor } | |
==> test/files/pos/t8947/Macro_1.scala <== | |
import language.experimental.macros | |
import scala.reflect.macros._ | |
import blackbox.Context | |
object X { | |
def foo[D] = new Array[Any](0).map(_.asInstanceOf[D]) | |
def extractor: Any = macro X.extractorMacro | |
def extractorMacro(c: Context): c.Expr[Any] = | |
c.universe.reify(new { def something(data: Any) = ??? }) | |
} | |
% (for V in v2.11.2 v2.11.3; do scalac-hash $V test/files/pos/t8947/Macro_1.scala && scalac-hash $V -Ytyper-debug test/files/pos/t8947/Client_2.scala 2>&1 | tee sandbox/$V.log; done); diff -U1000 sandbox/v2.11.{2,3}.log | gist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- sandbox/v2.11.2.log 2014-10-30 10:41:43.000000000 +1000 | |
+++ sandbox/v2.11.3.log 2014-10-30 10:41:47.000000000 +1000 | |
@@ -1,39 +1,69 @@ | |
|-- <empty> EXPRmode-POLYmode-QUALmode (site: package <root>) | |
| \-> <empty>.type | |
|-- object Test BYVALmode-EXPRmode (site: package <empty>) | |
| |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in Test) | |
| | |-- this EXPRmode (silent: <init> in Test) | |
| | | \-> Test.type | |
| | \-> Test.type | |
| |-- X.extractor BYVALmode-EXPRmode (site: value <local Test> in Test) | |
| | |-- X EXPRmode-POLYmode-QUALmode (site: value <local Test> in Test) | |
| | | \-> X.type | |
| | |-- ({ final class $anon extends AnyRef { def <init>() = { su... BYVALmode-EXPRmode (site: value <local Test> in Test) | |
| | | |-- { final class $anon extends AnyRef { def <init>() = { sup... : pt=Any EXPRmode (site: value <local Test> in Test) | |
| | | | |-- AnyRef FUNmode-TYPEmode (site: anonymous class $anon) | |
| | | | | \-> AnyRef | |
| | | | |-- AnyRef FUNmode-TYPEmode (site: anonymous class $anon) | |
| | | | | \-> AnyRef | |
| | | | |-- class $anon BYVALmode-EXPRmode (site: value <local Test> in Test) | |
| | | | | |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in $anon) | |
| | | | | | |-- this EXPRmode (silent: <init> in $anon) | |
| | | | | | | |-- Predef.$qmark$qmark$qmark EXPRmode (site: method something in $anon) | |
| | | | | | | | \-> Nothing | |
| | | | | | | \-> AnyRef{} | |
| | | | | | \-> super.type (with underlying type AnyRef) | |
| | | | | |-- def something BYVALmode-EXPRmode (site: anonymous class $anon) | |
+| | | | | | |-- Predef.this.implicitly : pt=Any BYVALmode-EXPRmode (site: value data in $anon) | |
+| | | | | | | |-- type EXPRmode-POLYmode-QUALmode (site: value data in $anon) | |
+| | | | | | | | \-> scala.Predef.type | |
+| | | | | | | solving for (T: ?T) | |
+| | | | | | | solving for (A: ?A) | |
+| | | | | | | [adapt] $conforms adapted to [A]=> <:<[A,A] based on pt Any | |
+| | | | | | | [adapt] StringCanBuildFrom adapted to => scala.collection.generic.CanBuildFrom[String,Char,Stri... based on pt Any | |
+| | | | | | | |-- [T](implicit e: T)T BYVALmode-EXPRmode (site: value data in $anon) | |
+| | | | | | | | |-- type EXPRmode-POLYmode-QUALmode (site: value data in $anon) | |
+| | | | | | | | | \-> scala.Predef.type | |
+| | | | | | | | solving for (T: ?T) | |
+| | | | | | | | solving for (A: ?A) | |
+| | | | | | | | [adapt] $conforms adapted to [A]=> <:<[A,A] based on pt T | |
+| | | | | | | | solving for (T: ?T) | |
+| | | | | | | | [adapt] StringCanBuildFrom adapted to => scala.collection.generic.CanBuildFrom[String,Char,Stri... based on pt T | |
+| | | | | | | | solving for (T: ?T) | |
+test/files/pos/t8947/Client_2.scala:1: error: ambiguous implicit values: | |
+ both value StringCanBuildFrom in object Predef of type => scala.collection.generic.CanBuildFrom[String,Char,String] | |
+ and method $conforms in object Predef of type [A]=> <:<[A,A] | |
+ match expected type T | |
+object Test { X.extractor } | |
+ ^ | |
+| | | | | | | | |-- [T](implicit e: T)T BYVALmode-EXPRmode (site solving: type T: value data in $anon) | |
+| | | | | | | | | solving for (T: ?T) | |
+| | | | | | | | | \-> Unit | |
+| | | | | | | | [adapt] [T](implicit e: T)T adapted to [T](implicit e: T)T | |
+| | | | | | | | \-> Unit | |
+| | | | | | | [adapt] [T](implicit e: T)T adapted to [T](implicit e: T)T based on pt Any | |
+| | | | | | | \-> Unit | |
| | | | | | \-> [def something] (data: Any)Nothing | |
| | | | | \-> [class $anon] AnyRef{} | |
| | | | |-- new $anon() : pt=Any EXPRmode (site: value <local Test> in Test) | |
| | | | | |-- new $anon BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value <local Test> in Test) | |
| | | | | | |-- new $anon EXPRmode-POLYmode-QUALmode (silent: value <local Test> in Test) | |
| | | | | | | |-- $anon FUNmode-TYPEmode (silent: value <local Test> in Test) | |
| | | | | | | | \-> AnyRef{} | |
| | | | | | | \-> AnyRef{} | |
| | | | | | \-> ()AnyRef{} | |
| | | | | \-> AnyRef{} | |
| | | | \-> AnyRef{} | |
| | | \-> Any | |
| | [adapt] => Any adapted to ({ final class $anon extends AnyRef { def <init>(): <$ano... | |
| | \-> Any | |
| \-> [object Test] Test.type | |
+one error found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment