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

Compiler fails using OptionT with type alias #6313

Closed
scabug opened this issue Sep 4, 2012 · 5 comments
Closed

Compiler fails using OptionT with type alias #6313

scabug opened this issue Sep 4, 2012 · 5 comments

Comments

@scabug
Copy link

scabug commented Sep 4, 2012

Trying to compile

import scalaz.OptionT.optionT
type Foo[A] = Option[Option[A]]
val x: Foo[Int] = Some(Some(3))
optionT( x )

results in a compiler exception

java.lang.IllegalArgumentException: transpose requires all collections have the same size

@scabug
Copy link
Author

scabug commented Sep 4, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6313?orig=1
Reporter: Andrea Ferretti (andrea)
Affected Versions: 2.9.1
Duplicates #5683
Attachments:

@scabug
Copy link
Author

scabug commented Sep 4, 2012

@jsuereth said:
Would you mind creating a more minimal test case? We don't want to have to build all of Scalaz7 just to create a test case for this.

Thanks!

@scabug
Copy link
Author

scabug commented Sep 4, 2012

Andrea Ferretti (andrea) said:
Sorry, I am quite new to Scala (as in less than 1 month). I actually do not know what is going wrong here. This is as minimal as I could get, but I do not know the internals of Scalaz, hence I do not know how to make it simpler.

@scabug
Copy link
Author

scabug commented Sep 4, 2012

Ben James (bmjames) said (edited on Sep 4, 2012 2:19:42 PM UTC):
[Attached testcase.scala]

Compiling with scalac produces:

error: java.lang.IllegalArgumentException: transpose requires all collections have the same size

@scabug
Copy link
Author

scabug commented Sep 4, 2012

@retronym said:
This is almost certainly a duplicate of #5683. It doesn't crash in 2.10.0 RCs. It still doesn't infer the the parameter.

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

No branches or pull requests

1 participant