poppopjmp / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

False alarm on class inheritances #145

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

SS give a false alarm warning message on the following case.
compilation and run are ok

Test case:
class Father(object):
  def __init__(self,Age):
    self.Age = Age
  def show(self):
    print self.Age

class Son(Father):
    def __init__(self,Age):
        Father.__init__(self,Age)
    def show(self):
        Father.show(self)

a= Father(30)
a.show()
b = Son(10)
b.show()

Output:
*** SHED SKIN Python-to-C++ Compiler 0.8 ***
Copyright 2005-2010 Mark Dufour; License GNU GPL version 3 (See LICENSE)

[analyzing types..]
********************************100%
[generating c++ code..]
*WARNING* test_var1.py:15: class attribute 'show' accessed without using class 
name

Original issue reported on code.google.com by jason.mi...@gmail.com on 14 Jul 2011 at 2:55

GoogleCodeExporter commented 8 years ago
thanks for sending in another issue! I will try to have a look at this soon. 
marking it for 0.9 in any case.

Original comment by mark.duf...@gmail.com on 14 Jul 2011 at 9:19

GoogleCodeExporter commented 8 years ago
fixed in GIT! thanks again for this one..

Original comment by mark.duf...@gmail.com on 15 Jul 2011 at 10:37