Permalink
Browse files

Fix Issue #55, and version bump to 1.4.0b

  • Loading branch information...
maxtaco committed Jan 31, 2013
1 parent fb16015 commit b53cdfc242949b493064e306934f55001fc8d1ab

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

Large diffs are not rendered by default.

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.

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.

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.

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

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.

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
@@ -3,7 +3,7 @@
"description": "IcedCoffeeScript",
"keywords": ["javascript", "language", "coffeescript", "compiler"],
"author": "Maxwell Krohn",
- "version": "1.4.0a",
+ "version": "1.4.0b",
"licenses": [{
"type": "MIT",
"url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE"
View
@@ -32,7 +32,7 @@ else if require.registerExtension
require.registerExtension e, (content) -> compile content
# The current CoffeeScript version number.
-exports.VERSION = '1.4.0a'
+exports.VERSION = '1.4.0b'
# Words that cannot be used as identifiers in CoffeeScript code
exports.RESERVED = RESERVED
View
@@ -2888,7 +2888,12 @@ exports.Switch = class Switch extends Base
icedCallContinuation : ->
for [condition,block] in @cases
block.icedThreadReturn()
- @otherwise?.icedThreadReturn()
+ if @otherwise?
+ @otherwise.icedThreadReturn()
+ else
+ # See github issue #55. If no else: was specified,
+ # we still need to call back the current continuation
+ @otherwise = new Block [ new IcedTailCall ]
compileNode: (o) ->
idt1 = o.indent + TAB
View
@@ -72,6 +72,15 @@ atest "for k,v in arr testing", (cb) ->
s += v + " " + i + " "
cb( s is "the 0 quick 1 brown 2 ", {} )
+atest "switch --- github issue #55", (cb) ->
+ await delay defer()
+ switch "blah"
+ when "a"
+ await delay defer()
+ when "b"
+ await delay defer()
+ cb( true, {} )
+
atest "switch-a-roos", (cb) ->
res = 0
for i in [0..4]

0 comments on commit b53cdfc

Please sign in to comment.