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

Error infering String Type as Object with getOrElse

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.12.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      • Mac OS X El capitain
      • Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111

      Description

       
      scala> import play.api.libs.json._ ; Option("a").getOrElse("b") : Json.JsValueWrapper
      <console>:13: error: type mismatch;
       found   : Object
       required: play.api.libs.json.Json.JsValueWrapper
              Option("a").getOrElse("b") : Json.JsValueWrapper
                                                 ^
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              momoAG Mohammed Azougarh
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated: