Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Jul 19, 2016

Fixes issue discovered by @cswinter on #1396. Also fixes printing of tuple and function types with wildcards. Review by @smarter.

@smarter
Copy link
Member

smarter commented Jul 19, 2016

If I write:

  val foo = (x: (_ <: String)) => 1

Then I get after frontend:

    val foo: _ <: String => Int = {
      def $anonfun(x:  >: Nothing <: String): Int = 1
      closure($anonfun)
    }

Which compiles, but the type of the parameter of the def shouldn't be a wildcard, right?.

@smarter
Copy link
Member

smarter commented Jul 19, 2016

I guess my example shouldn't even compile, in scalac we get error: unbound wildcard type

@smarter
Copy link
Member

smarter commented Jul 19, 2016

LGTM, opened #1403 to keep track of the issue I noted above

@smarter smarter merged commit 0536d1f into scala:master Jul 19, 2016
@smarter smarter removed the reviewed label Jul 19, 2016
OlivierBlanvillain pushed a commit to OlivierBlanvillain/dotty that referenced this pull request Dec 8, 2016
OlivierBlanvillain pushed a commit to OlivierBlanvillain/dotty that referenced this pull request Dec 12, 2016
@allanrenucci allanrenucci deleted the fix-wildcard-protos branch December 14, 2017 19:21
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.

3 participants