diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-12-07 12:18:13 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-12-07 12:18:13 +0100 |
| commit | 86d05bae6b28b26f4ddbaf2702bcc30e52be946b (patch) | |
| tree | 6469c19324390ca2cd47efeb1bc0a8c36c5b4cab /lists.js | |
| parent | d3be78cbedce2d9990c1efe6abf304dde69ba19a (diff) | |
| parent | 8338384bf572beb06ebd12a0c9af18029e99262a (diff) | |
| download | snap-issue_460.tar.gz snap-issue_460.zip | |
merge upstreamissue_460
Diffstat (limited to 'lists.js')
| -rw-r--r-- | lists.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -61,7 +61,7 @@ PushButtonMorph, SyntaxElementMorph, Color, Point, WatcherMorph, StringMorph, SpriteMorph, ScrollFrameMorph, CellMorph, ArrowMorph, MenuMorph, snapEquals, Morph, isNil, localize, MorphicPreferences*/ -modules.lists = '2014-July-28'; +modules.lists = '2014-November-20'; var List; var ListWatcherMorph; @@ -125,6 +125,9 @@ List.prototype.changed = function () { List.prototype.cons = function (car, cdr) { var answer = new List(); + if (!(cdr instanceof List || isNil(cdr))) { + throw new Error("cdr isn't a list: " + cdr); + } answer.first = isNil(car) ? null : car; answer.rest = cdr || null; answer.isLinked = true; |
