diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-12-07 11:54:58 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-12-07 11:54:58 +0100 |
| commit | 54d0194cd575724ff69526e707a02c5a0e3f2b73 (patch) | |
| tree | f6adf6913f449017590fe5770595c37b9ba25d0d /lists.js | |
| parent | 4013e79a7421b9e6baacc8e34ae7a8ef188b38cb (diff) | |
| parent | 8338384bf572beb06ebd12a0c9af18029e99262a (diff) | |
| download | snap-issue_405.tar.gz snap-issue_405.zip | |
resolve merge conflictissue_405
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; |
