Skip to content

Commit

Permalink
fixed inline call() and inline new issue (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe authored Feb 22, 2023
1 parent 3a907da commit 4bb8d95
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## dev branch / next version (1.x.x)

## version 1.14.6 (2023-02-22)

- Fixed inline call() and inline new issue ([#667](https://github.com/HaxeCheckstyle/haxe-formatter/issues/667))

## version 1.14.5 (2023-02-15)

- Fixed null pointer issues ([#666](https://github.com/HaxeCheckstyle/haxe-formatter/issues/666))
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Haxe Formatter

[![Haxelib Version](https://img.shields.io/github/tag/HaxeCheckstyle/haxe-formatter.svg?label=haxelib)](http://lib.haxe.org/p/formatter)
[![Build Status](https://travis-ci.org/HaxeCheckstyle/haxe-formatter.svg?branch=master)](https://travis-ci.org/HaxeCheckstyle/haxe-formatter)
[![Build Status](https://img.shields.io/github/actions/workflow/status/HaxeCheckstyle/haxe-formatter/formatter.yml)](https://github.com/HaxeCheckstyle/haxe-formatter/actions)
[![Haxe-Formatter](https://github.com/HaxeCheckstyle/haxe-formatter/workflows/Haxe-Formatter/badge.svg)](https://github.com/HaxeCheckstyle/haxe-formatter/actions)
[![codecov](https://codecov.io/gh/HaxeCheckstyle/haxe-formatter/branch/master/graph/badge.svg)](https://codecov.io/gh/HaxeCheckstyle/haxe-formatter)
[![Gitter chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/HaxeCheckstyle/haxe-formatter)

A Haxe Code Formatter based on the [tokentree](https://github.com/HaxeCheckstyle/tokentree) library.

Expand Down
6 changes: 3 additions & 3 deletions haxe_libraries/tokentree.hxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @install: lix --silent download "haxelib:/tokentree#1.2.7" into tokentree/1.2.7/haxelib
-cp ${HAXE_LIBCACHE}/tokentree/1.2.7/haxelib/src
-D tokentree=1.2.7
# @install: lix --silent download "haxelib:/tokentree#1.2.8" into tokentree/1.2.8/haxelib
-cp ${HAXE_LIBCACHE}/tokentree/1.2.8/haxelib/src
-D tokentree=1.2.8
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"style"
],
"description": "A code formatter for Haxe",
"version": "1.14.5",
"releasenote": "fixed null pointer issue - see CHANGELOG for details.",
"version": "1.14.6",
"releasenote": "fixed inline call() and inline new issue - see CHANGELOG for details.",
"contributors": [
"AlexHaxe",
"Gama11"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@haxecheckstyle/haxe-formatter",
"version": "1.14.5",
"version": "1.14.6",
"description": "A code formatter for Haxe",
"repository": {
"type": "git",
Expand Down
59 changes: 59 additions & 0 deletions test/testcases/whitespace/inline_calls.hxtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{}

---

function test(){
var x = inline toString();
var x = inline new String("");

inline toString();
inline new String("");

inline function testInline(i:Int) {
return i + 1;
}
var testInline = inline function (i:Int) {
return i + 1;
}
use(inline testInline(3));
inline testInline(3);
}

class Test {
inline public function new(x:Int, y:Int) {}
public inline function new(x:Int, y:Int) {}
public inline static function new(x:Int, y:Int) {}
}

inline public function toString(x:Int, y:Int) {}
public inline function toString(x:Int, y:Int) {}

---

function test() {
var x = inline toString();
var x = inline new String("");

inline toString();
inline new String("");

inline function testInline(i:Int) {
return i + 1;
}
var testInline = inline function(i:Int) {
return i + 1;
}
use(inline testInline(3));
inline testInline(3);
}

class Test {
inline public function new(x:Int, y:Int) {}

public inline function new(x:Int, y:Int) {}

public inline static function new(x:Int, y:Int) {}
}

inline public function toString(x:Int, y:Int) {}
public inline function toString(x:Int, y:Int) {}

0 comments on commit 4bb8d95

Please sign in to comment.