inFunctionScope(hasThis, params, fn) {
		const oldScope = this.scope;
		this.scope = {
			topLevelScope: oldScope.topLevelScope,
			inTry: false,
			inShorthand: false,
			inTaggedTemplateTag: false,
			isStrict: oldScope.isStrict,
			isAsmJs: oldScope.isAsmJs,
			terminated: undefined,
			definitions: oldScope.definitions.createChild()
		};

		if (hasThis) {
			this.undefineVariable("this");
		}

		this.enterPatterns(params, ident => {
			this.defineVariable(ident);
		});

		fn();

		this.scope = oldScope;
	}
@param {boolean} hasThis true, when this is defined
@param {(Pattern | string)[]} params scope params
@param {() => void} fn inner function
@returns {void}