Scala Programming Language
  1. Scala Programming Language
  2. SI-6007

if free type is an alias to a normal type, then runExpr should work

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: None
    • Component/s: Reflection
    • Labels:
      None

      Description

      The following snippets should all run without exceptions and produce List(2).

      type T = Int
      val code = reify {
        List[T](2)
      }
      println(code.eval)
      
      type U = Int
      type T = U
      val code = reify {
        List[T](2)
      }
      println(code.eval)
      
      def foo[W] = {
        type U = W
        type T = U
        reify {
          List[T](2)
        }
      }
      val code = foo[Int]
      println(code.tree.freeTypes)
      val W = code.tree.freeTypes(2)
      cm.mkToolBox().runExpr(code.tree, Map(W -> definitions.IntTpe))
      println(code.eval)
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Eugene Burmako
            Reporter:
            Eugene Burmako
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development