Skip to content

duplicate let typeofJQuery with Haxe 4.1.x #30

Description

@AlexHaxe

compiling a project using jQueryExtern with Haxe 4.1.x and -dce no will result in a .js file containing the following snippet:

let typeofJQuery = typeof($);
if(typeofJQuery != "undefined" && $.fn != null) {
	$.fn.elements = function() {
		return new js_jquery_JqEltsIterator(this);
	};
}
let typeofJQuery = typeof($);
if(typeofJQuery != "undefined" && $.fn != null) {
	$.fn.iterator = function() {
		return new js_jquery_JqIterator(this);
	};
}

Which will raise a syntax error if you e.g. run it through closure for minification, because let typeofJQuery appears twice in the same scope.
Haxe 4.0.5 would emit a var instead of a let, avoiding that issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions