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 freezes if type parameter is omitted #12466

Closed
ansvonwa opened this issue May 13, 2021 · 1 comment
Closed

Compiler freezes if type parameter is omitted #12466

ansvonwa opened this issue May 13, 2021 · 1 comment

Comments

@ansvonwa
Copy link
Member

ansvonwa commented May 13, 2021

Compiler version

3.0.0

Minimized code

scala> ???.asInstanceOf[scala.collection.Seq] += 1

Note:

Output (click arrow to expand)

Absolutely nothing: No output, no error, no new prompt.
Same with -Xprint:typer:

$ time scala -Xprint:typer
scala> ???.asInstanceOf[scala.collection.Seq] += 1                                              
^C
real	1m5,798s
user	0m8,007s
sys	0m0,721s
@griggt
Copy link
Contributor

griggt commented May 13, 2021

Already fixed on master by #12223

Now:

scala> ???.asInstanceOf[scala.collection.Seq] += 1
1 |???.asInstanceOf[scala.collection.Seq] += 1
  |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |collection.Seq takes type parameters

@griggt griggt closed this as completed May 13, 2021
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

2 participants