Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4319

"match may not be exhaustive" with Case Class Macros

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.5.0
    • Affects Version/s: None
    • Component/s: Scala
    • Labels:

      The following code

      `Macros.createCodecProviderIgnoreNone[Account]()`
       

      generates the following error

       

      ```
      match may not be exhaustive.
      It would fail on the following input: (x: String forSome x not in "Account")
          Macros.createCodecProviderIgnoreNone[Account]()
      ```

       

      We have the scala compiler flags to catch missing cases, but I dont see where in the the expanded code there would be a missing case issue.

       

      Thanks! 

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            jakeschwartz@zignallabs.com Jake Schwartz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: