diff --git a/engine/runtime-integration-tests/src/test/java/org/enso/compiler/test/TypesFromSignaturesTest.java b/engine/runtime-integration-tests/src/test/java/org/enso/compiler/test/TypesFromSignaturesTest.java index 2d5f8acdf7f0..cda0578369f4 100644 --- a/engine/runtime-integration-tests/src/test/java/org/enso/compiler/test/TypesFromSignaturesTest.java +++ b/engine/runtime-integration-tests/src/test/java/org/enso/compiler/test/TypesFromSignaturesTest.java @@ -36,20 +36,22 @@ public void simpleCheck() throws Exception { var module = compile(src); var f1 = findStaticMethod(module, "f"); - assertInferredType(f1, "(A -> (B -> C))"); + assertInferredType(f1, "A -> (B -> C)"); } @Test public void variousExpressions() throws Exception { - final URI uri = new URI("memory://simpleCheck.enso"); + final URI uri = new URI("memory://variousExpressions.enso"); final Source src = Source.newBuilder( "enso", """ type A + Value + + self other = other type B - f1 (x : A) -> B = 1 + f1 (_ : A) -> B = 1 f2 (x : A) -> B = x + 10 f3 (x : A) -> B = [x] f4 (x : A) -> B = f1 x @@ -64,12 +66,12 @@ public void variousExpressions() throws Exception { .buildLiteral(); var module = compile(src); - assertInferredType(findStaticMethod(module, "f1"), "(A -> B)"); - assertInferredType(findStaticMethod(module, "f2"), "(A -> B)"); - assertInferredType(findStaticMethod(module, "f3"), "(A -> B)"); - assertInferredType(findStaticMethod(module, "f4"), "(A -> B)"); - assertInferredType(findStaticMethod(module, "f5"), "(A -> B)"); - assertInferredType(findStaticMethod(module, "f6"), "(A -> B)"); + assertInferredType(findStaticMethod(module, "f1"), "A -> B"); + assertInferredType(findStaticMethod(module, "f2"), "A -> B"); + assertInferredType(findStaticMethod(module, "f3"), "A -> B"); + assertInferredType(findStaticMethod(module, "f4"), "A -> B"); + assertInferredType(findStaticMethod(module, "f5"), "A -> B"); + assertInferredType(findStaticMethod(module, "f6"), "A -> B"); } @Test @@ -108,11 +110,11 @@ public void justArity() throws Exception { // For a function without ascriptions, we can at least infer the _arity_ // Currently that is denoted by replacing unknowns with Any. Later this may be free type // variables. - assertInferredType(f4, "(Any -> (Any -> (Any -> (Any -> Any))))"); + assertInferredType(f4, "Any -> (Any -> (Any -> (Any -> Any)))"); // For the 'opted-out' ascription, the types are ignored, because they are not checked types. // But we still infer arity. - assertInferredType(f2, "(Any -> (Any -> Any))"); + assertInferredType(f2, "Any -> (Any -> Any)"); } @Test @@ -135,8 +137,8 @@ member_method self (x : A) -> A = x var staticMethod = findMemberMethod(module, "A", "static_method"); var memberMethod = findMemberMethod(module, "A", "member_method"); - assertInferredType(staticMethod, "(A -> A)"); - assertInferredType(memberMethod, "(A -> A)"); + assertInferredType(staticMethod, "A -> A"); + assertInferredType(memberMethod, "A -> A"); } @Test @@ -159,8 +161,8 @@ A.extension_member_method self (x : A) -> A = x var staticMethod = findMemberMethod(module, "A", "extension_static_method"); var memberMethod = findMemberMethod(module, "A", "extension_member_method"); - assertInferredType(staticMethod, "(A -> A)"); - assertInferredType(memberMethod, "(A -> A)"); + assertInferredType(staticMethod, "A -> A"); + assertInferredType(memberMethod, "A -> A"); } private void assertInferredType(IR ir, String expected) {