VanL / shedskin

Shed Skin is an experimental compiler, that can translate pure, but implicitly statically typed Python (2.4-2.6) programs into optimized C++
0 stars 1 forks source link

range with varying stepsize in generators fails to compile #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

The following program does not compile:

def gen(s):
    for i in range(1,10,s):
        yield i

for i in gen(2):
    print i

What is the expected output? What do you see instead?

gen.cpp: In member function ‘virtual __shedskin__::__ss_int 
__gen__::__gen_gen::__get_next()’:
gen.cpp:40: error: duplicate label ‘__after_yield_0’

What version of the product are you using? On what operating system?

0.5, linux

Please provide any additional information below.

Original issue reported on code.google.com by Hakan.A...@gmail.com on 28 Sep 2010 at 3:01

GoogleCodeExporter commented 9 years ago
thanks for reporting! I will try to see if I can fix this for 0.6..

Original comment by mark.duf...@gmail.com on 28 Sep 2010 at 3:14

GoogleCodeExporter commented 9 years ago
fixed in GIT, thanks again for reporting!

http://gitorious.org/shedskin/mainline/commit/bce92fac751d7141df671712820e5d552e
ab8c86

Original comment by mark.duf...@gmail.com on 2 Oct 2010 at 6:55