Skip to content

Fix regression around await of non-class type #95

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

Merged
merged 1 commit into from
Dec 10, 2014

Conversation

gnovark
Copy link
Contributor

@gnovark gnovark commented Dec 9, 2014

E.g. type param, abstract type.

The test case in the PR:

def combine[A](a1: A, a2: A): A = a1

def combineAsync[A](a1: Future[A], a2: Future[A]) = async {
  combine(await(a1), await(a2))
}

fails with the following exception:

[error] /Users/gnovark/git/async/src/test/scala/scala/async/run/toughtype/ToughType.scala:313: exception during macro expansion: 
[error] scala.ScalaReflectionException: type A is not a class
[error]     at scala.reflect.api.Symbols$SymbolApi$class.asClass(Symbols.scala:272)
[error]     at scala.reflect.internal.Symbols$SymbolContextApiImpl.asClass(Symbols.scala:82)
[error]     at scala.async.internal.TransformUtils$class.mkZero(TransformUtils.scala:334)
[error]     at scala.async.internal.AsyncMacro$$anon$1.mkZero(AsyncMacro.scala:6)

E.g. type param, abstrat type.
@retronym
Copy link
Member

LGTM, thanks!

retronym added a commit that referenced this pull request Dec 10, 2014
Fix regression around await of non-class type
@retronym retronym merged commit 4951474 into scala:master Dec 10, 2014
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