/[eiffelstudio]/vendor/gobosoft.com/gobo/4.0d/library/tools/src/eiffel/ast/type/et_base_type.e
ViewVC logotype

Diff of /vendor/gobosoft.com/gobo/4.0d/library/tools/src/eiffel/ast/type/et_base_type.e

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 98697 by manus, Sat May 7 16:18:26 2016 UTC revision 98698 by manus, Mon May 9 13:53:54 2016 UTC
# Line 27  inherit Line 27  inherit
27                          has_identifier_anchored_type,                          has_identifier_anchored_type,
28                          depends_on_qualified_anchored_type,                          depends_on_qualified_anchored_type,
29                          has_formal_types,                          has_formal_types,
                         conforms_from_bit_type_with_type_marks,  
30                          conforms_from_formal_parameter_type_with_type_marks,                          conforms_from_formal_parameter_type_with_type_marks,
31                          conforms_from_tuple_type_with_type_marks,                          conforms_from_tuple_type_with_type_marks,
32                          resolved_formal_parameters,                          resolved_formal_parameters,
# Line 58  inherit Line 57  inherit
57                          same_named_type_with_type_marks as context_same_named_type_with_type_marks,                          same_named_type_with_type_marks as context_same_named_type_with_type_marks,
58                          same_base_type as context_same_base_type,                          same_base_type as context_same_base_type,
59                          same_base_type_with_type_marks as context_same_base_type_with_type_marks,                          same_base_type_with_type_marks as context_same_base_type_with_type_marks,
                         same_named_bit_type_with_type_marks as context_same_named_bit_type_with_type_marks,  
60                          same_named_class_type_with_type_marks as context_same_named_class_type_with_type_marks,                          same_named_class_type_with_type_marks as context_same_named_class_type_with_type_marks,
61                          same_named_formal_parameter_type_with_type_marks as context_same_named_formal_parameter_type_with_type_marks,                          same_named_formal_parameter_type_with_type_marks as context_same_named_formal_parameter_type_with_type_marks,
62                          same_named_tuple_type_with_type_marks as context_same_named_tuple_type_with_type_marks,                          same_named_tuple_type_with_type_marks as context_same_named_tuple_type_with_type_marks,
                         same_base_bit_type_with_type_marks as context_same_base_bit_type_with_type_marks,  
63                          same_base_class_type_with_type_marks as context_same_base_class_type_with_type_marks,                          same_base_class_type_with_type_marks as context_same_base_class_type_with_type_marks,
64                          same_base_formal_parameter_type_with_type_marks as context_same_base_formal_parameter_type_with_type_marks,                          same_base_formal_parameter_type_with_type_marks as context_same_base_formal_parameter_type_with_type_marks,
65                          same_base_tuple_type_with_type_marks as context_same_base_tuple_type_with_type_marks,                          same_base_tuple_type_with_type_marks as context_same_base_tuple_type_with_type_marks,
66                          conforms_to_type as context_conforms_to_type,                          conforms_to_type as context_conforms_to_type,
67                          conforms_to_type_with_type_marks as context_conforms_to_type_with_type_marks,                          conforms_to_type_with_type_marks as context_conforms_to_type_with_type_marks,
                         conforms_from_bit_type_with_type_marks as context_conforms_from_bit_type_with_type_marks,  
68                          conforms_from_class_type_with_type_marks as context_conforms_from_class_type_with_type_marks,                          conforms_from_class_type_with_type_marks as context_conforms_from_class_type_with_type_marks,
69                          conforms_from_formal_parameter_type_with_type_marks as context_conforms_from_formal_parameter_type_with_type_marks,                          conforms_from_formal_parameter_type_with_type_marks as context_conforms_from_formal_parameter_type_with_type_marks,
70                          conforms_from_tuple_type_with_type_marks as context_conforms_from_tuple_type_with_type_marks,                          conforms_from_tuple_type_with_type_marks as context_conforms_from_tuple_type_with_type_marks,
# Line 325  feature -- Comparison Line 321  feature -- Comparison
321    
322  feature {ET_TYPE, ET_TYPE_CONTEXT} -- Conformance  feature {ET_TYPE, ET_TYPE_CONTEXT} -- Conformance
323    
         conforms_from_bit_type_with_type_marks (other: ET_BIT_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK; a_context: ET_TYPE_CONTEXT): BOOLEAN  
                         -- Does `other' type appearing in `other_context' conform  
                         -- to current type appearing in `a_context'?  
                         -- Note that the type mark status of `Current' and `other' is  
                         -- overridden by `a_type_mark' and `other_type_mark', if not Void  
                         -- (Note: 'current_system.ancestor_builder' is used on the classes  
                         -- whose ancestors need to be built in order to check for conformance.)  
                 local  
                         l_other_base_class: ET_CLASS  
                         l_any_type: ET_CLASS_TYPE  
                 do  
                         l_other_base_class := other.base_class  
                         if l_other_base_class.is_preparsed then  
                                         -- Use 'implicit_attached_type_mark' because BIT types  
                                         -- are expanded, and hence attached. So we should ignore any  
                                         -- 'detachable' type mark modifier.  
                                 Result := conforms_from_class_type_with_type_marks (l_other_base_class, tokens.implicit_attached_type_mark, other_context, a_type_mark, a_context)  
                         end  
                         if not Result then  
                                         -- See VNCB-1 (ETL2 p.229).  
                                         -- "BIT N" conforms to "ANY", so "BIT N" conforms to  
                                         -- current class if "ANY" conforms to it.  
                                 if not base_class.is_preparsed then  
                                                 -- Internal error: the base class is not even preparsed (i.e. we  
                                                 -- know nothing, not even its filename). Therefore it is impossible  
                                                 -- to determine whether "ANY" conforms to it.  
                                         Result := False  
                                 else  
                                                 -- Use 'implicit_attached_type_mark' because BIT types  
                                                 -- are expanded, and hence attached. So we should ignore any  
                                                 -- 'detachable' type mark modifier.  
                                         l_any_type := base_class.current_system.any_type  
                                         Result := conforms_from_class_type_with_type_marks (l_any_type, tokens.implicit_attached_type_mark, other_context, a_type_mark, a_context)  
                                 end  
                         end  
                 end  
   
324          conforms_from_formal_parameter_type_with_type_marks (other: ET_FORMAL_PARAMETER_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK; a_context: ET_TYPE_CONTEXT): BOOLEAN          conforms_from_formal_parameter_type_with_type_marks (other: ET_FORMAL_PARAMETER_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK; a_context: ET_TYPE_CONTEXT): BOOLEAN
325                          -- Does `other' type appearing in `other_context' conform                          -- Does `other' type appearing in `other_context' conform
326                          -- to current type appearing in `a_context'?                          -- to current type appearing in `a_context'?
# Line 628  feature -- Type context Line 587  feature -- Type context
587    
588  feature {ET_TYPE, ET_TYPE_CONTEXT} -- Type context  feature {ET_TYPE, ET_TYPE_CONTEXT} -- Type context
589    
         context_same_named_bit_type_with_type_marks (other: ET_BIT_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK): BOOLEAN  
                         -- Do current context and `other' type appearing in  
                         -- `other_context' have the same named type?  
                         -- Note that the type mark status of `Current' and `other' is  
                         -- overridden by `a_type_mark' and `other_type_mark', if not Void  
                 do  
                         Result := same_named_bit_type_with_type_marks (other, other_type_mark, other_context, a_type_mark, Current)  
                 end  
   
590          context_same_named_class_type_with_type_marks (other: ET_CLASS_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK): BOOLEAN          context_same_named_class_type_with_type_marks (other: ET_CLASS_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK): BOOLEAN
591                          -- Do current context and `other' type appearing in                          -- Do current context and `other' type appearing in
592                          -- `other_context' have the same named type?                          -- `other_context' have the same named type?
# Line 664  feature {ET_TYPE, ET_TYPE_CONTEXT} -- Ty Line 614  feature {ET_TYPE, ET_TYPE_CONTEXT} -- Ty
614                          Result := same_named_tuple_type_with_type_marks (other, other_type_mark, other_context, a_type_mark, Current)                          Result := same_named_tuple_type_with_type_marks (other, other_type_mark, other_context, a_type_mark, Current)
615                  end                  end
616    
         context_same_base_bit_type_with_type_marks (other: ET_BIT_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK): BOOLEAN  
                         -- Do current context and `other' type appearing in  
                         -- `other_context' have the same base type?  
                         -- Note that the type mark status of `Current' and `other' is  
                         -- overridden by `a_type_mark' and `other_type_mark', if not Void  
                 do  
                         Result := same_base_bit_type_with_type_marks (other, other_type_mark, other_context, a_type_mark, Current)  
                 end  
   
617          context_same_base_class_type_with_type_marks (other: ET_CLASS_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK): BOOLEAN          context_same_base_class_type_with_type_marks (other: ET_CLASS_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK): BOOLEAN
618                          -- Do current context and `other' type appearing in                          -- Do current context and `other' type appearing in
619                          -- `other_context' have the same base type?                          -- `other_context' have the same base type?
# Line 700  feature {ET_TYPE, ET_TYPE_CONTEXT} -- Ty Line 641  feature {ET_TYPE, ET_TYPE_CONTEXT} -- Ty
641                          Result := same_base_tuple_type_with_type_marks (other, other_type_mark, other_context, a_type_mark, Current)                          Result := same_base_tuple_type_with_type_marks (other, other_type_mark, other_context, a_type_mark, Current)
642                  end                  end
643    
         context_conforms_from_bit_type_with_type_marks (other: ET_BIT_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK): BOOLEAN  
                         -- Does `other' type appearing in `other_context' conform to current context?  
                         -- Note that the type mark status of `Current' and `other' is  
                         -- overridden by `a_type_mark' and `other_type_mark', if not Void  
                         -- (Note: 'current_system.ancestor_builder' is used on the classes  
                         -- whose ancestors need to be built in order to check for conformance.)  
                 do  
                         Result := conforms_from_bit_type_with_type_marks (other, other_type_mark, other_context, a_type_mark, Current)  
                 end  
   
644          context_conforms_from_class_type_with_type_marks (other: ET_CLASS_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK): BOOLEAN          context_conforms_from_class_type_with_type_marks (other: ET_CLASS_TYPE; other_type_mark: detachable ET_TYPE_MARK; other_context: ET_TYPE_CONTEXT; a_type_mark: detachable ET_TYPE_MARK): BOOLEAN
645                          -- Does `other' type appearing in `other_context' conform to current context?                          -- Does `other' type appearing in `other_context' conform to current context?
646                          -- Note that the type mark status of `Current' and `other' is                          -- Note that the type mark status of `Current' and `other' is

Legend:
Removed from v.98697  
changed lines
  Added in v.98698

  ViewVC Help
Powered by ViewVC 1.1.23