diff --git a/CHANGELOG.md b/CHANGELOG.md index 14a1e3f0..fa8a110f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - Fixed braceless if body with conditionals, fixes [#328](https://github.com/HaxeCheckstyle/haxe-formatter/issues/328) ([#351](https://github.com/HaxeCheckstyle/haxe-formatter/issues/351)) - Fixed complex conditional typedef, fixes [#336](https://github.com/HaxeCheckstyle/haxe-formatter/issues/336) ([#351](https://github.com/HaxeCheckstyle/haxe-formatter/issues/351)) - Fixed parameter wrapping with multiline string, fixes [#320](https://github.com/HaxeCheckstyle/haxe-formatter/issues/320) ([#351](https://github.com/HaxeCheckstyle/haxe-formatter/issues/351)) +- Fixed indentation of untyped assignment, fixes [#326](https://github.com/HaxeCheckstyle/haxe-formatter/issues/326) +- Fixed indentation of anon function call, fixes [#315](https://github.com/HaxeCheckstyle/haxe-formatter/issues/315) ## version 1.4.0 (2019-02-07) diff --git a/test/testcases/indentation/issue_315_anon_function_call.hxtest b/test/testcases/indentation/issue_315_anon_function_call.hxtest new file mode 100644 index 00000000..45fb3582 --- /dev/null +++ b/test/testcases/indentation/issue_315_anon_function_call.hxtest @@ -0,0 +1,22 @@ +{ +} + +--- + +class Main { + static function main() { + context.subscriptions.push(Vscode.commands.registerCommand("hellohaxe.sayHello", function() { + Vscode.window.showInformationMessage("Hello from Haxe!"); + })); + } +} + +--- + +class Main { + static function main() { + context.subscriptions.push(Vscode.commands.registerCommand("hellohaxe.sayHello", function() { + Vscode.window.showInformationMessage("Hello from Haxe!"); + })); + } +} diff --git a/test/testcases/indentation/issue_326_untyped_assignment.hxtest b/test/testcases/indentation/issue_326_untyped_assignment.hxtest new file mode 100644 index 00000000..fe0e2ede --- /dev/null +++ b/test/testcases/indentation/issue_326_untyped_assignment.hxtest @@ -0,0 +1,22 @@ +{ +} + +--- + +class Main { + public static function main() { + (untyped foo).bar = function() { + trace(); + } + } +} + +--- + +class Main { + public static function main() { + (untyped foo).bar = function() { + trace(); + } + } +}