Skip to content

Commit 53720b9

Browse files
committed
Fix for enum comparisons generation.
1 parent d71e2a2 commit 53720b9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/ProvidedTypes.fs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14641,6 +14641,7 @@ namespace ProviderImplementation.ProvidedTypes
1464114641
| LessThan(None, [t1], [a1; a2]) ->
1464214642
emitExpr ExpectedStackState.Value a1
1464314643
emitExpr ExpectedStackState.Value a2
14644+
let t1 = if t1.IsEnum then t1.GetEnumUnderlyingType() else t1
1464414645
match t1 with
1464514646
| Bool | SByte | Char
1464614647
| Double | Single
@@ -14659,6 +14660,7 @@ namespace ProviderImplementation.ProvidedTypes
1465914660
| GreaterThan(None, [t1], [a1; a2]) ->
1466014661
emitExpr ExpectedStackState.Value a1
1466114662
emitExpr ExpectedStackState.Value a2
14663+
let t1 = if t1.IsEnum then t1.GetEnumUnderlyingType() else t1
1466214664
match t1 with
1466314665
| Bool | SByte | Char
1466414666
| Double | Single
@@ -14677,6 +14679,7 @@ namespace ProviderImplementation.ProvidedTypes
1467714679
| LessThanOrEqual(None, [t1], [a1; a2]) ->
1467814680
emitExpr ExpectedStackState.Value a1
1467914681
emitExpr ExpectedStackState.Value a2
14682+
let t1 = if t1.IsEnum then t1.GetEnumUnderlyingType() else t1
1468014683
match t1 with
1468114684
| Bool | SByte | Char
1468214685
| Int16 | Int32 | Int64 ->
@@ -14703,6 +14706,7 @@ namespace ProviderImplementation.ProvidedTypes
1470314706
| GreaterThanOrEqual(None, [t1], [a1; a2]) ->
1470414707
emitExpr ExpectedStackState.Value a1
1470514708
emitExpr ExpectedStackState.Value a2
14709+
let t1 = if t1.IsEnum then t1.GetEnumUnderlyingType() else t1
1470614710
match t1 with
1470714711
| Bool | SByte | Char
1470814712
| Int16 | Int32 | Int64 ->
@@ -14728,6 +14732,7 @@ namespace ProviderImplementation.ProvidedTypes
1472814732
| Equals(None, [t1], [a1; a2]) ->
1472914733
emitExpr ExpectedStackState.Value a1
1473014734
emitExpr ExpectedStackState.Value a2
14735+
let t1 = if t1.IsEnum then t1.GetEnumUnderlyingType() else t1
1473114736
match t1 with
1473214737
| Bool | SByte | Char
1473314738
| Double | Single
@@ -14743,6 +14748,7 @@ namespace ProviderImplementation.ProvidedTypes
1474314748
| NotEquals(None, [t1], [a1; a2]) ->
1474414749
emitExpr ExpectedStackState.Value a1
1474514750
emitExpr ExpectedStackState.Value a2
14751+
let t1 = if t1.IsEnum then t1.GetEnumUnderlyingType() else t1
1474614752
match t1 with
1474714753
| Bool | SByte | Char
1474814754
| Double | Single

0 commit comments

Comments
 (0)