Re-allow output coupled with next statement.

This commit is contained in:
Neil Fraser
2015-09-20 14:37:28 -07:00
parent c14951c928
commit 2d60d94941

View File

@@ -691,8 +691,6 @@ Blockly.Block.prototype.setNextStatement = function(newBoolean, opt_check) {
this.nextConnection = null;
}
if (newBoolean) {
goog.asserts.assert(!this.outputConnection,
'Remove output connection prior to adding previous connection.');
if (opt_check === undefined) {
opt_check = null;
}
@@ -721,8 +719,8 @@ Blockly.Block.prototype.setOutput = function(newBoolean, opt_check) {
this.outputConnection = null;
}
if (newBoolean) {
goog.asserts.assert(!this.previousConnection && !this.nextConnection,
'Remove previous/next connection prior to adding output connection.');
goog.asserts.assert(!this.previousConnection,
'Remove previous connection prior to adding output connection.');
if (opt_check === undefined) {
opt_check = null;
}
@@ -889,9 +887,8 @@ Blockly.Block.prototype.appendDummyInput = function(opt_name) {
Blockly.Block.prototype.jsonInit = function(json) {
// Validate inputs.
goog.asserts.assert(json['output'] == undefined ||
(json['previousStatement'] == undefined &&
json['nextStatement'] == undefined),
'Must not have both an output and a previous/nextStatement.');
json['previousStatement'] == undefined,
'Must not have both an output and a previousStatement.');
// Set basic properties of block.
this.setColour(json['colour']);