Permalink
Browse files

fix #2846

  • Loading branch information...
1 parent 718224f commit 53a5f26430bdd98e58d8ea6646ec614d29bef470 @vendethiel vendethiel committed Mar 25, 2013

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1504,7 +1504,7 @@ exports.While = class While extends Base
set = ''
{body} = this
if body.isEmpty()
- body = ''
+ body = @makeCode ''
else
if @returns
body.makeReturn rvar = o.scope.freeVariable 'results'
View
@@ -76,3 +76,6 @@ test "#1055: invalid keys in real (but not work-product) objects", ->
test "#1066: interpolated strings are not implicit functions", ->
cantCompile '"int#{er}polated" arg'
+
+test "#2846: while with empty body", ->
+ CoffeeScript.compile 'while 1 then', {sourceMap: true}

0 comments on commit 53a5f26

Please sign in to comment.