diff --git a/pkl-core/src/main/java/org/pkl/core/runtime/VmValueRenderer.java b/pkl-core/src/main/java/org/pkl/core/runtime/VmValueRenderer.java index 3038df668..d3642adeb 100644 --- a/pkl-core/src/main/java/org/pkl/core/runtime/VmValueRenderer.java +++ b/pkl-core/src/main/java/org/pkl/core/runtime/VmValueRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. + * Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -371,7 +371,7 @@ private void writeClassName(VmValue value) { VmClass clazz = value.getVmClass(); append("new "); - append(clazz.getSimpleName()); + append(clazz.getDisplayName()); append(' '); } diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/api/any.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/api/any.pcf index e829cf749..6a7888b4d 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/api/any.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/api/any.pcf @@ -39,7 +39,7 @@ examples { "new Listing { 1; 2; 3 }" "new Mapping { [\"Pigeon\"] = 42; [\"Barn Owl\"] = 21 }" "new Dynamic { name = \"Pigeon\"; age = 42 }" - "new Person2 { name = \"Pigeon\"; age = 42 }" + "new any#Person2 { name = \"Pigeon\"; age = 42 }" "null" "null" } diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/api/propertiesRenderer4.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/api/propertiesRenderer4.pcf index bffd2942e..c4d98faf3 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/api/propertiesRenderer4.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/api/propertiesRenderer4.pcf @@ -11,7 +11,7 @@ res10 = "Cannot render value of type `Map` as Properties. Value: Map(\"name\", \ res11 = "Cannot render value of type `Listing` as Properties. Value: new Listing { \"pigeon\"; \"parrot\" }" res12 = "Cannot render value of type `Mapping` as Properties. Value: new Mapping { [\"name\"] = ?; [\"age\"] = ? }" res13 = "Cannot render value of type `Dynamic` as Properties. Value: new Dynamic { name = ?; age = ? }" -res14 = "Cannot render value of type `propertiesRenderer4#Person` as Properties. Value: new Person { name = ?; age = ? }" +res14 = "Cannot render value of type `propertiesRenderer4#Person` as Properties. Value: new propertiesRenderer4#Person { name = ?; age = ? }" res15 = "Cannot render value of type `Pair` as Properties. Value: Pair(1, 2)" res16 = "Cannot render value of type `Class` as Properties. Value: propertiesRenderer4#Person" res17 = "Cannot render value of type `TypeAlias` as Properties. Value: propertiesRenderer4#Email" diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/api/reflect4.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/api/reflect4.pcf index 94ce1d7c4..0e3b76501 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/api/reflect4.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/api/reflect4.pcf @@ -115,10 +115,10 @@ examples { ["annAOverrideB"] { name = "annAOverrideB" annotations { - "new MyAnn {}" + "new reflect4#MyAnn {}" } allAnnotations { - "new MyAnn {}" + "new reflect4#MyAnn {}" "new Unlisted {}" } modifiers {} @@ -128,10 +128,10 @@ examples { ["annAOverrideC"] { name = "annAOverrideC" annotations { - "new MyAnn {}" + "new reflect4#MyAnn {}" } allAnnotations { - "new MyAnn {}" + "new reflect4#MyAnn {}" "new Unlisted {}" } modifiers {} @@ -145,7 +145,7 @@ examples { } allAnnotations { "new AlsoKnownAs { names { \"mergedAnnotations\" } }" - "new MyAnn {}" + "new reflect4#MyAnn {}" "new Unlisted {}" } modifiers {} diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/api/xmlRendererInline3.xml b/pkl-core/src/test/files/LanguageSnippetTests/output/api/xmlRendererInline3.xml index 97c000e73..9e480a8b9 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/api/xmlRendererInline3.xml +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/api/xmlRendererInline3.xml @@ -5,5 +5,5 @@ 42 `xml.Element` is not supported here. Value: new Dynamic { _isXmlElement = true; name = "pigeon2"; attributes {}; isBlockF... - `xml.Inline` is not supported here. Value: new Inline { value { name = ?; age = ? } } + `xml.Inline` is not supported here. Value: new pkl.xml#Inline { value { name = ?; age = ? } } diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/api/yamlRendererStream2.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/api/yamlRendererStream2.pcf index 1f891c605..f80c02f7d 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/api/yamlRendererStream2.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/api/yamlRendererStream2.pcf @@ -21,6 +21,6 @@ examples { } ["invalid top level value"] { "The top-level value of a YAML stream must have type `Listing`, `List`, or `Set`, but got type `Int`. Value: 5" - "The top-level value of a YAML stream must have type `Listing`, `List`, or `Set`, but got type `yamlRendererStream2#Foo`. Value: new Foo {}" + "The top-level value of a YAML stream must have type `Listing`, `List`, or `Set`, but got type `yamlRendererStream2#Foo`. Value: new yamlRendererStream2#Foo {}" } } diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/basic/as.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/basic/as.pcf index 143873348..71feacb20 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/basic/as.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/basic/as.pcf @@ -35,8 +35,8 @@ examples { "Expected value of type `Null`, but got type `List`. Value: List(1, 2, 3)" "Expected value of type `Null`, but got type `Set`. Value: Set(1, 2, 3)" "Expected value of type `Null`, but got type `Map`. Value: Map(1, \"one\", 2, \"two\", 3, \"three\")" - "Expected value of type `Null`, but got type `as#Base`. Value: new Base {}" - "Expected value of type `Null`, but got type `as#Derived`. Value: new Derived {}" + "Expected value of type `Null`, but got type `as#Base`. Value: new as#Base {}" + "Expected value of type `Null`, but got type `as#Derived`. Value: new as#Derived {}" "Expected value of type `Null`, but got type `Mapping`. Value: new Mapping { [\"name\"] = \"Pigeon\"; [\"age\"] = 40 }" "Expected value of type `Null`, but got type `Class`. Value: as#Base" "Expected value of type `Null`, but got type `Listing`. Value: new Listing { null; null; \"Expected value of type `Null`, but got type `Strin..." @@ -59,9 +59,9 @@ examples { "Expected value of type `Int`, but got type `Map`. Value: Map(1, \"one\", 2, \"two\", 3, \"three\")" "Expected value of type `Int`, but got `null`." "Expected value of type `Int`, but got `null`." - "Expected value of type `Int`, but got type `as#Base`. Value: new Base {}" + "Expected value of type `Int`, but got type `as#Base`. Value: new as#Base {}" "Expected value of type `Int`, but got type `Function1`. Value: new Function1 {}" - "Expected value of type `Int`, but got type `as#Derived`. Value: new Derived {}" + "Expected value of type `Int`, but got type `as#Derived`. Value: new as#Derived {}" "Expected value of type `Int`, but got type `Mapping`. Value: new Mapping { [\"name\"] = \"Pigeon\"; [\"age\"] = 40 }" "Expected value of type `Int`, but got type `Class`. Value: as#Base" "Expected value of type `Int`, but got type `Listing`. Value: new Listing { 42; \"Expected value of type `Int`, but got type `String`. Value..." @@ -83,8 +83,8 @@ examples { "Expected value of type `as#Other`, but got type `Map`. Value: Map(1, \"one\", 2, \"two\", 3, \"three\")" "Expected value of type `as#Other`, but got `null`." "Expected value of type `as#Other`, but got `null`." - "Expected value of type `as#Other`, but got type `as#Base`. Value: new Base {}" - "Expected value of type `as#Other`, but got type `as#Derived`. Value: new Derived {}" + "Expected value of type `as#Other`, but got type `as#Base`. Value: new as#Base {}" + "Expected value of type `as#Other`, but got type `as#Derived`. Value: new as#Derived {}" "Expected value of type `as#Other`, but got type `Mapping`. Value: new Mapping { [\"name\"] = \"Pigeon\"; [\"age\"] = 40 }" "Expected value of type `as#Other`, but got type `Class`. Value: as#Base" "Expected value of type `as#Other`, but got type `Listing`. Value: new Listing { \"Expected value of type `as#Other`, but got type `String`. Valu..." @@ -124,7 +124,7 @@ examples { } ["derived class"] { new {} - "Expected value of type `as#Derived`, but got type `as#Base`. Value: new Base {}" + "Expected value of type `as#Derived`, but got type `as#Base`. Value: new as#Base {}" } ["Mapping"] { new { diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/basic/string.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/basic/string.pcf index 8b5d5a8f1..1b53f8984 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/basic/string.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/basic/string.pcf @@ -30,7 +30,7 @@ examples { "new Listing { 1; 2; 3 }" "new Mapping { [\"Pigeon\"] = 42; [\"Barn Owl\"] = 21 }" "new Dynamic { name = \"Pigeon\"; age = 42 }" - "new Person { name = \"Pigeon\"; age = 42 }" + "new string#Person { name = \"Pigeon\"; age = 42 }" "My name is Pigeon and I'm 42 years old." "null" "null" diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/classes/constraints3.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/classes/constraints3.pcf index 221ecc6b4..3217a77f6 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/classes/constraints3.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/classes/constraints3.pcf @@ -3,4 +3,4 @@ res1 { street = "Hampton St." } } -res2 = "Type constraint `street.endsWith(\"St.\")` violated. Value: new Address { street = \"Garlic Blvd.\" }" +res2 = "Type constraint `street.endsWith(\"St.\")` violated. Value: new constraints3#Address { street = \"Garlic Blvd.\" }" diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/classes/constraints7.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/classes/constraints7.pcf index 5c38476ea..56c766ae6 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/classes/constraints7.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/classes/constraints7.pcf @@ -3,4 +3,4 @@ res1 { z = 12 } } -res2 = "Type constraint `multiply(subtract(add(5, 4), 3), 2) == z` violated. Value: new Y { z = 13 }" +res2 = "Type constraint `multiply(subtract(add(5, 4), 3), 2) == z` violated. Value: new constraints7#Y { z = 13 }" diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/anyConverterError.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/anyConverterError.err index ac3f423fd..f20456890 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/anyConverterError.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/anyConverterError.err @@ -6,7 +6,7 @@ xxx | renderer.renderDocument(value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ at pkl.base#Module.output.text (pkl:base) -This value was converted during rendering. Previous: new ModuleClass {}. After: "anyConverterError". +This value was converted during rendering. Previous: new anyConverterError {}. After: "anyConverterError". xxx | if (renderer is BytesRenderer) renderer.renderDocument(value) else text.encodeToBytes("UTF-8") ^^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails1.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails1.err index 8e029c38f..7f3e12c41 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails1.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails1.err @@ -1,13 +1,13 @@ –– Pkl Error –– Type constraint `firstOneIsSandy` violated. -Value: new Listing { new Bird { name = "Bob" }; new Bird { name = ? } } +Value: new Listing { new constraintDetails1#Bird { name = "Bob" }; new constraintDet... (it: Listing) -> it[0].name == "Sandy" │ │ │ │ │ │ │ false │ │ "Bob" - │ new Bird { name = "Bob" } - new Listing { new Bird { name = "Bob" }; new Bird { name = ? } } + │ new constraintDetails1#Bird { name = "Bob" } + new Listing { new constraintDetails1#Bird { name = "Bob" }; new constraintDetails1#Bird { name = ... x | birds: Listing(firstOneIsSandy) = new { ^^^^^^^^^^^^^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails2.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails2.err index d2c6cba68..5660adb76 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails2.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails2.err @@ -1,18 +1,18 @@ –– Pkl Error –– Type constraint `let (myself: Listing = this) myself[0].name == "Sandy"` violated. -Value: new Listing { new Bird { name = "Bob" }; new Bird { name = ? } } +Value: new Listing { new constraintDetails2#Bird { name = "Bob" }; new constraintDet... let (myself: Listing = this) │ - new Listing { new Bird { name = "Bob" }; new Bird { name = ? } } + new Listing { new constraintDetails2#Bird { name = "Bob" }; new constraintDetails2#Bird { name = ... myself[0].name == "Sandy" │ │ │ │ │ │ │ false │ │ "Bob" - │ new Bird { name = "Bob" } - new Listing { new Bird { name = "Bob" }; new Bird { name = ? } } + │ new constraintDetails2#Bird { name = "Bob" } + new Listing { new constraintDetails2#Bird { name = "Bob" }; new constraintDetails2#Bird { name = ... x | let (myself: Listing = this) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails3.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails3.err index f847d7deb..8934351c9 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails3.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/constraintDetails3.err @@ -1,11 +1,11 @@ –– Pkl Error –– Type constraint `toList().every((it: Listing) -> it[0].name == "Bob")` violated. -Value: new Listing { new Listing { new Bird { name = "Eagle" }; new Bird { name = ? ... +Value: new Listing { new Listing { new constraintDetails3#Bird { name = "Eagle" }; n... toList().every((it: Listing) -> it[0].name == "Bob") │ │ │ false - List(new Listing { new Bird { name = "Eagle" }; new Bird { name = ? } }) + List(new Listing { new constraintDetails3#Bird { name = "Eagle" }; new constraintDetails3#Bird { ... x | foo: Listing(toList().every((it: Listing) -> it[0].name == "Bob")) = new { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/forGeneratorCannotIterateOverTyped.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/forGeneratorCannotIterateOverTyped.err index a29c0e47e..2ee7b325e 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/forGeneratorCannotIterateOverTyped.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/forGeneratorCannotIterateOverTyped.err @@ -1,6 +1,6 @@ –– Pkl Error –– Cannot iterate over value of type `forGeneratorCannotIterateOverTyped#Person`. -Value: new Person {} +Value: new forGeneratorCannotIterateOverTyped#Person {} x | for (_ in new Person {}) { 42 } ^^^^^^^^^^^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/listingTypeCheckError9.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/listingTypeCheckError9.err index 34e06cbda..2444aa443 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/listingTypeCheckError9.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/listingTypeCheckError9.err @@ -1,6 +1,6 @@ –– Pkl Error –– Expected value of type `listingTypeCheckError9#Bar`, but got type `listingTypeCheckError9#Foo`. -Value: new Foo {} +Value: new listingTypeCheckError9#Foo {} x | local c = b as Listing ^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/mappingTypeCheckError11.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/mappingTypeCheckError11.err index b53aa426e..12131c7ae 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/mappingTypeCheckError11.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/mappingTypeCheckError11.err @@ -1,6 +1,6 @@ –– Pkl Error –– Expected value of type `mappingTypeCheckError11#Bar`, but got type `mappingTypeCheckError11#Foo`. -Value: new Foo {} +Value: new mappingTypeCheckError11#Foo {} x | local c = b as Mapping ^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/power/typeConstraints16.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/power/typeConstraints16.err index d4561099a..3614b0300 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/power/typeConstraints16.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/power/typeConstraints16.err @@ -1,6 +1,6 @@ –– Pkl Error –– Type constraint `name?.contains("Bob") ?? false` violated. -Value: new Bird { name = "Pigeon" } +Value: new typeConstraints16#Bird { name = "Pigeon" } name?.contains("Bob") ?? false │ │ │ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/power/typeConstraints2.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/power/typeConstraints2.err index 699fd7afc..6327f2bda 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/power/typeConstraints2.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/power/typeConstraints2.err @@ -5,7 +5,7 @@ Value: "Huzzah" startsWith(bub.name) │ │ │ false │ "Bub" - new Person { name = "Bub" } + new typeConstraints2#Person { name = "Bub" } x | foo: String(startsWith(bub.name)) = "Huzzah" ^^^^^^^^^^^^^^^^^^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/spreadSyntaxCannotIterateOverTyped.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/spreadSyntaxCannotIterateOverTyped.err index 1416f8f8e..1540d0ac6 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/spreadSyntaxCannotIterateOverTyped.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/spreadSyntaxCannotIterateOverTyped.err @@ -1,6 +1,6 @@ –– Pkl Error –– Cannot iterate over value of type `spreadSyntaxCannotIterateOverTyped#Person`. -Value: new Person { name = ? } +Value: new spreadSyntaxCannotIterateOverTyped#Person { name = ? } x | ...person ^^^^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/undefinedProperty3.err b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/undefinedProperty3.err index af3ce2c2c..34b9cf996 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/errors/undefinedProperty3.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/errors/undefinedProperty3.err @@ -5,7 +5,7 @@ xx | theNumber : Int ^^^^^^^^^ at undefinedProperty3#C.theNumber (file:///$snippetsDir/input/errors/undefinedProperty3.pkl) -The above error occurred when rendering path `a.b[new D { dProperty = "dProperty" }].`bar-baz`.theNumber` of module `file:///$snippetsDir/input/errors/undefinedProperty3.pkl`. +The above error occurred when rendering path `a.b[new undefinedProperty3#D { dProperty = "dProperty" }].`bar-baz`.theNumber` of module `file:///$snippetsDir/input/errors/undefinedProperty3.pkl`. xxx | renderer.renderDocument(value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/lambdas/amendLambdaParametersTyped.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/lambdas/amendLambdaParametersTyped.pcf index cf48e5b36..b7802730e 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/lambdas/amendLambdaParametersTyped.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/lambdas/amendLambdaParametersTyped.pcf @@ -22,5 +22,5 @@ example5 { } } example6 { - result = "Expected value of type `amendLambdaParametersTyped#Baz`, but got type `amendLambdaParametersTyped#Foo`. Value: new Foo {}" + result = "Expected value of type `amendLambdaParametersTyped#Baz`, but got type `amendLambdaParametersTyped#Foo`. Value: new amendLambdaParametersTyped#Foo {}" } diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/lambdas/pipeOperator.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/lambdas/pipeOperator.pcf index 3be0077b4..bf0ce4481 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/lambdas/pipeOperator.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/lambdas/pipeOperator.pcf @@ -8,4 +8,4 @@ res7 = 22 res8 = 44 res9 = 44 res10 = "Operator `|>` is not defined for operand types `Int` and `Int`. Left operand : 42 Right operand: 21" -res11 = "Operator `|>` is not defined for operand types `Int` and `pipeOperator#Person`. Left operand : 42 Right operand: new Person {}" +res11 = "Operator `|>` is not defined for operand types `Int` and `pipeOperator#Person`. Left operand : 42 Right operand: new pipeOperator#Person {}" diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/listings2/wrongParent.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/listings2/wrongParent.pcf index 626cc23f1..7df868e82 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/listings2/wrongParent.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/listings2/wrongParent.pcf @@ -1,12 +1,12 @@ res1 = "Cannot instantiate, or amend an instance of, external class `Int`." res2 = "Cannot instantiate, or amend an instance of, external class `List`." res3 = "Cannot instantiate, or amend an instance of, external class `List`." -res4 = "Object of type `new Person {}` cannot have an element." +res4 = "Object of type `new wrongParent#Person {}` cannot have an element." res5 = "Cannot instantiate abstract class `ValueRenderer`." res6 = "Object of type `new Mapping {}` cannot have an element." res7 = "Cannot instantiate, or amend an instance of, external class `Int`." res8 = "Cannot instantiate, or amend an instance of, external class `List`." res9 = "Cannot instantiate, or amend an instance of, external class `List`." -res10 = "Object of type `new Person {}` cannot have an element." +res10 = "Object of type `new wrongParent#Person {}` cannot have an element." res11 = "Cannot instantiate abstract class `ValueRenderer`." res12 = "Object of type `new Mapping {}` cannot have an element." diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/mappings2/wrongParent.pcf b/pkl-core/src/test/files/LanguageSnippetTests/output/mappings2/wrongParent.pcf index 4451e1d4c..ab2a23aa9 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/mappings2/wrongParent.pcf +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/mappings2/wrongParent.pcf @@ -1,12 +1,12 @@ res1 = "Cannot instantiate, or amend an instance of, external class `Int`." res2 = "Cannot instantiate, or amend an instance of, external class `List`." res3 = "Cannot instantiate, or amend an instance of, external class `List`." -res4 = "Object of type `new Person {}` cannot have an entry." +res4 = "Object of type `new wrongParent#Person {}` cannot have an entry." res5 = "Cannot instantiate abstract class `ValueRenderer`." res6 = "Element index `0` is out of range `0`..`-1`." res7 = "Cannot instantiate, or amend an instance of, external class `Int`." res8 = "Cannot instantiate, or amend an instance of, external class `List`." res9 = "Cannot instantiate, or amend an instance of, external class `List`." -res10 = "Object of type `new Person {}` cannot have an entry." +res10 = "Object of type `new wrongParent#Person {}` cannot have an entry." res11 = "Cannot instantiate abstract class `ValueRenderer`." res12 = "Element index `0` is out of range `0`..`-1`." diff --git a/pkl-core/src/test/files/LanguageSnippetTests/output/projects/badProjectDeps4/bug.err b/pkl-core/src/test/files/LanguageSnippetTests/output/projects/badProjectDeps4/bug.err index d29b1584d..b6e6b9444 100644 --- a/pkl-core/src/test/files/LanguageSnippetTests/output/projects/badProjectDeps4/bug.err +++ b/pkl-core/src/test/files/LanguageSnippetTests/output/projects/badProjectDeps4/bug.err @@ -1,6 +1,6 @@ –– Pkl Error –– Expected value of type `*RemoteDependency | Project(isValidLoadDependency)`, but got a different `pkl.Project`. -Value: new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"] ... +Value: new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"] ... xxx | dependencies: Mapping ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -8,26 +8,26 @@ at pkl.Project#dependencies (pkl:Project) * Value is not of type `Project(isValidLoadDependency)` because: Type constraint `isValidLoadDependency` violated. - Value: new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"... + Value: new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"... (it: Project) -> isUriLocal(projectFileUri, it.projectFileUri) │ │ │ │ true │ │ "file:///$snippetsDir/projects/badProjectDeps4/PklProject" - │ new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett... + │ new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett... "file:///$snippetsDir/projects/badProjectDeps4/PklProject" && it.projectFileUri.endsWith("/PklProject") │ │ │ │ │ │ │ true │ │ "file:///$snippetsDir/projects/badProjectDeps4/PklProject" - │ new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett... + │ new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett... true && it != module │ │ │ │ │ false - │ new ModuleClass { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett... + │ new pkl.Project { package = ?; tests = ?; dependencies { ["badLocalProject"] = ? }; evaluatorSett... false && it.package != null