From 4dfe9a216cd9545e6246d68916a759b0187feab1 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 10 May 2016 12:43:05 +0200 Subject: Disallow explicit fixed->enum, but allow bytes->fixed. --- libsolidity/ast/Types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity') 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(); } -- cgit