this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cue/testdata: add test cases for #3924

Reduced test cases from cuelang.org/docs content show that
edge cases involving ellipsis and matchN no longer fail with
closedness errors as we expect them to.

For #3924.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ia0bae2c8c97f4d5b4bd6dbcbf50d64685163f9a9
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1215073
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>

+367 -87
+367 -87
cue/testdata/eval/closedness.txtar
··· 474 474 x: #T.s 475 475 x: foo: "foo" 476 476 } 477 + issue3924: one: { 478 + #Schema: { 479 + ... 480 + {[string]: #SchemaInner} 481 + } 482 + #SchemaInner: allowed?: string 483 + 484 + out: #Schema & {foo: disallowed: "foo"} // should fail 485 + } 486 + issue3924: two: { 487 + #Schema: { 488 + {[string]: #job} 489 + 490 + #job: matchN(1, [{ 491 + other?: string 492 + ... 493 + }]) & close({ 494 + allowed?: string 495 + }) 496 + } 497 + out: #Schema & {foo: disallowed: "bar"} // should fail 498 + } 499 + 477 500 -- reroot.cue -- 478 501 import "list" 479 502 ··· 718 741 } 719 742 720 743 -- out/evalalpha/stats -- 721 - Leaks: 940 744 + Leaks: 994 722 745 Freed: 0 723 746 Reused: 0 724 - Allocs: 940 747 + Allocs: 994 725 748 Retain: 0 726 749 727 - Unifications: 918 728 - Conjuncts: 1997 750 + Unifications: 966 751 + Conjuncts: 2073 729 752 Disjuncts: 2 730 753 731 - CloseIDElems: 4858 732 - NumCloseIDs: 680 754 + CloseIDElems: 4949 755 + NumCloseIDs: 708 733 756 -- diff/-out/evalalpha/stats<==>+out/eval/stats -- 734 757 diff old new 735 758 --- old 736 759 +++ new 737 760 @@ -1,9 +1,12 @@ 738 - -Leaks: 18 739 - -Freed: 790 740 - -Reused: 782 741 - -Allocs: 26 742 - -Retain: 83 761 + -Leaks: 21 762 + -Freed: 828 763 + -Reused: 820 764 + -Allocs: 29 765 + -Retain: 89 743 766 - 744 - -Unifications: 802 745 - -Conjuncts: 2026 746 - -Disjuncts: 874 747 - +Leaks: 940 767 + -Unifications: 843 768 + -Conjuncts: 2097 769 + -Disjuncts: 918 770 + +Leaks: 994 748 771 +Freed: 0 749 772 +Reused: 0 750 - +Allocs: 940 773 + +Allocs: 994 751 774 +Retain: 0 752 775 + 753 - +Unifications: 918 754 - +Conjuncts: 1997 776 + +Unifications: 966 777 + +Conjuncts: 2073 755 778 +Disjuncts: 2 756 779 + 757 - +CloseIDElems: 4858 758 - +NumCloseIDs: 680 780 + +CloseIDElems: 4949 781 + +NumCloseIDs: 708 759 782 -- out/eval/stats -- 760 - Leaks: 18 761 - Freed: 790 762 - Reused: 782 763 - Allocs: 26 764 - Retain: 83 783 + Leaks: 21 784 + Freed: 828 785 + Reused: 820 786 + Allocs: 29 787 + Retain: 89 765 788 766 - Unifications: 802 767 - Conjuncts: 2026 768 - Disjuncts: 874 789 + Unifications: 843 790 + Conjuncts: 2097 791 + Disjuncts: 918 769 792 -- out/eval -- 770 793 Errors: 771 794 a.q.e: field not allowed: ··· 804 827 ./ellipsis.cue:3:13 805 828 ./ellipsis.cue:4:5 806 829 ./ellipsis.cue:6:3 830 + issue3924.one.out.foo.disallowed: field not allowed: 831 + ./ellipsis.cue:42:3 832 + ./ellipsis.cue:42:14 833 + ./ellipsis.cue:44:16 834 + ./ellipsis.cue:46:7 835 + ./ellipsis.cue:46:23 807 836 issue852.a.Foo: field not allowed: 808 837 ./in.cue:22:6 809 838 ./in.cue:26:5 ··· 1096 1125 ./embed.cue:36:6 1097 1126 ./embed.cue:37:8 1098 1127 ./embed.cue:38:8 1128 + issue3924.two.out.foo: invalid value {disallowed:_|_(issue3924.two.out.foo.disallowed: field not allowed),allowed?:string} (does not satisfy matchN): 0 matched, expected 1: 1129 + ./ellipsis.cue:52:9 1130 + ./ellipsis.cue:50:14 1131 + ./ellipsis.cue:52:16 1132 + ./ellipsis.cue:59:23 1133 + issue3924.two.out.foo.disallowed: field not allowed: 1134 + ./ellipsis.cue:52:9 1135 + ./ellipsis.cue:50:3 1136 + ./ellipsis.cue:50:14 1137 + ./ellipsis.cue:55:15 1138 + ./ellipsis.cue:59:7 1139 + ./ellipsis.cue:59:23 1099 1140 1100 1141 Result: 1101 1142 (_|_){ ··· 1191 1232 } 1192 1233 } 1193 1234 } 1235 + issue3924: (_|_){ 1236 + // [eval] 1237 + one: (_|_){ 1238 + // [eval] 1239 + #Schema: (#struct){ 1240 + } 1241 + #SchemaInner: (#struct){ 1242 + allowed?: (string){ string } 1243 + } 1244 + out: (_|_){ 1245 + // [eval] 1246 + foo: (_|_){ 1247 + // [eval] 1248 + disallowed: (_|_){ 1249 + // [eval] issue3924.one.out.foo.disallowed: field not allowed: 1250 + // ./ellipsis.cue:42:3 1251 + // ./ellipsis.cue:42:14 1252 + // ./ellipsis.cue:44:16 1253 + // ./ellipsis.cue:46:7 1254 + // ./ellipsis.cue:46:23 1255 + } 1256 + allowed?: (string){ string } 1257 + } 1258 + } 1259 + } 1260 + two: (_|_){ 1261 + // [eval] 1262 + #Schema: (#struct){ 1263 + #job: (#struct){ 1264 + allowed?: (string){ string } 1265 + } 1266 + } 1267 + out: (_|_){ 1268 + // [eval] 1269 + #job: (#struct){ 1270 + allowed?: (string){ string } 1271 + } 1272 + foo: (_|_){ 1273 + // [eval] issue3924.two.out.foo: invalid value {disallowed:_|_(issue3924.two.out.foo.disallowed: field not allowed),allowed?:string} (does not satisfy matchN): 0 matched, expected 1: 1274 + // ./ellipsis.cue:52:9 1275 + // ./ellipsis.cue:50:14 1276 + // ./ellipsis.cue:52:16 1277 + // ./ellipsis.cue:59:23 1278 + // issue3924.two.out.foo.disallowed: field not allowed: 1279 + // ./ellipsis.cue:52:9 1280 + // ./ellipsis.cue:50:3 1281 + // ./ellipsis.cue:50:14 1282 + // ./ellipsis.cue:55:15 1283 + // ./ellipsis.cue:59:7 1284 + // ./ellipsis.cue:59:23 1285 + disallowed: (_|_){ 1286 + // [eval] issue3924.two.out.foo.disallowed: field not allowed: 1287 + // ./ellipsis.cue:52:9 1288 + // ./ellipsis.cue:50:3 1289 + // ./ellipsis.cue:50:14 1290 + // ./ellipsis.cue:55:15 1291 + // ./ellipsis.cue:59:7 1292 + // ./ellipsis.cue:59:23 1293 + } 1294 + allowed?: (string){ string } 1295 + } 1296 + } 1297 + } 1298 + } 1194 1299 issue3325: (struct){ 1195 1300 ok: (struct){ 1196 1301 #Items: (#struct){ ··· 3032 3137 } 3033 3138 } 3034 3139 } 3140 + issue3924: (struct){ 3141 + one: (struct){ 3142 + #Schema: (#struct){ 3143 + } 3144 + #SchemaInner: (#struct){ 3145 + allowed?: (string){ string } 3146 + } 3147 + out: (#struct){ 3148 + foo: (#struct){ 3149 + disallowed: (string){ "foo" } 3150 + allowed?: (string){ string } 3151 + } 3152 + } 3153 + } 3154 + two: (struct){ 3155 + #Schema: (#struct){ 3156 + #job: (#struct){ 3157 + allowed?: (string){ string } 3158 + } 3159 + } 3160 + out: (#struct){ 3161 + foo: (#struct){ 3162 + disallowed: (string){ "bar" } 3163 + allowed?: (string){ string } 3164 + } 3165 + #job: (#struct){ 3166 + allowed?: (string){ string } 3167 + } 3168 + } 3169 + } 3170 + } 3035 3171 issue3325: (struct){ 3036 3172 ok: (struct){ 3037 3173 #Items: (#struct){ ··· 4368 4504 diff old new 4369 4505 --- old 4370 4506 +++ new 4371 - @@ -1,331 +1,89 @@ 4507 + @@ -1,350 +1,90 @@ 4372 4508 Errors: 4373 4509 a.q.e: field not allowed: 4374 4510 - ./in.cue:1:5 ··· 4408 4544 - ./ellipsis.cue:3:13 4409 4545 - ./ellipsis.cue:4:5 4410 4546 ./ellipsis.cue:6:3 4547 + -issue3924.one.out.foo.disallowed: field not allowed: 4548 + - ./ellipsis.cue:42:3 4549 + - ./ellipsis.cue:42:14 4550 + - ./ellipsis.cue:44:16 4551 + - ./ellipsis.cue:46:7 4552 + - ./ellipsis.cue:46:23 4411 4553 issue852.a.Foo: field not allowed: 4412 4554 - ./in.cue:22:6 4413 4555 - ./in.cue:26:5 ··· 4711 4853 - ./embed.cue:36:6 4712 4854 - ./embed.cue:37:8 4713 4855 ./embed.cue:38:8 4856 + -issue3924.two.out.foo: invalid value {disallowed:_|_(issue3924.two.out.foo.disallowed: field not allowed),allowed?:string} (does not satisfy matchN): 0 matched, expected 1: 4857 + - ./ellipsis.cue:52:9 4858 + - ./ellipsis.cue:50:14 4859 + - ./ellipsis.cue:52:16 4860 + - ./ellipsis.cue:59:23 4861 + -issue3924.two.out.foo.disallowed: field not allowed: 4862 + - ./ellipsis.cue:52:9 4863 + - ./ellipsis.cue:50:3 4864 + - ./ellipsis.cue:50:14 4865 + - ./ellipsis.cue:55:15 4866 + - ./ellipsis.cue:59:7 4867 + - ./ellipsis.cue:59:23 4714 4868 4715 4869 Result: 4716 - @@ -346,10 +104,6 @@ 4870 + (_|_){ 4871 + @@ -364,10 +104,6 @@ 4717 4872 a: (string){ "ok" } 4718 4873 b: (_|_){ 4719 4874 // [eval] issue3778.full.z.b: field not allowed: ··· 4724 4879 // ./ellipsis.cue:6:3 4725 4880 } 4726 4881 } 4727 - @@ -377,9 +131,6 @@ 4882 + @@ -395,9 +131,6 @@ 4728 4883 // [eval] 4729 4884 foo: (_|_){ 4730 4885 // [eval] issue1867.one.x.foo: field not allowed: ··· 4734 4889 // ./ellipsis.cue:23:5 4735 4890 } 4736 4891 } 4737 - @@ -396,10 +147,6 @@ 4892 + @@ -414,10 +147,6 @@ 4738 4893 // [eval] 4739 4894 foo: (_|_){ 4740 4895 // [eval] issue1867.two.x.foo: field not allowed: ··· 4745 4900 // ./ellipsis.cue:30:5 4746 4901 } 4747 4902 } 4748 - @@ -414,9 +161,6 @@ 4903 + @@ -432,73 +161,37 @@ 4749 4904 // [eval] 4750 4905 foo: (_|_){ 4751 4906 // [eval] issue1867.three.x.foo: field not allowed: ··· 4755 4910 // ./ellipsis.cue:37:5 4756 4911 } 4757 4912 } 4758 - @@ -433,13 +177,13 @@ 4913 + } 4914 + } 4915 + - issue3924: (_|_){ 4916 + - // [eval] 4917 + - one: (_|_){ 4918 + - // [eval] 4919 + + issue3924: (struct){ 4920 + + one: (struct){ 4921 + #Schema: (#struct){ 4922 + } 4923 + #SchemaInner: (#struct){ 4924 + allowed?: (string){ string } 4925 + } 4926 + - out: (_|_){ 4927 + - // [eval] 4928 + - foo: (_|_){ 4929 + - // [eval] 4930 + - disallowed: (_|_){ 4931 + - // [eval] issue3924.one.out.foo.disallowed: field not allowed: 4932 + - // ./ellipsis.cue:42:3 4933 + - // ./ellipsis.cue:42:14 4934 + - // ./ellipsis.cue:44:16 4935 + - // ./ellipsis.cue:46:7 4936 + - // ./ellipsis.cue:46:23 4937 + - } 4938 + - allowed?: (string){ string } 4939 + - } 4940 + - } 4941 + - } 4942 + - two: (_|_){ 4943 + - // [eval] 4944 + - #Schema: (#struct){ 4945 + - #job: (#struct){ 4946 + - allowed?: (string){ string } 4947 + - } 4948 + - } 4949 + - out: (_|_){ 4950 + - // [eval] 4951 + - #job: (#struct){ 4952 + - allowed?: (string){ string } 4953 + - } 4954 + - foo: (_|_){ 4955 + - // [eval] issue3924.two.out.foo: invalid value {disallowed:_|_(issue3924.two.out.foo.disallowed: field not allowed),allowed?:string} (does not satisfy matchN): 0 matched, expected 1: 4956 + - // ./ellipsis.cue:52:9 4957 + - // ./ellipsis.cue:50:14 4958 + - // ./ellipsis.cue:52:16 4959 + - // ./ellipsis.cue:59:23 4960 + - // issue3924.two.out.foo.disallowed: field not allowed: 4961 + - // ./ellipsis.cue:52:9 4962 + - // ./ellipsis.cue:50:3 4963 + - // ./ellipsis.cue:50:14 4964 + - // ./ellipsis.cue:55:15 4965 + - // ./ellipsis.cue:59:7 4966 + - // ./ellipsis.cue:59:23 4967 + - disallowed: (_|_){ 4968 + - // [eval] issue3924.two.out.foo.disallowed: field not allowed: 4969 + - // ./ellipsis.cue:52:9 4970 + - // ./ellipsis.cue:50:3 4971 + - // ./ellipsis.cue:50:14 4972 + - // ./ellipsis.cue:55:15 4973 + - // ./ellipsis.cue:59:7 4974 + - // ./ellipsis.cue:59:23 4975 + - } 4976 + + out: (#struct){ 4977 + + foo: (#struct){ 4978 + + disallowed: (string){ "foo" } 4979 + + allowed?: (string){ string } 4980 + + } 4981 + + } 4982 + + } 4983 + + two: (struct){ 4984 + + #Schema: (#struct){ 4985 + + #job: (#struct){ 4986 + + allowed?: (string){ string } 4987 + + } 4988 + + } 4989 + + out: (#struct){ 4990 + + foo: (#struct){ 4991 + + disallowed: (string){ "bar" } 4992 + + allowed?: (string){ string } 4993 + + } 4994 + + #job: (#struct){ 4995 + allowed?: (string){ string } 4996 + } 4997 + } 4998 + @@ -515,13 +208,13 @@ 4759 4999 } 4760 5000 } 4761 5001 #Extended: (#struct){ ··· 4776 5016 } 4777 5017 broken: (#struct){ 4778 5018 name: (string){ "base" } 4779 - @@ -451,13 +195,13 @@ 5019 + @@ -533,13 +226,13 @@ 4780 5020 } 4781 5021 } 4782 5022 works: (#struct){ ··· 4797 5037 } 4798 5038 } 4799 5039 } 4800 - @@ -481,9 +225,6 @@ 5040 + @@ -563,9 +256,6 @@ 4801 5041 // [eval] 4802 5042 j: (_|_){ 4803 5043 // [eval] patterns.shallow.single.err.j: field not allowed: ··· 4807 5047 // ./embed.cue:38:8 4808 5048 } 4809 5049 } 4810 - @@ -501,11 +242,7 @@ 5050 + @@ -583,11 +273,7 @@ 4811 5051 // [eval] 4812 5052 j: (_|_){ 4813 5053 // [eval] patterns.shallow.and.p1.err.j: field not allowed: ··· 4820 5060 // ./embed.cue:48:8 4821 5061 } 4822 5062 } 4823 - @@ -521,11 +258,7 @@ 5063 + @@ -603,11 +289,7 @@ 4824 5064 // [eval] 4825 5065 j: (_|_){ 4826 5066 // [eval] patterns.shallow.and.p2.err.j: field not allowed: ··· 4833 5073 // ./embed.cue:57:8 4834 5074 } 4835 5075 } 4836 - @@ -544,12 +277,7 @@ 5076 + @@ -626,12 +308,7 @@ 4837 5077 // [eval] 4838 5078 j: (_|_){ 4839 5079 // [eval] patterns.shallow.andEmbed.p1.err.j: field not allowed: ··· 4847 5087 // ./embed.cue:67:8 4848 5088 } 4849 5089 } 4850 - @@ -565,12 +293,7 @@ 5090 + @@ -647,12 +324,7 @@ 4851 5091 // [eval] 4852 5092 j: (_|_){ 4853 5093 // [eval] patterns.shallow.andEmbed.p2.err.j: field not allowed: ··· 4861 5101 // ./embed.cue:76:8 4862 5102 } 4863 5103 } 4864 - @@ -601,81 +324,34 @@ 5104 + @@ -683,81 +355,34 @@ 4865 5105 } 4866 5106 } 4867 5107 } ··· 4971 5211 } 4972 5212 ok1: (#struct){ 4973 5213 k: (int){ 3 } 4974 - @@ -699,10 +375,6 @@ 5214 + @@ -781,10 +406,6 @@ 4975 5215 // [eval] 4976 5216 j: (_|_){ 4977 5217 // [eval] patterns.shallow.indirect.p1.err1.j: field not allowed: ··· 4982 5222 // ./embed.cue:152:10 4983 5223 } 4984 5224 } 4985 - @@ -710,10 +382,6 @@ 5225 + @@ -792,10 +413,6 @@ 4986 5226 // [eval] 4987 5227 j: (_|_){ 4988 5228 // [eval] patterns.shallow.indirect.p1.err2.j: field not allowed: ··· 4993 5233 // ./embed.cue:155:10 4994 5234 } 4995 5235 } 4996 - @@ -731,10 +399,6 @@ 5236 + @@ -813,10 +430,6 @@ 4997 5237 // [eval] 4998 5238 j: (_|_){ 4999 5239 // [eval] patterns.shallow.indirect.p2.err1.j: field not allowed: ··· 5004 5244 // ./embed.cue:166:10 5005 5245 } 5006 5246 } 5007 - @@ -742,10 +406,6 @@ 5247 + @@ -824,10 +437,6 @@ 5008 5248 // [eval] 5009 5249 j: (_|_){ 5010 5250 // [eval] patterns.shallow.indirect.p2.err2.j: field not allowed: ··· 5015 5255 // ./embed.cue:169:10 5016 5256 } 5017 5257 } 5018 - @@ -761,10 +421,6 @@ 5258 + @@ -843,10 +452,6 @@ 5019 5259 // [eval] 5020 5260 j: (_|_){ 5021 5261 // [eval] patterns.shallow.indirect.p3.err1.j: field not allowed: ··· 5026 5266 // ./embed.cue:179:10 5027 5267 } 5028 5268 } 5029 - @@ -772,10 +428,6 @@ 5269 + @@ -854,10 +459,6 @@ 5030 5270 // [eval] 5031 5271 j: (_|_){ 5032 5272 // [eval] patterns.shallow.indirect.p3.err2.j: field not allowed: ··· 5037 5277 // ./embed.cue:182:10 5038 5278 } 5039 5279 } 5040 - @@ -793,10 +445,6 @@ 5280 + @@ -875,10 +476,6 @@ 5041 5281 // [eval] 5042 5282 j: (_|_){ 5043 5283 // [eval] patterns.shallow.indirect.p4.err1.j: field not allowed: ··· 5048 5288 // ./embed.cue:194:10 5049 5289 } 5050 5290 } 5051 - @@ -804,10 +452,6 @@ 5291 + @@ -886,10 +483,6 @@ 5052 5292 // [eval] 5053 5293 j: (_|_){ 5054 5294 // [eval] patterns.shallow.indirect.p4.err2.j: field not allowed: ··· 5059 5299 // ./embed.cue:197:10 5060 5300 } 5061 5301 } 5062 - @@ -845,12 +489,7 @@ 5302 + @@ -927,12 +520,7 @@ 5063 5303 } 5064 5304 single: (_|_){ 5065 5305 // [eval] ··· 5073 5313 err: (_|_){ 5074 5314 // [eval] 5075 5315 x: (_|_){ 5076 - @@ -859,9 +498,6 @@ 5316 + @@ -941,9 +529,6 @@ 5077 5317 // [eval] 5078 5318 j: (_|_){ 5079 5319 // [eval] patterns.nested.single.err.x.y.j: field not allowed: ··· 5083 5323 // ./embed.cue:214:14 5084 5324 } 5085 5325 } 5086 - @@ -893,11 +529,7 @@ 5326 + @@ -975,11 +560,7 @@ 5087 5327 // [eval] 5088 5328 j: (_|_){ 5089 5329 // [eval] patterns.nested.and.p1.err.x.y.j: field not allowed: ··· 5096 5336 // ./embed.cue:224:14 5097 5337 } 5098 5338 } 5099 - @@ -927,11 +559,7 @@ 5339 + @@ -1009,11 +590,7 @@ 5100 5340 // [eval] 5101 5341 j: (_|_){ 5102 5342 // [eval] patterns.nested.and.p2.err.x.y.j: field not allowed: ··· 5109 5349 // ./embed.cue:233:14 5110 5350 } 5111 5351 } 5112 - @@ -964,11 +592,7 @@ 5352 + @@ -1046,11 +623,7 @@ 5113 5353 // [eval] 5114 5354 j: (_|_){ 5115 5355 // [eval] patterns.nested.andEmbed.p1.err.x.y.j: field not allowed: ··· 5122 5362 // ./embed.cue:243:14 5123 5363 } 5124 5364 } 5125 - @@ -998,11 +622,7 @@ 5365 + @@ -1080,11 +653,7 @@ 5126 5366 // [eval] 5127 5367 j: (_|_){ 5128 5368 // [eval] patterns.nested.andEmbed.p2.err.x.y.j: field not allowed: ··· 5135 5375 // ./embed.cue:252:14 5136 5376 } 5137 5377 } 5138 - @@ -1063,143 +683,78 @@ 5378 + @@ -1145,143 +714,78 @@ 5139 5379 } 5140 5380 } 5141 5381 } ··· 5351 5591 } 5352 5592 } 5353 5593 } 5354 - @@ -1221,12 +776,7 @@ 5594 + @@ -1303,12 +807,7 @@ 5355 5595 } 5356 5596 p1: (_|_){ 5357 5597 // [eval] ··· 5365 5605 err1: (_|_){ 5366 5606 // [eval] 5367 5607 x: (_|_){ 5368 - @@ -1235,10 +785,6 @@ 5608 + @@ -1317,10 +816,6 @@ 5369 5609 // [eval] 5370 5610 j: (_|_){ 5371 5611 // [eval] patterns.nested.indirect.p1.err1.x.y.j: field not allowed: ··· 5376 5616 // ./embed.cue:328:16 5377 5617 } 5378 5618 } 5379 - @@ -1252,10 +798,6 @@ 5619 + @@ -1334,10 +829,6 @@ 5380 5620 // [eval] 5381 5621 j: (_|_){ 5382 5622 // [eval] patterns.nested.indirect.p1.err2.x.y.j: field not allowed: ··· 5387 5627 // ./embed.cue:331:16 5388 5628 } 5389 5629 } 5390 - @@ -1277,12 +819,7 @@ 5630 + @@ -1359,12 +850,7 @@ 5391 5631 } 5392 5632 } 5393 5633 } ··· 5401 5641 err1: (_|_){ 5402 5642 // [eval] 5403 5643 x: (_|_){ 5404 - @@ -1291,10 +828,6 @@ 5644 + @@ -1373,10 +859,6 @@ 5405 5645 // [eval] 5406 5646 j: (_|_){ 5407 5647 // [eval] patterns.nested.indirect.p2.err1.x.y.j: field not allowed: ··· 5412 5652 // ./embed.cue:342:16 5413 5653 } 5414 5654 } 5415 - @@ -1308,10 +841,6 @@ 5655 + @@ -1390,10 +872,6 @@ 5416 5656 // [eval] 5417 5657 j: (_|_){ 5418 5658 // [eval] patterns.nested.indirect.p2.err2.x.y.j: field not allowed: ··· 5423 5663 // ./embed.cue:345:16 5424 5664 } 5425 5665 } 5426 - @@ -1341,10 +870,6 @@ 5666 + @@ -1423,10 +901,6 @@ 5427 5667 // [eval] 5428 5668 j: (_|_){ 5429 5669 // [eval] patterns.nested.indirect.p3.err1.x.y.j: field not allowed: ··· 5434 5674 // ./embed.cue:355:16 5435 5675 } 5436 5676 } 5437 - @@ -1358,10 +883,6 @@ 5677 + @@ -1440,10 +914,6 @@ 5438 5678 // [eval] 5439 5679 j: (_|_){ 5440 5680 // [eval] patterns.nested.indirect.p3.err2.x.y.j: field not allowed: ··· 5445 5685 // ./embed.cue:358:16 5446 5686 } 5447 5687 } 5448 - @@ -1397,10 +918,6 @@ 5688 + @@ -1479,10 +949,6 @@ 5449 5689 // [eval] 5450 5690 j: (_|_){ 5451 5691 // [eval] patterns.nested.indirect.p4.err1.x.y.j: field not allowed: ··· 5456 5696 // ./embed.cue:370:16 5457 5697 } 5458 5698 } 5459 - @@ -1414,10 +931,6 @@ 5699 + @@ -1496,10 +962,6 @@ 5460 5700 // [eval] 5461 5701 j: (_|_){ 5462 5702 // [eval] patterns.nested.indirect.p4.err2.x.y.j: field not allowed: ··· 5467 5707 // ./embed.cue:373:16 5468 5708 } 5469 5709 } 5470 - @@ -1434,7 +947,8 @@ 5710 + @@ -1516,7 +978,8 @@ 5471 5711 } 5472 5712 } 5473 5713 } ··· 5477 5717 #close: (#struct){ 5478 5718 } 5479 5719 a: (#struct){ 5480 - @@ -1442,10 +956,15 @@ 5720 + @@ -1524,10 +987,15 @@ 5481 5721 q: (int){ 2 } 5482 5722 } 5483 5723 } ··· 5497 5737 } 5498 5738 } 5499 5739 } 5500 - @@ -1455,8 +974,8 @@ 5740 + @@ -1537,8 +1005,8 @@ 5501 5741 #A: (#struct){ 5502 5742 b: (int){ int } 5503 5743 q: (#struct){ ··· 5507 5747 } 5508 5748 } 5509 5749 a: (_|_){ 5510 - @@ -1465,21 +984,15 @@ 5750 + @@ -1547,21 +1015,15 @@ 5511 5751 q: (_|_){ 5512 5752 // [eval] 5513 5753 c: (int){ 2 } ··· 5530 5770 // ./in.cue:28:5 5531 5771 #A: (#struct){ 5532 5772 } 5533 - @@ -1487,8 +1000,6 @@ 5773 + @@ -1569,8 +1031,6 @@ 5534 5774 // [eval] 5535 5775 Foo: (_|_){ 5536 5776 // [eval] issue852.a.Foo: field not allowed: ··· 5539 5779 // ./in.cue:28:5 5540 5780 } 5541 5781 } 5542 - @@ -1499,8 +1010,8 @@ 5782 + @@ -1581,8 +1041,8 @@ 5543 5783 foo: (int){ int } 5544 5784 } 5545 5785 d: (#struct){ ··· 5549 5789 } 5550 5790 } 5551 5791 issue3330: (struct){ 5552 - @@ -1514,13 +1025,7 @@ 5792 + @@ -1596,13 +1056,7 @@ 5553 5793 } 5554 5794 } 5555 5795 out: (#list){ ··· 5564 5804 } 5565 5805 } 5566 5806 } 5567 - @@ -1549,13 +1054,7 @@ 5807 + @@ -1631,13 +1085,7 @@ 5568 5808 g: (#struct){ 5569 5809 } 5570 5810 } ··· 5579 5819 out2: (#struct){ 5580 5820 field: (#struct){ 5581 5821 n: (int){ 3 } 5582 - @@ -1576,13 +1075,7 @@ 5822 + @@ -1658,13 +1106,7 @@ 5583 5823 d: (int){ 1 } 5584 5824 } 5585 5825 } ··· 5594 5834 } 5595 5835 } 5596 5836 variant1: (struct){ 5597 - @@ -1595,13 +1088,7 @@ 5837 + @@ -1677,13 +1119,7 @@ 5598 5838 } 5599 5839 } 5600 5840 0: (#list){ ··· 5609 5849 } 5610 5850 } 5611 5851 } 5612 - @@ -1617,10 +1104,7 @@ 5852 + @@ -1699,10 +1135,7 @@ 5613 5853 c: (int){ 2 } 5614 5854 } 5615 5855 } ··· 5621 5861 } 5622 5862 #x: (#struct){ 5623 5863 a: (#struct){ 5624 - @@ -1632,22 +1116,11 @@ 5864 + @@ -1714,22 +1147,11 @@ 5625 5865 c: (int){ 2 } 5626 5866 } 5627 5867 } ··· 5647 5887 } 5648 5888 } 5649 5889 } 5650 - @@ -1664,22 +1137,16 @@ 5890 + @@ -1746,22 +1168,16 @@ 5651 5891 } 5652 5892 Y: (_|_){ 5653 5893 // [eval] ··· 5675 5915 } 5676 5916 } 5677 5917 #X: (#struct){ 5678 - @@ -1699,25 +1166,11 @@ 5918 + @@ -1781,25 +1197,11 @@ 5679 5919 } 5680 5920 } 5681 5921 } ··· 5706 5946 #A: (#struct){ 5707 5947 d: (#struct){ 5708 5948 e: (int){ int } 5709 - @@ -1742,69 +1195,27 @@ 5949 + @@ -1824,69 +1226,27 @@ 5710 5950 // [eval] 5711 5951 f: (_|_){ 5712 5952 // [eval] nested.err1.x.b.f: field not allowed: ··· 5788 6028 } 5789 6029 } 5790 6030 } 5791 - @@ -1812,16 +1223,11 @@ 6031 + @@ -1894,16 +1254,11 @@ 5792 6032 b: (#struct){ 5793 6033 f: (int){ 1 } 5794 6034 } ··· 5808 6048 } 5809 6049 } 5810 6050 } 5811 - @@ -1844,14 +1250,12 @@ 6051 + @@ -1926,14 +1281,12 @@ 5812 6052 // [eval] 5813 6053 g: (_|_){ 5814 6054 // [eval] nested.err2.x.b.g: field not allowed: ··· 5824 6064 } 5825 6065 } 5826 6066 } 5827 - @@ -1864,11 +1268,11 @@ 6067 + @@ -1946,11 +1299,11 @@ 5828 6068 } 5829 6069 } 5830 6070 } ··· 5838 6078 name: (string){ "a" } 5839 6079 age2: (int){ 5 } 5840 6080 } 5841 - @@ -2015,20 +1419,20 @@ 6081 + @@ -2097,20 +1450,20 @@ 5842 6082 } 5843 6083 } 5844 6084 original: (struct){ ··· 5868 6108 c: (string){ "v1" } 5869 6109 } 5870 6110 } 5871 - @@ -2052,8 +1456,8 @@ 6111 + @@ -2134,8 +1487,8 @@ 5872 6112 empty: (#struct){ 5873 6113 } 5874 6114 } ··· 5879 6119 c: (string){ "v1" } 5880 6120 } 5881 6121 } 5882 - @@ -2070,13 +1474,13 @@ 6122 + @@ -2152,13 +1505,13 @@ 5883 6123 empty: (#struct){ 5884 6124 } 5885 6125 } ··· 5983 6223 x: { 5984 6224 foo: "foo" 5985 6225 } 6226 + } 6227 + } 6228 + issue3924: { 6229 + one: { 6230 + #Schema: { 6231 + ... 6232 + { 6233 + [string]: 〈2;#SchemaInner〉 6234 + } 6235 + } 6236 + #SchemaInner: { 6237 + allowed?: string 6238 + } 6239 + out: (〈0;#Schema〉 & { 6240 + foo: { 6241 + disallowed: "foo" 6242 + } 6243 + }) 6244 + } 6245 + } 6246 + issue3924: { 6247 + two: { 6248 + #Schema: { 6249 + { 6250 + [string]: 〈1;#job〉 6251 + } 6252 + #job: (matchN(1, [ 6253 + { 6254 + other?: string 6255 + ... 6256 + }, 6257 + ]) & close({ 6258 + allowed?: string 6259 + })) 6260 + } 6261 + out: (〈0;#Schema〉 & { 6262 + foo: { 6263 + disallowed: "bar" 6264 + } 6265 + }) 5986 6266 } 5987 6267 } 5988 6268 }