-
Notifications
You must be signed in to change notification settings - Fork 20
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
Cannot reference aliased imports #33
Comments
The same error occurs when the In both cases, (() => {
val x$macro$275 = scala.collection.mutable.mSeq;
val x$macro$276 = x$macro$275.apply[Int](1, 2, 3);
val collection = x$macro$276;
val x$macro$277 = collection.update(2, 4);
val x$macro$278 = collection.apply(0);
val x$macro$279 = coroutines.this.`package`.yieldval[Int](x$macro$278);
val x$macro$280 = collection.apply(1);
val x$macro$281 = coroutines.this.`package`.yieldval[Int](x$macro$280);
val x$macro$282 = collection.apply(2);
val x$macro$283 = coroutines.this.`package`.yieldval[Int](x$macro$282);
x$macro$283
}) Weirdly, the original {
import scala.collection.mutable.{Seq=>mSeq};
val collection = scala.collection.mutable.Seq.apply[Int](1, 2, 3);
collection.update(2, 4);
coroutines.this.`package`.yieldval[Int](collection.apply(0));
coroutines.this.`package`.yieldval[Int](collection.apply(1));
coroutines.this.`package`.yieldval[Int](collection.apply(2))
}
|
Inside the canonicalization case for selection, This is confirmed by seeing that One fix for this problem is to maintain a map between aliased imports and their non-aliased equivalents. Whenever we see a selection that references an aliased import, we replace it with the equivalent. I will also investigate the quasiquote guide to see if there is an approach that would not rename |
Nice catch. On Thu, Aug 11, 2016 at 8:06 PM, Jess Smith [email protected]
|
Commit: 51b6213
The following compiles and runs as expected:
However, canonicalization fails when an aliased import (e.g.
mSeq
) is referenced inside a coroutine body. For example, this snippet:produces this error:
I will investigate this issue more.
The text was updated successfully, but these errors were encountered: