OSDN Git Service

compiler: No error if shift operand inherits interface type.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 Sep 2012 06:33:35 +0000 (06:33 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 Sep 2012 06:33:35 +0000 (06:33 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@191635 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/expressions.cc

index dffd193..3fa1cd6 100644 (file)
@@ -5459,7 +5459,8 @@ Binary_expression::do_determine_type(const Type_context* context)
          && (this->left_->type()->integer_type() == NULL
              || (subcontext.type->integer_type() == NULL
                  && subcontext.type->float_type() == NULL
-                 && subcontext.type->complex_type() == NULL)))
+                 && subcontext.type->complex_type() == NULL
+                 && subcontext.type->interface_type() == NULL)))
        this->report_error(("invalid context-determined non-integer type "
                            "for shift operand"));