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

Fix AST transformations of by-name parameters #27

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

smithjessk
Copy link
Collaborator

@smithjessk smithjessk commented Jul 6, 2016

Closes #24.

  • Stop canonicalization if parameters are by-name. This works even if the function has variable arguments
  • Add tests to cover these cases. These tests are inspired by / copied from Scala Async.
  • Correct the implementation of a test also from Scala Async

smithjessk added 17 commits June 2, 2016 17:18
However, this commit is not stable. There is an infinite loop when compiling `async-await-tests.scala`.
smithjessk/add-async-tests contains many async tests that do not pass. Some of these, along with some improvements to the code, were copied into this branch. This commit removes the changes and tests that have to do with method definitions.
@@ -96,6 +96,7 @@ object CoroutinesBuild extends MechaRepoBuild {
"org.scalatest" % "scalatest_2.11" % "2.2.6" % "test",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.2",
"org.scala-lang" % "scala-reflect" % "2.11.4",
"org.scala-lang" % "scala-compiler" % "2.11.4",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come we need this dependency?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it while experimenting with different solutions. Forgot to take it out.

Removed it in 1387ecb.

@axel22
Copy link
Member

axel22 commented Jul 9, 2016

Please also add an additional file to tests by-name-tests.scala, using the ScalaTest template from another test file, and add multiple unit tests for the functionality that you are implementing.

@smithjessk
Copy link
Collaborator Author

smithjessk commented Jul 11, 2016

Yes! Will do.

To-do list for unit tests:

@axel22
Copy link
Member

axel22 commented Jul 22, 2016

Should I take another look?

@smithjessk
Copy link
Collaborator Author

I still have to go over a few of your comments. In the meantime, could you look at this? Thanks!

@smithjessk
Copy link
Collaborator Author

To-do list for by-name analysis:

  • Use ByNameParam class as described here

@axel22
Copy link
Member

axel22 commented Aug 20, 2016

Note: this branch has merge conflicts.

@smithjessk
Copy link
Collaborator Author

Yep- I'm still working on it. Do you mind taking a look at this comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants