/[eiffelstudio]/branches/eth/eve/Src/Eiffel/API/evaluated_type/none_a.e
ViewVC logotype

Annotation of /branches/eth/eve/Src/Eiffel/API/evaluated_type/none_a.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 55786 - (hide annotations)
Fri Nov 18 07:49:18 2005 UTC (14 years, 2 months ago) by alexk
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/none_a.e
File size: 1501 byte(s)
Changed conformance tests to use a new feature `conformance_type'
because now `actual_type' can return LIKE_CURRENT due to changes
in processing of "like Current" type.

1 dinov 3375 indexing
2 manus 27398 description: "Actual type for NONE."
3 manus 9656 date: "$Date$"
4 manus 27398 revision: "$Revision$"
5 dinov 3375
6 manus 9656 class
7     NONE_A
8 grator 18
9     inherit
10 manus 9656 TYPE_A
11 grator 18 redefine
12 manus 44539 is_none, dump, type_i, same_as, is_full_named_type
13 grator 18 end
14    
15 manus 9656 feature -- Comparison
16    
17     is_equivalent (other: like Current): BOOLEAN is
18     -- Is `other' equivalent to the current object ?
19     do
20     Result := True
21     end
22    
23 dinov 3078 feature -- Properties
24 grator 18
25 manus 9656 is_none: BOOLEAN is True
26 grator 18 -- Is the current type a none type ?
27    
28 manus 44539 is_full_named_type: BOOLEAN is True
29     -- Current is a full named type.
30    
31 dinov 3180 feature -- Access
32    
33     same_as (other: TYPE_A): BOOLEAN is
34     -- Is the current type the same as `other' ?
35     do
36 manus 9656 Result := other.is_none
37     end
38 dinov 3180
39 manus 11302 associated_class: CLASS_C is
40     do
41     -- No associated class
42     end
43    
44 dinov 3078 feature -- Output
45    
46 manus 9656 dump: STRING is "NONE"
47 grator 18 -- Dumped trace
48    
49 manus 26913 ext_append_to (st: STRUCTURED_TEXT; f: E_FEATURE) is
50 grator 296 do
51 manus 30166 st.add (ti_none_class)
52 manus 9656 end
53 grator 296
54 dinov 3180 feature {COMPILER_EXPORTER}
55 dinov 3078
56 manus 9656 create_info: CREATE_TYPE is
57     -- Byte code information for entity type creation
58     do
59 manus 30166 create Result.make (type_i)
60 manus 9656 end
61    
62 grator 18 type_i: NONE_I is
63     -- Void C type
64     once
65 manus 11722 Result := None_c_type
66 manus 9656 end
67 grator 18
68 manus 41740 conform_to (other: TYPE_A): BOOLEAN is
69     -- Does Current conform to `other'?
70 manus 48130 local
71     l_type: TYPE_A
72 grator 18 do
73 manus 48079 -- If `other' is expanded, then it does not conform to NONE.
74 manus 48130 -- But it should not be `VOID_A' since VOID_A is only used as
75     -- return type for procedure
76 alexk 55786 l_type := other.conformance_type
77 manus 48130 Result := not l_type.is_expanded and not l_type.is_void
78 manus 9656 end
79 grator 18
80 dinov 3375 end -- class NONE_A

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23