# Type Mismatch in wildcard (\`\_\`) case in switch

**URL:** https://talk.remobjects.com/t/type-mismatch-in-wildcard-case-in-switch/21000
**Category:** Elements Bugs
**Created:** [December 21, 2019, 6:56pm UTC](https://talk.remobjects.com/t/type-mismatch-in-wildcard-case-in-switch/21000 "2019-12-21T18:56:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dbroggi](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dbroggi](https://talk.remobjects.com/u/dbroggi)
#### Post date: [December 21, 2019, 6:56pm UTC](https://talk.remobjects.com/t/type-mismatch-in-wildcard-case-in-switch/21000/1 "2019-12-21T18:56:44Z")

</div>

**IDE:** _Visual Studio X/Fire_  
**Version:** _10.0.0.2465 (develop_  
**Target** (If relevant): _Island(OSX)_  
**Description** :  
The compiler is wrongly emitting a Type Mismatch error for a `_` pattern in a switch case.

**Expected Behavior** :  
Compiles.  
**Actual Behavior** :  
See below.  
**Steps** :

```auto
enum Tree {
    case Leaf(Int)
    case Branch(Int)
}

func testCase(a : Tree) {
    switch a { // W45 Switch does not cover all values
      case _: // E63 Type mismatch
        break
    }
}

```

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [December 22, 2019, 3:52pm UTC](https://talk.remobjects.com/t/type-mismatch-in-wildcard-case-in-switch/21000/2 "2019-12-22T15:52:39Z")

</div>

Thanks, logged as [bugs://83690](https://www.remobjects.com/portal/bugs/?id=83690)

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [January 9, 2020, 7:17am UTC](https://talk.remobjects.com/t/type-mismatch-in-wildcard-case-in-switch/21000/3 "2020-01-09T07:17:31Z")

</div>

[bugs://83690](https://www.remobjects.com/portal/bugs/?id=83690) got closed with status fixed.
