/[eiffelstudio]/trunk/eweasel/tests/codeanalysis026/test.e
ViewVC logotype

Contents of /trunk/eweasel/tests/codeanalysis026/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 100643 - (show annotations)
Sat Aug 19 10:48:39 2017 UTC (2 years ago) by alexk
File size: 371 byte(s)
Added an example demonstraing spuriuos CA050 when a local is used only to initialize Result, but the local type is different from the type of Result.
1 class TEST
2
3 create
4 make
5
6 feature
7
8 make
9 -- Run test.
10 do
11 f.do_nothing
12 g.do_nothing
13 end
14
15 f: ANY
16 -- Initialize Result from a local of different type.
17 local
18 i: INTEGER
19 do
20 Result := i
21 end
22
23 g: ANY
24 -- Initialize Result from a local of the same type.
25 local
26 i: detachable ANY
27 do
28 i := Current
29 Result := i -- Warning: CA050
30 end
31
32 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23