summaryrefslogtreecommitdiff
path: root/blocks.js
diff options
context:
space:
mode:
authorJens Mönig <jens@moenig.org>2015-03-09 07:09:43 +0100
committerJens Mönig <jens@moenig.org>2015-03-09 07:09:43 +0100
commit802ace18d18784a026a7c1c0466da264828b8227 (patch)
treea38511c51b0b54378e766e25403b9b89aa8f823e /blocks.js
parente906290f47face8f2f4cc318f5d11838fb8a3b0a (diff)
downloadsnap-802ace18d18784a026a7c1c0466da264828b8227.tar.gz
snap-802ace18d18784a026a7c1c0466da264828b8227.zip
fixed #738
Diffstat (limited to 'blocks.js')
-rw-r--r--blocks.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/blocks.js b/blocks.js
index c519703..d82d788 100644
--- a/blocks.js
+++ b/blocks.js
@@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/
// Global stuff ////////////////////////////////////////////////////////
-modules.blocks = '2015-March-06';
+modules.blocks = '2015-March-09';
var SyntaxElementMorph;
@@ -400,10 +400,14 @@ SyntaxElementMorph.prototype.debugCachedInputs = function () {
}
for (i = 0; i < realInputs.length; i += 1) {
if (this.cachedInputs[i] !== realInputs[i]) {
- throw new Error('cached input does not match ' +
+ throw new Error('cached input does not match: ' +
this.constructor.name +
+ ' #' +
+ i +
' ' +
- i);
+ this.cachedInputs[i].constructor.name +
+ ' != ' +
+ realInputs[i].constructor.name);
}
}
};
@@ -3059,6 +3063,9 @@ BlockMorph.prototype.fullCopy = function () {
ans.setSpec(this.instantiationSpec);
}
ans.allChildren().filter(function (block) {
+ if (block instanceof SyntaxElementMorph) {
+ block.cachedInputs = null;
+ }
return !isNil(block.comment);
}).forEach(function (block) {
var cmnt = block.comment.fullCopy();