From c4c0d0502d7f536a74d6aef5b50b8fe3e48ad397 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 19 Aug 2021 16:13:18 +0200 Subject: [PATCH] Test for external calls. --- .../libsolidity/semanticTests/fixedPoint/calls.sol | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/libsolidity/semanticTests/fixedPoint/calls.sol diff --git a/test/libsolidity/semanticTests/fixedPoint/calls.sol b/test/libsolidity/semanticTests/fixedPoint/calls.sol new file mode 100644 index 000000000..34450a972 --- /dev/null +++ b/test/libsolidity/semanticTests/fixedPoint/calls.sol @@ -0,0 +1,14 @@ +contract C { + function f(fixed128x2 x) public view returns (ufixed64x4) { + return ufixed64x4(ufixed128x4(ufixed128x2(x))); + } + function test() public view returns (ufixed64x4 x, fixed y) { + fixed64x1 a = 1234.3; + x = this.f(a); + y = this.f(-1234.3); + } +} +// ==== +// compileViaYul: also +// ---- +// test() -> 1234.3000, 1844674407369720.861600000000000000