Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
scabug opened this issue Jun 29, 2012 · 1 comment
Open

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

scabug opened this issue Jun 29, 2012 · 1 comment
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Jun 29, 2012

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)
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jun 29, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6007?orig=1
Reporter: @xeno-by
Affected Versions: 2.10.0

@scabug scabug added the reflection label Apr 7, 2017
@scabug scabug added this to the Backlog milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.