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

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

Parent Directory Parent Directory | Revision Log Revision Log


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