Skip to content

Weird REPL-only error message: value asInstanceOf does not take type parameters #3672

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

Closed
smarter opened this issue Dec 15, 2017 · 0 comments
Closed
Labels
area:repl area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug prio:low

Comments

@smarter
Copy link
Member

smarter commented Dec 15, 2017

The first error is legitimate, the second isn't:

scala> val a: scala.collection.Seq.Coll = Int 
1 |val a: scala.collection.Seq.Coll = Int
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^
  |type Coll in class GenericCompanion cannot be accessed as a member of collection.Seq.type from module class rs$line$1$.
  | Access to protected type Coll not permitted because enclosing object rs$line$1
  | is not a subclass of class GenericCompanion in package generic where target is defined
1 |val a: scala.collection.Seq.Coll = Int
  |^
  |value asInstanceOf does not take type parameters
@smarter smarter added area:repl area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug prio:low labels Dec 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:repl area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug prio:low
Projects
None yet
Development

No branches or pull requests

1 participant