Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-8220

Get rid of pervasive casts in the reflection API

    Details

    • Type: Bug
    • Status: Open
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.10.0, Scala 2.11.0
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None

      Description

      At the moment, reflection code is very often plagued by casts. Not those brutal and obvious asInstanceOf's, but rather the sneaky asXXX methods on symbols.

      Got a method from a list of members and want to figure out its return type - do a cast. Got a class from Type.typeSymbol and want to check out its type params - do a cast. And so on, and so forth.

      This has to stop.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                burmako Eugene Burmako
                Reporter:
                burmako Eugene Burmako
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: