Commit 7de6fd50 authored by Robert Bradshaw's avatar Robert Bradshaw

Some reference type refinements.

parent 0842f603
...@@ -1383,15 +1383,9 @@ class CReferenceType(CType): ...@@ -1383,15 +1383,9 @@ class CReferenceType(CType):
def assignable_from_resolved_type(self, other_type): def assignable_from_resolved_type(self, other_type):
if other_type is error_type: if other_type is error_type:
return 1 return 1
if other_type.is_ptr: elif other_type.is_reference and self.base_type == other_type.base_type:
return 0 return 1
#print self, other_type elif other_type == self.base_type:
#if other_type.base_type == self.base_type:
# return 1
#else:
# pass
#TODO: should send a warning message: initialization from incompatible pointer type (in C/C++)
if other_type == self.base_type:
return 1 return 1
else: #for now else: #for now
return 0 return 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment