[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / docs / ecma334 / 20.4.4.xml
1 <?xml version="1.0"?>
2 <clause number="20.4.4" title="Interface re-implementation">
3   <paragraph>A class that inherits an interface implementation is permitted to re-implement the interface by including it in the base class list. </paragraph>
4   <paragraph>A re-implementation of an interface follows exactly the same interface mapping rules as an initial implementation of an interface. Thus, the inherited interface mapping has no effect whatsoever on the interface mapping established for the re-implementation of the interface. <example>[Example: For example, in the declarations <code_example><![CDATA[
5 interface IControl  
6 {  
7    void Paint();  
8 }  
9 class Control: IControl  
10 {  
11    void IControl.Paint() {...}  
12 }  
13 class MyControl: Control, IControl  
14 {  
15    public void Paint() {}  
16 }  
17 ]]></code_example>the fact that Control maps IControl.Paint onto Control.IControl.Paint doesn't affect the  re-implementation in MyControl, which maps IControl.Paint onto MyControl.Paint. end example]</example> </paragraph>
18   <paragraph>Inherited public member declarations and inherited explicit interface member declarations participate in the interface mapping process for re-implemented interfaces. <example>[Example: For example <code_example><![CDATA[
19 interface IMethods  
20 {  
21    void F();  
22    void G();  
23    void H();  
24    void I();  
25 }  
26 class Base: IMethods  
27 {  
28    void IMethods.F() {}  
29    void IMethods.G() {}  
30    public void H() {}  
31    public void I() {}  
32 }  
33 class Derived: Base, IMethods  
34 {  
35    public void F() {}  
36    void IMethods.H() {}  
37 }  
38 ]]></code_example></example></paragraph>
39   <paragraph>
40     <example>Here, the implementation of IMethods in Derived maps the interface methods onto Derived.F, Base.IMethods.G, Derived.IMethods.H, and Base.I. end example]</example>
41   </paragraph>
42   <paragraph>When a class implements an interface, it implicitly also implements all of that interface's base interfaces. Likewise, a re-implementation of an interface is also implicitly a re-implementation of all of the interface's base interfaces. <example>[Example: For example <code_example><![CDATA[
43 interface IBase  
44 {  
45    void F();  
46 }  
47 interface IDerived: IBase  
48 {  
49    void G();  
50 }  
51 class C: IDerived  
52 {  
53    void IBase.F() {...}  
54    void IDerived.G() {...}  
55 }  
56 class D: C, IDerived  
57 {  
58    public void F() {...}  
59    public void G() {...}  
60 }  
61 ]]></code_example></example></paragraph>
62   <paragraph>
63     <example>Here, the re-implementation of IDerived also re-implements IBase, mapping IBase.F onto D.F. end example]</example>
64   </paragraph>
65 </clause>