scala/scala — pull request #1271 by retronym (2012-09-08 17:00:09+00:00)
Title: SI-6331 deconst If type / refine equality of floating point Constant types.

Review by @paulp

/cc @xeno-by

1. I'd suggest you remove `ConstantType#isNaN` from the `scala.reflect.api.Constants#ConstantApi`.
2. Do you expect this output when compiling a macro in partest?

```
quick.partest:
[scalacfork] Compiling 1 file to /Users/jason/code/scala/build/quick/classes/partest
[scalacfork] // produced from source-/Users/jason/code/scala/src/partest/scala/tools/partest/package.scala,line-98,offset=2789
[scalacfork] object Test extends App {
[scalacfork] val $u: c.universe.type = c.universe;
[scalacfork] import $u._
[scalacfork] val tpe = evidence$1.in($m).tpe
[scalacfork] println(tpe)
[scalacfork] }
[scalacfork] // produced from source-/Users/jason/code/scala/src/partest/scala/tools/partest/package.scala,line-98,offset=2789
[scalacfork] object Test extends App {
[scalacfork] val $u: c.universe.type = c.universe;
[scalacfork] val $m: $u.Mirror = c.universe.rootMirror;
[scalacfork] import $u._, $m._
[scalacfork] val tree = Block(List(Apply(Select(Select(build.This(staticPackage("scala").asModule.moduleClass), newTermName("Predef")), newTermName("println")), List(Apply(Select(Apply(Select(Select(build.Ident(staticPackage("scala")), newTermName("StringContext")), newTermName("apply")), List(Literal(Constant("trace> ")), Literal(Constant("\\nres: ")), Literal(Constant(" = ")), Literal(Constant("\\n")))), newTermName("s")), List(exprCode.in($m).tree, exprType.in($m).tree, a.in($m).tree))))), a.in($m).tree)
[scalacfork] println(tree)
[scalacfork] }
[propertyfile] Updating property file: /Users/jason/code/scala/build/quick/classes/partest/partest.properties
[stopwatch] [quick.partest.timer: 10.808 sec]
```