diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-07-31 16:32:22 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-07-31 23:19:38 +0200 |
commit | ddcba109843d4f665a010f3dbbd28a6b99e6185a (patch) | |
tree | 6b769c96f35db8cd537832dba3d27d32b8c226fd /test/files/run/toolbox_typecheck_inferimplicitvalue.scala | |
parent | f4693871f4aad1fdbdbb743feaed8a848a9e2dca (diff) | |
download | scala-ddcba109843d4f665a010f3dbbd28a6b99e6185a.tar.gz scala-ddcba109843d4f665a010f3dbbd28a6b99e6185a.tar.bz2 scala-ddcba109843d4f665a010f3dbbd28a6b99e6185a.zip |
SI-5751 cleans up toolboxes for the release
Removes the `freeTypes` parameters on `typeCheckExpr` and `runExpr`,
since we now have public `substituteTypes` on both trees and types.
Also implements long-awaited `inferImplicitValue` and `inferImplicitView`
(thanks to Miles Sabin for nudging me!)
Diffstat (limited to 'test/files/run/toolbox_typecheck_inferimplicitvalue.scala')
-rw-r--r-- | test/files/run/toolbox_typecheck_inferimplicitvalue.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/toolbox_typecheck_inferimplicitvalue.scala b/test/files/run/toolbox_typecheck_inferimplicitvalue.scala new file mode 100644 index 0000000000..3c5c994ac9 --- /dev/null +++ b/test/files/run/toolbox_typecheck_inferimplicitvalue.scala @@ -0,0 +1,13 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +class C +object C { + implicit object MC extends C +} + +object Test extends App { + val tb = cm.mkToolBox() + println(tb.inferImplicitValue(typeOf[C])) +}
\ No newline at end of file |