```js title=chunk_js.js
"use strict";
(self['webpackChunkwebpack'] = self['webpackChunkwebpack'] || []).push([["chunk_js"], {
"./chunk.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
__webpack_require__.r(__webpack_exports__);



}),

}]);
```

```js title=main.js
(self['webpackChunkwebpack'] = self['webpackChunkwebpack'] || []).push([["main"], {
"./import-module.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, {
  test: function() { return test; }
});
/* ESM import */var _module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./module.js");


function test() {
	(0,_module__WEBPACK_IMPORTED_MODULE_0__["default"])({
		type: "inline"
	});
}


}),
"./index.js": (function (__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
it("should generate correct code when pure expressions are in dead branches", () => {
	(__webpack_require__("./import-module.js")/* .test */.test)();
	return Promise.all([Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, "./some-module.js")), __webpack_require__.e(/* import() */ "chunk_js").then(__webpack_require__.bind(__webpack_require__, "./chunk.js"))]);
});


}),
"./module.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, {
  "default": function() { return __WEBPACK_DEFAULT_EXPORT__; }
});
/* ESM import */var _some_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./some-module.js");


function getType(obj) {
	return obj.type;
}

// Local functions
function doSomethingWithBlock(obj) {
	return _some_module__WEBPACK_IMPORTED_MODULE_0__.Block.doSomething(obj);
}

function doSomethingWithInline(obj) {
	return _some_module__WEBPACK_IMPORTED_MODULE_0__.Inline.doSomething(obj);
}

function doSomethingWithDocument(obj) {
	return _some_module__WEBPACK_IMPORTED_MODULE_0__.Document.doSomething(obj);
}

// Exported functions
function doSomething(obj) {
	const type = getType(obj);

	switch (type) {
		case "document":
			return doSomethingWithDocument(obj);
		case "block":
			return doSomethingWithBlock(obj);
		case "inline":
			return doSomethingWithInline(obj);
		default:
			throw new Error();
	}
}

function useDocument(obj) {
	return doSomethingWithDocument(obj);
}


/* ESM default export */ const __WEBPACK_DEFAULT_EXPORT__ = (doSomething);


}),
"./some-module.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
  Block: function() { return Block; },
  Document: function() { return Document; },
  Inline: function() { return Inline; }
});
class Block {
	static doSomething() {}
}

class Inline {
	static doSomething() {}
}

class Document {
	static doSomething() {}
}




}),

},function(__webpack_require__) {
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId) }
var __webpack_exports__ = (__webpack_exec__("./index.js"));

}
]);
```