aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-05-10 18:43:05 +0800
committerchriseth <c@ethdev.com>2016-05-11 01:40:37 +0800
commit4dfe9a216cd9545e6246d68916a759b0187feab1 (patch)
treee9adc2519c1d645fdd69eb4295a9f777fc8e1d71 /libsolidity/ast
parentef7049f9a6fd62d966493324b3f9365d28cabedf (diff)
downloaddexon-solidity-4dfe9a216cd9545e6246d68916a759b0187feab1.tar.gz
dexon-solidity-4dfe9a216cd9545e6246d68916a759b0187feab1.tar.zst
dexon-solidity-4dfe9a216cd9545e6246d68916a759b0187feab1.zip
Disallow explicit fixed->enum, but allow bytes->fixed.
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index ad03bae4..c5bb77f6 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -395,7 +395,6 @@ bool FixedPointType::isExplicitlyConvertibleTo(Type const& _convertTo) const
{
return _convertTo.category() == category() ||
_convertTo.category() == Category::Integer ||
- _convertTo.category() == Category::Enum ||
_convertTo.category() == Category::FixedBytes;
}
@@ -859,6 +858,7 @@ bool FixedBytesType::isImplicitlyConvertibleTo(Type const& _convertTo) const
bool FixedBytesType::isExplicitlyConvertibleTo(Type const& _convertTo) const
{
return _convertTo.category() == Category::Integer ||
+ _convertTo.category() == Category::FixedPoint ||
_convertTo.category() == Category::Contract ||
_convertTo.category() == category();
}