<font face="Verdana,Arial,Helvetica,sans-serif" size="2"><div style="font-family: Verdana, Arial, Helvetica, sans-serif;">Hi there,&nbsp;</div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;"><br></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;">I see a new warning message for switch statements on enums, like this one:&nbsp;</div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;"><br></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;"><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">enum Test {</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; case one(Any)</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; case two</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">}</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo; min-height: 16px;"><span style="font-variant-ligatures: no-common-ligatures"></span><br></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">let x: Test = .one("One")</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">switch x {</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; case .one(let s as String): print(s)</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; case .one: break</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; case .two: break</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">}</span></p></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;"><span style="font-variant-ligatures: no-common-ligatures"><br></span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;"><span style="font-variant-ligatures: no-common-ligatures"><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures"><b>enum.swift:9:10: </b></span><span style="font-variant-ligatures: no-common-ligatures;"><font color="#d53bd3"><b>warning: </b></font></span><span style="font-variant-ligatures: no-common-ligatures"><b>case is already handled by previous patterns; consider removing it</b></span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">&nbsp; &nbsp; case .one: break&nbsp;</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures"><br></span></p></span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;"><span style="font-variant-ligatures: no-common-ligatures"><br></span></div><div><font face="Verdana,Arial,Helvetica,sans-serif" size="2"><font><font><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div dir="ltr" style="font-style: normal;"><font>I do not see this warning with the 04-24 dev snapshot.&nbsp;</font></div><div dir="ltr" style="font-style: normal;"><font><br></font></div><div dir="ltr" style="font-style: normal;"><font>The warning goes away with the use of the wildcard pattern in the second case:</font></div><div dir="ltr" style="font-style: normal;"><font><br></font></div><div dir="ltr" style="font-style: normal;"><font><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">switch x {</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">&nbsp; &nbsp;&nbsp;case .one(let s as String): print(s)</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">&nbsp; &nbsp;&nbsp;case .one(_): break</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">&nbsp; &nbsp;&nbsp;case .two: break</span></p><p style="margin: 0px; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures;">}</span></p></font></div><div dir="ltr" style="font-style: normal;"><font><br></font></div><div dir="ltr" style="font-style: normal;"><font><br></font></div><div dir="ltr" style="font-style: normal;"><font>I am wondering if this change is intentional, though it does make sense to me. Can someone please point me to the related commit?</font></div><div dir="ltr" style="font-style: normal;"><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" style="font-family: Verdana, Arial, Helvetica, sans-serif;"><br></font></div><div dir="ltr" style="font-style: normal;"><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" style="font-family: Verdana, Arial, Helvetica, sans-serif;">Thanks in advance!</font></div><div dir="ltr" style="font-style: normal;"><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" style="font-family: Verdana, Arial, Helvetica, sans-serif;"><br></font></div><div dir="ltr" style="font-style: normal;"><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" style="font-family: Verdana, Arial, Helvetica, sans-serif;">Pushkar N Kulkarni,</font></div>
<div dir="ltr" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-style: normal;"><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif">IBM Runtimes</font></div><div dir="ltr" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-style: normal;"><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif"><br></font></div><div dir="ltr" style="font-family: Verdana, Arial, Helvetica, sans-serif;"><font face="serif, Times New Roman, Times, serif"><i>Simplicity is prerequisite for reliability - Edsger W. Dijkstra</i></font></div>
<div dir="ltr" style="font-family: Arial; font-style: normal; font-size: 10.5pt;"><br></div></div></div></div></font></font></font></div></font><BR>