-
Notifications
You must be signed in to change notification settings - Fork 1.1k
StagedTuple changes #5822
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
StagedTuple changes #5822
Conversation
Rebased Note to self: an assertion error occurs after erasure when compiling .asInstanceOf[{
type evidence$22$_~$15 = Int
type evidence$21$_~$5 = (Int, Int)(Tuple_this)(Tuple_this)
evidence$22$_~$15 *: evidence$21$_~$5
}] instead it should have been (Int, Int, Int) |
6ebd4e9
to
fa7104a
Compare
eeb986b
to
ecc5465
Compare
189b16d
to
85c6963
Compare
…direct usages of throw QuoteError
@@ -1,18 +1,22 @@ | |||
package scala | |||
package scala.compiletime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move this to scala.internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the change and I get an expected error 🤷♂️:
[info] Compiling 5 Scala sources to /Users/bibou/Projects/dotty/library/../out/bootstrap/dotty-library-bootstrapped/scala-0.14/classes ...
[error] -- Error: /Users/bibou/Projects/dotty/library/src-bootstrapped/scala/Tuple.scala:350:24
[error] 350 | if (Tuple.stageIt) (x.head, x.tail)
[error] | ^^^^^^
[error] |Could not find class scala.internal.StagedTuple$ in classpath. The most common reason for that is that you apply macros in the compilation run that defines them
[error] | This location is in code that was inlined at Tuple.scala:224
[error] | This location is in code that was inlined at Tuple.scala:350
[error] -- Error: /Users/bibou/Projects/dotty/library/src-bootstrapped/scala/internal/quoted/Matcher.scala:287:44
[error] 287 | case (Some(acc), Some(holes)) => Some(acc ++ holes)
[error] | ^^^^^^^^^^^^
[error] |Could not find class scala.internal.StagedTuple$ in classpath. The most common reason for that is that you apply macros in the compilation run that defines them
[error] | This location is in code that was inlined at Tuple.scala:66
[error] | This location is in code that was inlined at Matcher.scala:287
[error] two errors found
[error] (dotty-library-bootstrapped / Compile / compileIncremental) Compilation failed
[error] Total time: 2 s, completed Apr 9, 2019 10:15:43 AM
Can I merge this @nicolasstucki ? |
Restore previous
unapply
and homogenize staged method names. I used the convention of putting the*Staged
at the end.[Tail[Tup]]
becausetail
(on a Tuple6) was failing even on masterQuoteError
depends on #6210, checked with
stageIt = true
that it passes and reverted it back tofalse