Skip to content

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

Closed
@smarter

Description

@smarter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions