mirror of
https://github.com/apple/pkl.git
synced 2026-06-12 08:34:27 +02:00
@@ -1543,7 +1543,7 @@ public abstract class TypeNode extends PklNode {
|
|||||||
if (skipEntryTypeChecks) return value;
|
if (skipEntryTypeChecks) return value;
|
||||||
for (var entry : value) {
|
for (var entry : value) {
|
||||||
keyTypeNode.executeEagerly(frame, VmUtils.getKey(entry));
|
keyTypeNode.executeEagerly(frame, VmUtils.getKey(entry));
|
||||||
valueTypeNode.executeLazily(frame, VmUtils.getValue(entry));
|
valueTypeNode.executeEagerly(frame, VmUtils.getValue(entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
LoopNode.reportLoopCount(this, value.getLength());
|
LoopNode.reportLoopCount(this, value.getLength());
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
amends "../snippetTest.pkl"
|
amends "../snippetTest.pkl"
|
||||||
|
|
||||||
|
local class Animal
|
||||||
|
|
||||||
|
local class Person
|
||||||
|
|
||||||
facts {
|
facts {
|
||||||
["List"] {
|
["List"] {
|
||||||
List(1, 2, 3) is List<Int>
|
List(1, 2, 3) is List<Int>
|
||||||
@@ -16,6 +20,7 @@ facts {
|
|||||||
["Map"] {
|
["Map"] {
|
||||||
Map("Pigeon", 42, "Barn Owl", 21) is Map<String, Int>
|
Map("Pigeon", 42, "Barn Owl", 21) is Map<String, Int>
|
||||||
!(Map("Pigeon", 42, "Barn Owl", 21) is Map<Int, String>)
|
!(Map("Pigeon", 42, "Barn Owl", 21) is Map<Int, String>)
|
||||||
|
!(Map("bob", new Listing { new Animal {} }) is Map<String, Listing<Person>>)
|
||||||
}
|
}
|
||||||
|
|
||||||
["Listing"] {
|
["Listing"] {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ facts {
|
|||||||
["Map"] {
|
["Map"] {
|
||||||
true
|
true
|
||||||
true
|
true
|
||||||
|
true
|
||||||
}
|
}
|
||||||
["Listing"] {
|
["Listing"] {
|
||||||
true
|
true
|
||||||
|
|||||||
Reference in New Issue
Block a user