Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyhowStep committed Sep 22, 2019
1 parent a2ada0f commit c413c11
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
6 changes: 3 additions & 3 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
Expand Up @@ -50,7 +50,7 @@
"tape": "^4.11.0",
"ts-node": "^8.3.0",
"ts-simple-type": "^0.3.5",
"typescript": "^3.5.1"
"typescript": "^3.6.3"
},
"dependencies": {
"type-mapping": "^1.27.0"
Expand Down
21 changes: 18 additions & 3 deletions test/run-time/input/expr-library/double/acos/double.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,24 @@ tape(__filename, t => {
myColumn : tm.mysql.double(),
});

const expr = tsql.double.acos(tsql.coalesce(tsql.double.acos(
myTable.columns.myColumn
), 0));
//This is OK, after assigning to a temporary variable
const tmp = tsql.coalesce(
tsql.double.acos(myTable.columns.myColumn),
0
);
const expr2 = tsql.double.acos(
tmp
);
expr2;

//This gives the `Type instantiation is excessively deep and possibly infinite.`
//error.
const expr = tsql.double.acos(
tsql.coalesce(
tsql.double.acos(myTable.columns.myColumn),
0
)
);
t.deepEqual(
tsql.AstUtil.toSql(expr.ast, sqliteSqlfier),
`ACOS(COALESCE(ACOS("myTable"."myColumn"), 0e0))`
Expand Down

0 comments on commit c413c11

Please sign in to comment.