...

Text file src/cuelang.org/go/cue/testdata/cycle/compbottomnofinal.txtar

Documentation: cuelang.org/go/cue/testdata/cycle

     1// Issues: #667, #695, #622
     2-- in.cue --
     3import (
     4	"strconv"
     5	"regexp"
     6)
     7
     8// In these test, it is impossible to determine the existence of some arcs due
     9// to mutual dependence on becoming concrete.
    10//
    11// This tests shows the essences of when an existence check cannot be resolved.
    12minimal: {
    13	a: {
    14		if b.port == _|_ {
    15			port: ""
    16		}
    17	}
    18
    19	b: {
    20		if a.port == _|_ {
    21			port: ""
    22		}
    23	}
    24}
    25
    26small: {
    27	#userHostPort: #"^(:(?P<port>\d+))?$"#
    28
    29	p1: {
    30		#Y: regexp.FindNamedSubmatch(#userHostPort, #X.port)
    31
    32		#X: {
    33			if #Y.port == _|_ {
    34				port: ""
    35			}
    36			if #Y.port != _|_ {
    37				port: ":" + strconv.FormatInt(#Y.port, 10)
    38			}
    39		}
    40	}
    41
    42	p2: {
    43		#X: {
    44			if #Y.port == _|_ {
    45				port: ""
    46			}
    47			if #Y.port != _|_ {
    48				port: ":" + strconv.FormatInt(#Y.port, 10)
    49			}
    50		}
    51
    52		#Y: regexp.FindNamedSubmatch(#userHostPort, #X.port)
    53	}
    54}
    55
    56medium: {
    57	#userHostPort: #"^(:(?P<port>\d+))?$"#
    58
    59	p1: {
    60		#Y: regexp.FindNamedSubmatch(#userHostPort, #X.port)
    61
    62		Y: {
    63			if #Y.port != _|_ {
    64				port: strconv.Atoi(#Y.port)
    65			}
    66		}
    67
    68		#X: {
    69			// Can never determine whether Y.port exists as its resolution
    70			// depends on #Y becoming finalized, which, in turn, depends on #X
    71			// becoming finalized.
    72			if Y.port == _|_ {
    73				port: ""
    74			}
    75			if Y.port != _|_ {
    76				port: ":" + strconv.FormatInt(Y.port, 10)
    77			}
    78		}
    79	}
    80
    81	p2: {
    82		#Y: regexp.FindNamedSubmatch(#userHostPort, #X.port)
    83
    84		#X: {
    85			// Can never determine whether Y.port exists as its resolution
    86			// depends on #Y becoming finalized, which, in turn, depends on #X
    87			// becoming finalized.
    88			if Y.port == _|_ {
    89				port: ""
    90			}
    91			if Y.port != _|_ {
    92				port: ":" + strconv.FormatInt(Y.port, 10)
    93			}
    94		}
    95
    96		Y: {
    97			if #Y.port != _|_ {
    98				port: strconv.Atoi(#Y.port)
    99			}
   100		}
   101	}
   102
   103	p3: {
   104		Y: {
   105			if #Y.port != _|_ {
   106				port: strconv.Atoi(#Y.port)
   107			}
   108		}
   109
   110		#Y: regexp.FindNamedSubmatch(#userHostPort, #X.port)
   111
   112		#X: {
   113			// Can never determine whether Y.port exists as its resolution
   114			// depends on #Y becoming finalized, which, in turn, depends on #X
   115			// becoming finalized.
   116			if Y.port == _|_ {
   117				port: ""
   118			}
   119			if Y.port != _|_ {
   120				port: ":" + strconv.FormatInt(Y.port, 10)
   121			}
   122		}
   123	}
   124
   125	p4: {
   126		Y: {
   127			if #Y.port != _|_ {
   128				port: strconv.Atoi(#Y.port)
   129			}
   130		}
   131
   132		#X: {
   133			// Can never determine whether Y.port exists as its resolution
   134			// depends on #Y becoming finalized, which, in turn, depends on #X
   135			// becoming finalized.
   136			if Y.port == _|_ {
   137				port: ""
   138			}
   139			if Y.port != _|_ {
   140				port: ":" + strconv.FormatInt(Y.port, 10)
   141			}
   142		}
   143
   144		#Y: regexp.FindNamedSubmatch(#userHostPort, #X.port)
   145	}
   146
   147	p5: {
   148		#X: {
   149			// Can never determine whether Y.port exists as its resolution
   150			// depends on #Y becoming finalized, which, in turn, depends on #X
   151			// becoming finalized.
   152			if Y.port == _|_ {
   153				port: ""
   154			}
   155			if Y.port != _|_ {
   156				port: ":" + strconv.FormatInt(Y.port, 10)
   157			}
   158		}
   159
   160		#Y: regexp.FindNamedSubmatch(#userHostPort, #X.port)
   161
   162		Y: {
   163			if #Y.port != _|_ {
   164				port: strconv.Atoi(#Y.port)
   165			}
   166		}
   167	}
   168
   169	p6: {
   170		#X: {
   171			// Can never determine whether Y.port exists as its resolution
   172			// depends on #Y becoming finalized, which, in turn, depends on #X
   173			// becoming finalized.
   174			if Y.port == _|_ {
   175				port: ""
   176			}
   177			if Y.port != _|_ {
   178				port: ":" + strconv.FormatInt(Y.port, 10)
   179			}
   180		}
   181
   182		Y: {
   183			if #Y.port != _|_ {
   184				port: strconv.Atoi(#Y.port)
   185			}
   186		}
   187
   188		#Y: regexp.FindNamedSubmatch(#userHostPort, #X.port)
   189	}
   190}
   191
   192large: {
   193	#userHostPort: #"^((?P<userinfo>[[:alnum:]]*)@)?(?P<host>[[:alnum:].]+)(:(?P<port>\d+))?$"#
   194
   195	p1: {
   196		Y: {
   197			userinfo: "user"
   198			host:     "mod.test"
   199		}
   200
   201		X: #X.userinfo + #X.host + #X.port
   202
   203		#X: {
   204			if Y.userinfo == _|_ {
   205				userinfo: ""
   206			}
   207			if Y.userinfo != _|_ {
   208				userinfo: Y.userinfo + "@"
   209			}
   210
   211			host: Y.host
   212
   213			if Y.port == _|_ {
   214				port: ""
   215			}
   216			if Y.port != _|_ {
   217				port: ":" + strconv.FormatInt(Y.port, 10)
   218			}
   219		}
   220
   221		Y: {
   222			if #Y.userinfo != _|_ {
   223				userinfo: #Y.userinfo
   224			}
   225
   226			host: #Y.host
   227
   228			if #Y.port != _|_ {
   229				port: strconv.Atoi(#Y.port)
   230			}
   231		}
   232
   233		#Y: regexp.FindNamedSubmatch(#userHostPort, X)
   234	}
   235
   236	p2: {
   237		X: #X.userinfo + #X.host + #X.port
   238
   239		Y: {
   240			userinfo: "user"
   241			host:     "mod.test"
   242		}
   243
   244		#X: {
   245			if Y.userinfo == _|_ {
   246				userinfo: ""
   247			}
   248			if Y.userinfo != _|_ {
   249				userinfo: Y.userinfo + "@"
   250			}
   251
   252			host: Y.host
   253
   254			if Y.port == _|_ {
   255				port: ""
   256			}
   257			if Y.port != _|_ {
   258				port: ":" + strconv.FormatInt(Y.port, 10)
   259			}
   260		}
   261
   262		Y: {
   263			if #Y.userinfo != _|_ {
   264				userinfo: #Y.userinfo
   265			}
   266
   267			host: #Y.host
   268
   269			if #Y.port != _|_ {
   270				port: strconv.Atoi(#Y.port)
   271			}
   272		}
   273
   274		#Y: regexp.FindNamedSubmatch(#userHostPort, X)
   275	}
   276
   277	p3: {
   278		X: #X.userinfo + #X.host + #X.port
   279
   280		#X: {
   281			if Y.userinfo == _|_ {
   282				userinfo: ""
   283			}
   284			if Y.userinfo != _|_ {
   285				userinfo: Y.userinfo + "@"
   286			}
   287
   288			host: Y.host
   289
   290			if Y.port == _|_ {
   291				port: ""
   292			}
   293			if Y.port != _|_ {
   294				port: ":" + strconv.FormatInt(Y.port, 10)
   295			}
   296		}
   297
   298		Y: {
   299			userinfo: "user"
   300			host:     "mod.test"
   301		}
   302
   303		Y: {
   304			if #Y.userinfo != _|_ {
   305				userinfo: #Y.userinfo
   306			}
   307
   308			host: #Y.host
   309
   310			if #Y.port != _|_ {
   311				port: strconv.Atoi(#Y.port)
   312			}
   313		}
   314
   315		#Y: regexp.FindNamedSubmatch(#userHostPort, X)
   316	}
   317
   318	p4: {
   319		X: #X.userinfo + #X.host + #X.port
   320
   321		#X: {
   322			if Y.userinfo == _|_ {
   323				userinfo: ""
   324			}
   325			if Y.userinfo != _|_ {
   326				userinfo: Y.userinfo + "@"
   327			}
   328
   329			host: Y.host
   330
   331			if Y.port == _|_ {
   332				port: ""
   333			}
   334			if Y.port != _|_ {
   335				port: ":" + strconv.FormatInt(Y.port, 10)
   336			}
   337		}
   338
   339		#Y: regexp.FindNamedSubmatch(#userHostPort, X)
   340
   341		Y: {
   342			userinfo: "user"
   343			host:     "mod.test"
   344		}
   345
   346		Y: {
   347			if #Y.userinfo != _|_ {
   348				userinfo: #Y.userinfo
   349			}
   350
   351			host: #Y.host
   352
   353			if #Y.port != _|_ {
   354				port: strconv.Atoi(#Y.port)
   355			}
   356		}
   357	}
   358}
   359-- out/eval/stats --
   360Leaks:  10
   361Freed:  105
   362Reused: 95
   363Allocs: 20
   364Retain: 302
   365
   366Unifications: 115
   367Conjuncts:    223
   368Disjuncts:    215
   369-- out/evalalpha --
   370(struct){
   371  minimal: (struct){
   372    a: (_|_){
   373      // [incomplete] minimal.a.port: cyclic reference to field port:
   374      //     ./in.cue:12:3
   375    }
   376    b: (_|_){
   377      // [incomplete] minimal.b.port: cyclic reference to field port:
   378      //     ./in.cue:18:3
   379    }
   380  }
   381  small: (struct){
   382    #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
   383    p1: (struct){
   384      #Y: (_|_){
   385        // [incomplete] small.p1.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   386        //     ./in.cue:28:7
   387      }
   388      #X: (_|_){
   389        // [incomplete] small.p1.#X.port: cyclic reference to field port:
   390        //     ./in.cue:31:4
   391      }
   392    }
   393    p2: (struct){
   394      #X: (_|_){
   395        // [incomplete] small.p2.#X.port: cyclic reference to field port:
   396        //     ./in.cue:42:4
   397      }
   398      #Y: (_|_){
   399        // [incomplete] small.p2.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   400        //     ./in.cue:50:7
   401      }
   402    }
   403  }
   404  medium: (struct){
   405    #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
   406    p1: (struct){
   407      #Y: (_|_){
   408        // [incomplete] medium.p1.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   409        //     ./in.cue:58:7
   410      }
   411      Y: (struct){
   412      }
   413      #X: (_|_){
   414        // [incomplete] medium.p1.#X.port: cyclic reference to field port:
   415        //     ./in.cue:70:4
   416      }
   417    }
   418    p2: (struct){
   419      #Y: (_|_){
   420        // [incomplete] medium.p2.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   421        //     ./in.cue:80:7
   422      }
   423      #X: (_|_){
   424        // [incomplete] medium.p2.#X.port: cyclic reference to field port:
   425        //     ./in.cue:86:4
   426      }
   427      Y: (struct){
   428      }
   429    }
   430    p3: (struct){
   431      Y: (struct){
   432      }
   433      #Y: (_|_){
   434        // [incomplete] medium.p3.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   435        //     ./in.cue:108:7
   436      }
   437      #X: (_|_){
   438        // [incomplete] medium.p3.#X.port: cyclic reference to field port:
   439        //     ./in.cue:114:4
   440      }
   441    }
   442    p4: (struct){
   443      Y: (struct){
   444      }
   445      #X: (_|_){
   446        // [incomplete] medium.p4.#X.port: cyclic reference to field port:
   447        //     ./in.cue:134:4
   448      }
   449      #Y: (_|_){
   450        // [incomplete] medium.p4.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   451        //     ./in.cue:142:7
   452      }
   453    }
   454    p5: (struct){
   455      #X: (_|_){
   456        // [incomplete] medium.p5.#X.port: cyclic reference to field port:
   457        //     ./in.cue:150:4
   458      }
   459      #Y: (_|_){
   460        // [incomplete] medium.p5.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   461        //     ./in.cue:158:7
   462      }
   463      Y: (struct){
   464      }
   465    }
   466    p6: (struct){
   467      #X: (_|_){
   468        // [incomplete] medium.p6.#X.port: cyclic reference to field port:
   469        //     ./in.cue:172:4
   470      }
   471      Y: (struct){
   472      }
   473      #Y: (_|_){
   474        // [incomplete] medium.p6.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   475        //     ./in.cue:186:7
   476      }
   477    }
   478  }
   479  large: (struct){
   480    #userHostPort: (string){ "^((?P<userinfo>[[:alnum:]]*)@)?(?P<host>[[:alnum:].]+)(:(?P<port>\\d+))?$" }
   481    p1: (struct){
   482      Y: (struct){
   483        userinfo: (string){ "user" }
   484        host: (string){ "mod.test" }
   485      }
   486      X: (_|_){
   487        // [incomplete] large.p1.X: cyclic reference to field port:
   488        //     ./in.cue:199:33
   489      }
   490      #X: (_|_){
   491        // [incomplete] large.p1.#X.port: cyclic reference to field port:
   492        //     ./in.cue:211:4
   493        userinfo: (string){ "user@" }
   494        host: (string){ "mod.test" }
   495      }
   496      #Y: (_|_){
   497        // [incomplete] large.p1.X: cyclic reference to field port:
   498        //     ./in.cue:199:33
   499      }
   500    }
   501    p2: (struct){
   502      X: (_|_){
   503        // [incomplete] large.p2.X: cyclic reference to field port:
   504        //     ./in.cue:235:33
   505      }
   506      Y: (struct){
   507        userinfo: (string){ "user" }
   508        host: (string){ "mod.test" }
   509      }
   510      #X: (_|_){
   511        // [incomplete] large.p2.#X.port: cyclic reference to field port:
   512        //     ./in.cue:252:4
   513        userinfo: (string){ "user@" }
   514        host: (string){ "mod.test" }
   515      }
   516      #Y: (_|_){
   517        // [incomplete] large.p2.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   518        //     ./in.cue:272:7
   519      }
   520    }
   521    p3: (struct){
   522      X: (_|_){
   523        // [incomplete] large.p3.X: cyclic reference to field port:
   524        //     ./in.cue:276:33
   525      }
   526      #X: (_|_){
   527        // [incomplete] large.p3.#X.port: cyclic reference to field port:
   528        //     ./in.cue:288:4
   529        userinfo: (string){ "user@" }
   530        host: (string){ "mod.test" }
   531      }
   532      Y: (struct){
   533        userinfo: (string){ "user" }
   534        host: (string){ "mod.test" }
   535      }
   536      #Y: (_|_){
   537        // [incomplete] large.p3.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   538        //     ./in.cue:313:7
   539      }
   540    }
   541    p4: (struct){
   542      X: (_|_){
   543        // [incomplete] large.p4.X: cyclic reference to field port:
   544        //     ./in.cue:317:33
   545      }
   546      #X: (_|_){
   547        // [incomplete] large.p4.#X.port: cyclic reference to field port:
   548        //     ./in.cue:329:4
   549        userinfo: (string){ "user@" }
   550        host: (string){ "mod.test" }
   551      }
   552      #Y: (_|_){
   553        // [incomplete] large.p4.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   554        //     ./in.cue:337:7
   555      }
   556      Y: (struct){
   557        userinfo: (string){ "user" }
   558        host: (string){ "mod.test" }
   559      }
   560    }
   561  }
   562}
   563-- diff/-out/evalalpha<==>+out/eval --
   564diff old new
   565--- old
   566+++ new
   567@@ -1,42 +1,34 @@
   568 (struct){
   569   minimal: (struct){
   570     a: (_|_){
   571-      // [cycle] minimal.b: cycle with field a.port:
   572-      //     ./in.cue:18:6
   573-      port: (string){ "" }
   574+      // [incomplete] minimal.a.port: cyclic reference to field port:
   575+      //     ./in.cue:12:3
   576     }
   577     b: (_|_){
   578-      // [cycle] minimal.b: cycle with field a.port:
   579-      //     ./in.cue:18:6
   580-      port*: (_|_){
   581-        // [cycle] minimal.b: cycle with field a.port:
   582-        //     ./in.cue:18:6
   583-      }
   584+      // [incomplete] minimal.b.port: cyclic reference to field port:
   585+      //     ./in.cue:18:3
   586     }
   587   }
   588   small: (struct){
   589     #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
   590     p1: (struct){
   591-      #Y: (#struct){
   592-        port: (string){ "" }
   593-      }
   594-      #X: (_|_){
   595-        // [cycle] small.p1.#X: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   596-        //     ./in.cue:31:7
   597-        // small.p1.#X: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   598-        //     ./in.cue:34:7
   599-        port: (string){ "" }
   600-      }
   601-    }
   602-    p2: (struct){
   603-      #X: (_|_){
   604-        // [cycle] small.p2.#Y: cycle with field #X.port:
   605-        //     ./in.cue:50:47
   606-        port: (string){ "" }
   607-      }
   608-      #Y: (_|_){
   609-        // [cycle] small.p2.#Y: cycle with field #X.port:
   610-        //     ./in.cue:50:47
   611+      #Y: (_|_){
   612+        // [incomplete] small.p1.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   613+        //     ./in.cue:28:7
   614+      }
   615+      #X: (_|_){
   616+        // [incomplete] small.p1.#X.port: cyclic reference to field port:
   617+        //     ./in.cue:31:4
   618+      }
   619+    }
   620+    p2: (struct){
   621+      #X: (_|_){
   622+        // [incomplete] small.p2.#X.port: cyclic reference to field port:
   623+        //     ./in.cue:42:4
   624+      }
   625+      #Y: (_|_){
   626+        // [incomplete] small.p2.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   627+        //     ./in.cue:50:7
   628       }
   629     }
   630   }
   631@@ -43,66 +35,61 @@
   632   medium: (struct){
   633     #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
   634     p1: (struct){
   635-      #Y: (#struct){
   636-        port: (string){ "" }
   637-      }
   638-      Y: (_|_){
   639-        // [cycle] medium.p1.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   640-        //     ./in.cue:61:7
   641-      }
   642-      #X: (#struct){
   643-        port: (string){ "" }
   644-      }
   645-    }
   646-    p2: (struct){
   647-      #Y: (#struct){
   648-        port: (string){ "" }
   649-      }
   650-      #X: (#struct){
   651-        port: (string){ "" }
   652-      }
   653-      Y: (_|_){
   654-        // [cycle] medium.p2.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   655-        //     ./in.cue:95:7
   656-      }
   657-    }
   658-    p3: (struct){
   659-      Y: (_|_){
   660-        // [cycle] medium.p3.#X: cycle with field Y.port:
   661-        //     ./in.cue:114:7
   662-      }
   663-      #Y: (_|_){
   664-        // [incomplete] medium.p3.#Y: undefined field: port:
   665-        //     ./in.cue:108:47
   666-      }
   667-      #X: (_|_){
   668-        // [cycle] medium.p3.#X: cycle with field Y.port:
   669-        //     ./in.cue:114:7
   670-      }
   671-    }
   672-    p4: (struct){
   673-      Y: (_|_){
   674-        // [cycle] medium.p4.#X: cycle with field Y.port:
   675-        //     ./in.cue:134:7
   676-      }
   677-      #X: (_|_){
   678-        // [cycle] medium.p4.#X: cycle with field Y.port:
   679-        //     ./in.cue:134:7
   680-      }
   681-      #Y: (_|_){
   682-        // [cycle] medium.p4.#X: cycle with field Y.port:
   683-        //     ./in.cue:134:7
   684+      #Y: (_|_){
   685+        // [incomplete] medium.p1.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   686+        //     ./in.cue:58:7
   687+      }
   688+      Y: (struct){
   689+      }
   690+      #X: (_|_){
   691+        // [incomplete] medium.p1.#X.port: cyclic reference to field port:
   692+        //     ./in.cue:70:4
   693+      }
   694+    }
   695+    p2: (struct){
   696+      #Y: (_|_){
   697+        // [incomplete] medium.p2.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   698+        //     ./in.cue:80:7
   699+      }
   700+      #X: (_|_){
   701+        // [incomplete] medium.p2.#X.port: cyclic reference to field port:
   702+        //     ./in.cue:86:4
   703+      }
   704+      Y: (struct){
   705+      }
   706+    }
   707+    p3: (struct){
   708+      Y: (struct){
   709+      }
   710+      #Y: (_|_){
   711+        // [incomplete] medium.p3.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   712+        //     ./in.cue:108:7
   713+      }
   714+      #X: (_|_){
   715+        // [incomplete] medium.p3.#X.port: cyclic reference to field port:
   716+        //     ./in.cue:114:4
   717+      }
   718+    }
   719+    p4: (struct){
   720+      Y: (struct){
   721+      }
   722+      #X: (_|_){
   723+        // [incomplete] medium.p4.#X.port: cyclic reference to field port:
   724+        //     ./in.cue:134:4
   725+      }
   726+      #Y: (_|_){
   727+        // [incomplete] medium.p4.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   728+        //     ./in.cue:142:7
   729       }
   730     }
   731     p5: (struct){
   732       #X: (_|_){
   733-        // [cycle] medium.p5.#Y: cycle with field #X.port:
   734-        //     ./in.cue:158:47
   735-        port: (string){ "" }
   736-      }
   737-      #Y: (_|_){
   738-        // [cycle] medium.p5.#Y: cycle with field #X.port:
   739-        //     ./in.cue:158:47
   740+        // [incomplete] medium.p5.#X.port: cyclic reference to field port:
   741+        //     ./in.cue:150:4
   742+      }
   743+      #Y: (_|_){
   744+        // [incomplete] medium.p5.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   745+        //     ./in.cue:158:7
   746       }
   747       Y: (struct){
   748       }
   749@@ -109,15 +96,14 @@
   750     }
   751     p6: (struct){
   752       #X: (_|_){
   753-        // [cycle] medium.p6.#Y: cycle with field #X.port:
   754-        //     ./in.cue:186:47
   755-        port: (string){ "" }
   756-      }
   757-      Y: (struct){
   758-      }
   759-      #Y: (_|_){
   760-        // [cycle] medium.p6.#Y: cycle with field #X.port:
   761-        //     ./in.cue:186:47
   762+        // [incomplete] medium.p6.#X.port: cyclic reference to field port:
   763+        //     ./in.cue:172:4
   764+      }
   765+      Y: (struct){
   766+      }
   767+      #Y: (_|_){
   768+        // [incomplete] medium.p6.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   769+        //     ./in.cue:186:7
   770       }
   771     }
   772   }
   773@@ -124,122 +110,83 @@
   774   large: (struct){
   775     #userHostPort: (string){ "^((?P<userinfo>[[:alnum:]]*)@)?(?P<host>[[:alnum:].]+)(:(?P<port>\\d+))?$" }
   776     p1: (struct){
   777-      Y: (_|_){
   778-        // [cycle] large.p1.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   779-        //     ./in.cue:226:7
   780-        userinfo: (string){ "user" }
   781-        host: (string){ "mod.test" }
   782-      }
   783-      X: (string){ "user@mod.test" }
   784-      #X: (_|_){
   785-        // [cycle] large.p1.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   786-        //     ./in.cue:202:7
   787-        // large.p1.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   788-        //     ./in.cue:205:7
   789-        userinfo: (string){ "user@" }
   790-        host: (string){ "mod.test" }
   791-        port: (string){ "" }
   792-      }
   793-      #Y: (#struct){
   794-        host: (string){ "mod.test" }
   795-        port: (string){ "" }
   796-        userinfo: (string){ "user" }
   797-      }
   798-    }
   799-    p2: (struct){
   800-      X: (string){ "user@mod.test" }
   801-      Y: (_|_){
   802-        // [cycle] large.p2.Y: cycle error referencing port:
   803-        //     ./in.cue:267:10
   804-        userinfo: (string){ "user" }
   805-        host: (string){ "mod.test" }
   806-        port*: (_|_){
   807-          // [cycle] large.p2.Y: cycle error referencing port:
   808-          //     ./in.cue:267:10
   809-        }
   810-      }
   811-      #X: (_|_){
   812-        // [cycle] large.p2.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   813-        //     ./in.cue:243:7
   814-        // large.p2.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   815-        //     ./in.cue:246:7
   816-        // large.p2.Y: cycle error referencing port:
   817-        //     ./in.cue:267:10
   818-        userinfo: (string){ "user@" }
   819-        host: (string){ "mod.test" }
   820-        port: (_|_){
   821-          // [cycle] large.p2.Y: cycle error referencing port:
   822-          //     ./in.cue:267:10
   823-        }
   824-      }
   825-      #Y: (#struct){
   826-        host: (string){ "mod.test" }
   827-        port: (string){ "" }
   828-        userinfo: (string){ "user" }
   829-      }
   830-    }
   831-    p3: (struct){
   832-      X: (string){ "user@mod.test" }
   833-      #X: (_|_){
   834-        // [cycle] large.p3.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   835-        //     ./in.cue:279:7
   836-        // large.p3.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   837-        //     ./in.cue:282:7
   838-        // large.p3.Y: cycle error referencing port:
   839-        //     ./in.cue:308:10
   840-        userinfo: (string){ "user@" }
   841-        host: (string){ "mod.test" }
   842-        port: (_|_){
   843-          // [cycle] large.p3.Y: cycle error referencing port:
   844-          //     ./in.cue:308:10
   845-        }
   846-      }
   847-      Y: (_|_){
   848-        // [cycle] large.p3.Y: cycle error referencing port:
   849-        //     ./in.cue:308:10
   850-        userinfo: (string){ "user" }
   851-        host: (string){ "mod.test" }
   852-        port*: (_|_){
   853-          // [cycle] large.p3.Y: cycle error referencing port:
   854-          //     ./in.cue:308:10
   855-        }
   856-      }
   857-      #Y: (#struct){
   858-        host: (string){ "mod.test" }
   859-        port: (string){ "" }
   860-        userinfo: (string){ "user" }
   861-      }
   862-    }
   863-    p4: (struct){
   864-      X: (string){ "user@mod.test" }
   865-      #X: (_|_){
   866-        // [cycle] large.p4.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   867-        //     ./in.cue:320:7
   868-        // large.p4.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   869-        //     ./in.cue:323:7
   870-        // large.p4.Y: cycle error referencing port:
   871-        //     ./in.cue:351:10
   872-        userinfo: (string){ "user@" }
   873-        host: (string){ "mod.test" }
   874-        port: (_|_){
   875-          // [cycle] large.p4.Y: cycle error referencing port:
   876-          //     ./in.cue:351:10
   877-        }
   878-      }
   879-      #Y: (#struct){
   880-        host: (string){ "mod.test" }
   881-        port: (string){ "" }
   882-        userinfo: (string){ "user" }
   883-      }
   884-      Y: (_|_){
   885-        // [cycle] large.p4.Y: cycle error referencing port:
   886-        //     ./in.cue:351:10
   887-        userinfo: (string){ "user" }
   888-        host: (string){ "mod.test" }
   889-        port*: (_|_){
   890-          // [cycle] large.p4.Y: cycle error referencing port:
   891-          //     ./in.cue:351:10
   892-        }
   893+      Y: (struct){
   894+        userinfo: (string){ "user" }
   895+        host: (string){ "mod.test" }
   896+      }
   897+      X: (_|_){
   898+        // [incomplete] large.p1.X: cyclic reference to field port:
   899+        //     ./in.cue:199:33
   900+      }
   901+      #X: (_|_){
   902+        // [incomplete] large.p1.#X.port: cyclic reference to field port:
   903+        //     ./in.cue:211:4
   904+        userinfo: (string){ "user@" }
   905+        host: (string){ "mod.test" }
   906+      }
   907+      #Y: (_|_){
   908+        // [incomplete] large.p1.X: cyclic reference to field port:
   909+        //     ./in.cue:199:33
   910+      }
   911+    }
   912+    p2: (struct){
   913+      X: (_|_){
   914+        // [incomplete] large.p2.X: cyclic reference to field port:
   915+        //     ./in.cue:235:33
   916+      }
   917+      Y: (struct){
   918+        userinfo: (string){ "user" }
   919+        host: (string){ "mod.test" }
   920+      }
   921+      #X: (_|_){
   922+        // [incomplete] large.p2.#X.port: cyclic reference to field port:
   923+        //     ./in.cue:252:4
   924+        userinfo: (string){ "user@" }
   925+        host: (string){ "mod.test" }
   926+      }
   927+      #Y: (_|_){
   928+        // [incomplete] large.p2.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   929+        //     ./in.cue:272:7
   930+      }
   931+    }
   932+    p3: (struct){
   933+      X: (_|_){
   934+        // [incomplete] large.p3.X: cyclic reference to field port:
   935+        //     ./in.cue:276:33
   936+      }
   937+      #X: (_|_){
   938+        // [incomplete] large.p3.#X.port: cyclic reference to field port:
   939+        //     ./in.cue:288:4
   940+        userinfo: (string){ "user@" }
   941+        host: (string){ "mod.test" }
   942+      }
   943+      Y: (struct){
   944+        userinfo: (string){ "user" }
   945+        host: (string){ "mod.test" }
   946+      }
   947+      #Y: (_|_){
   948+        // [incomplete] large.p3.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   949+        //     ./in.cue:313:7
   950+      }
   951+    }
   952+    p4: (struct){
   953+      X: (_|_){
   954+        // [incomplete] large.p4.X: cyclic reference to field port:
   955+        //     ./in.cue:317:33
   956+      }
   957+      #X: (_|_){
   958+        // [incomplete] large.p4.#X.port: cyclic reference to field port:
   959+        //     ./in.cue:329:4
   960+        userinfo: (string){ "user@" }
   961+        host: (string){ "mod.test" }
   962+      }
   963+      #Y: (_|_){
   964+        // [incomplete] large.p4.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   965+        //     ./in.cue:337:7
   966+      }
   967+      Y: (struct){
   968+        userinfo: (string){ "user" }
   969+        host: (string){ "mod.test" }
   970       }
   971     }
   972   }
   973-- diff/todo/p2 --
   974error message: no mention of cycle path
   975-- out/eval --
   976(struct){
   977  minimal: (struct){
   978    a: (_|_){
   979      // [cycle] minimal.b: cycle with field a.port:
   980      //     ./in.cue:18:6
   981      port: (string){ "" }
   982    }
   983    b: (_|_){
   984      // [cycle] minimal.b: cycle with field a.port:
   985      //     ./in.cue:18:6
   986      port*: (_|_){
   987        // [cycle] minimal.b: cycle with field a.port:
   988        //     ./in.cue:18:6
   989      }
   990    }
   991  }
   992  small: (struct){
   993    #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
   994    p1: (struct){
   995      #Y: (#struct){
   996        port: (string){ "" }
   997      }
   998      #X: (_|_){
   999        // [cycle] small.p1.#X: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
  1000        //     ./in.cue:31:7
  1001        // small.p1.#X: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
  1002        //     ./in.cue:34:7
  1003        port: (string){ "" }
  1004      }
  1005    }
  1006    p2: (struct){
  1007      #X: (_|_){
  1008        // [cycle] small.p2.#Y: cycle with field #X.port:
  1009        //     ./in.cue:50:47
  1010        port: (string){ "" }
  1011      }
  1012      #Y: (_|_){
  1013        // [cycle] small.p2.#Y: cycle with field #X.port:
  1014        //     ./in.cue:50:47
  1015      }
  1016    }
  1017  }
  1018  medium: (struct){
  1019    #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
  1020    p1: (struct){
  1021      #Y: (#struct){
  1022        port: (string){ "" }
  1023      }
  1024      Y: (_|_){
  1025        // [cycle] medium.p1.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
  1026        //     ./in.cue:61:7
  1027      }
  1028      #X: (#struct){
  1029        port: (string){ "" }
  1030      }
  1031    }
  1032    p2: (struct){
  1033      #Y: (#struct){
  1034        port: (string){ "" }
  1035      }
  1036      #X: (#struct){
  1037        port: (string){ "" }
  1038      }
  1039      Y: (_|_){
  1040        // [cycle] medium.p2.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
  1041        //     ./in.cue:95:7
  1042      }
  1043    }
  1044    p3: (struct){
  1045      Y: (_|_){
  1046        // [cycle] medium.p3.#X: cycle with field Y.port:
  1047        //     ./in.cue:114:7
  1048      }
  1049      #Y: (_|_){
  1050        // [incomplete] medium.p3.#Y: undefined field: port:
  1051        //     ./in.cue:108:47
  1052      }
  1053      #X: (_|_){
  1054        // [cycle] medium.p3.#X: cycle with field Y.port:
  1055        //     ./in.cue:114:7
  1056      }
  1057    }
  1058    p4: (struct){
  1059      Y: (_|_){
  1060        // [cycle] medium.p4.#X: cycle with field Y.port:
  1061        //     ./in.cue:134:7
  1062      }
  1063      #X: (_|_){
  1064        // [cycle] medium.p4.#X: cycle with field Y.port:
  1065        //     ./in.cue:134:7
  1066      }
  1067      #Y: (_|_){
  1068        // [cycle] medium.p4.#X: cycle with field Y.port:
  1069        //     ./in.cue:134:7
  1070      }
  1071    }
  1072    p5: (struct){
  1073      #X: (_|_){
  1074        // [cycle] medium.p5.#Y: cycle with field #X.port:
  1075        //     ./in.cue:158:47
  1076        port: (string){ "" }
  1077      }
  1078      #Y: (_|_){
  1079        // [cycle] medium.p5.#Y: cycle with field #X.port:
  1080        //     ./in.cue:158:47
  1081      }
  1082      Y: (struct){
  1083      }
  1084    }
  1085    p6: (struct){
  1086      #X: (_|_){
  1087        // [cycle] medium.p6.#Y: cycle with field #X.port:
  1088        //     ./in.cue:186:47
  1089        port: (string){ "" }
  1090      }
  1091      Y: (struct){
  1092      }
  1093      #Y: (_|_){
  1094        // [cycle] medium.p6.#Y: cycle with field #X.port:
  1095        //     ./in.cue:186:47
  1096      }
  1097    }
  1098  }
  1099  large: (struct){
  1100    #userHostPort: (string){ "^((?P<userinfo>[[:alnum:]]*)@)?(?P<host>[[:alnum:].]+)(:(?P<port>\\d+))?$" }
  1101    p1: (struct){
  1102      Y: (_|_){
  1103        // [cycle] large.p1.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
  1104        //     ./in.cue:226:7
  1105        userinfo: (string){ "user" }
  1106        host: (string){ "mod.test" }
  1107      }
  1108      X: (string){ "user@mod.test" }
  1109      #X: (_|_){
  1110        // [cycle] large.p1.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1111        //     ./in.cue:202:7
  1112        // large.p1.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1113        //     ./in.cue:205:7
  1114        userinfo: (string){ "user@" }
  1115        host: (string){ "mod.test" }
  1116        port: (string){ "" }
  1117      }
  1118      #Y: (#struct){
  1119        host: (string){ "mod.test" }
  1120        port: (string){ "" }
  1121        userinfo: (string){ "user" }
  1122      }
  1123    }
  1124    p2: (struct){
  1125      X: (string){ "user@mod.test" }
  1126      Y: (_|_){
  1127        // [cycle] large.p2.Y: cycle error referencing port:
  1128        //     ./in.cue:267:10
  1129        userinfo: (string){ "user" }
  1130        host: (string){ "mod.test" }
  1131        port*: (_|_){
  1132          // [cycle] large.p2.Y: cycle error referencing port:
  1133          //     ./in.cue:267:10
  1134        }
  1135      }
  1136      #X: (_|_){
  1137        // [cycle] large.p2.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1138        //     ./in.cue:243:7
  1139        // large.p2.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1140        //     ./in.cue:246:7
  1141        // large.p2.Y: cycle error referencing port:
  1142        //     ./in.cue:267:10
  1143        userinfo: (string){ "user@" }
  1144        host: (string){ "mod.test" }
  1145        port: (_|_){
  1146          // [cycle] large.p2.Y: cycle error referencing port:
  1147          //     ./in.cue:267:10
  1148        }
  1149      }
  1150      #Y: (#struct){
  1151        host: (string){ "mod.test" }
  1152        port: (string){ "" }
  1153        userinfo: (string){ "user" }
  1154      }
  1155    }
  1156    p3: (struct){
  1157      X: (string){ "user@mod.test" }
  1158      #X: (_|_){
  1159        // [cycle] large.p3.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1160        //     ./in.cue:279:7
  1161        // large.p3.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1162        //     ./in.cue:282:7
  1163        // large.p3.Y: cycle error referencing port:
  1164        //     ./in.cue:308:10
  1165        userinfo: (string){ "user@" }
  1166        host: (string){ "mod.test" }
  1167        port: (_|_){
  1168          // [cycle] large.p3.Y: cycle error referencing port:
  1169          //     ./in.cue:308:10
  1170        }
  1171      }
  1172      Y: (_|_){
  1173        // [cycle] large.p3.Y: cycle error referencing port:
  1174        //     ./in.cue:308:10
  1175        userinfo: (string){ "user" }
  1176        host: (string){ "mod.test" }
  1177        port*: (_|_){
  1178          // [cycle] large.p3.Y: cycle error referencing port:
  1179          //     ./in.cue:308:10
  1180        }
  1181      }
  1182      #Y: (#struct){
  1183        host: (string){ "mod.test" }
  1184        port: (string){ "" }
  1185        userinfo: (string){ "user" }
  1186      }
  1187    }
  1188    p4: (struct){
  1189      X: (string){ "user@mod.test" }
  1190      #X: (_|_){
  1191        // [cycle] large.p4.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1192        //     ./in.cue:320:7
  1193        // large.p4.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1194        //     ./in.cue:323:7
  1195        // large.p4.Y: cycle error referencing port:
  1196        //     ./in.cue:351:10
  1197        userinfo: (string){ "user@" }
  1198        host: (string){ "mod.test" }
  1199        port: (_|_){
  1200          // [cycle] large.p4.Y: cycle error referencing port:
  1201          //     ./in.cue:351:10
  1202        }
  1203      }
  1204      #Y: (#struct){
  1205        host: (string){ "mod.test" }
  1206        port: (string){ "" }
  1207        userinfo: (string){ "user" }
  1208      }
  1209      Y: (_|_){
  1210        // [cycle] large.p4.Y: cycle error referencing port:
  1211        //     ./in.cue:351:10
  1212        userinfo: (string){ "user" }
  1213        host: (string){ "mod.test" }
  1214        port*: (_|_){
  1215          // [cycle] large.p4.Y: cycle error referencing port:
  1216          //     ./in.cue:351:10
  1217        }
  1218      }
  1219    }
  1220  }
  1221}
  1222-- out/compile --
  1223--- in.cue
  1224{
  1225  minimal: {
  1226    a: {
  1227      if (〈1;b〉.port == _|_(explicit error (_|_ literal) in source)) {
  1228        port: ""
  1229      }
  1230    }
  1231    b: {
  1232      if (〈1;a〉.port == _|_(explicit error (_|_ literal) in source)) {
  1233        port: ""
  1234      }
  1235    }
  1236  }
  1237  small: {
  1238    #userHostPort: "^(:(?P<port>\\d+))?$"
  1239    p1: {
  1240      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1241      #X: {
  1242        if (〈1;#Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1243          port: ""
  1244        }
  1245        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1246          port: (":" + 〈import;strconv〉.FormatInt(〈2;#Y〉.port, 10))
  1247        }
  1248      }
  1249    }
  1250    p2: {
  1251      #X: {
  1252        if (〈1;#Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1253          port: ""
  1254        }
  1255        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1256          port: (":" + 〈import;strconv〉.FormatInt(〈2;#Y〉.port, 10))
  1257        }
  1258      }
  1259      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1260    }
  1261  }
  1262  medium: {
  1263    #userHostPort: "^(:(?P<port>\\d+))?$"
  1264    p1: {
  1265      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1266      Y: {
  1267        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1268          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1269        }
  1270      }
  1271      #X: {
  1272        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1273          port: ""
  1274        }
  1275        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1276          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1277        }
  1278      }
  1279    }
  1280    p2: {
  1281      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1282      #X: {
  1283        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1284          port: ""
  1285        }
  1286        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1287          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1288        }
  1289      }
  1290      Y: {
  1291        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1292          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1293        }
  1294      }
  1295    }
  1296    p3: {
  1297      Y: {
  1298        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1299          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1300        }
  1301      }
  1302      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1303      #X: {
  1304        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1305          port: ""
  1306        }
  1307        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1308          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1309        }
  1310      }
  1311    }
  1312    p4: {
  1313      Y: {
  1314        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1315          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1316        }
  1317      }
  1318      #X: {
  1319        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1320          port: ""
  1321        }
  1322        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1323          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1324        }
  1325      }
  1326      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1327    }
  1328    p5: {
  1329      #X: {
  1330        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1331          port: ""
  1332        }
  1333        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1334          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1335        }
  1336      }
  1337      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1338      Y: {
  1339        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1340          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1341        }
  1342      }
  1343    }
  1344    p6: {
  1345      #X: {
  1346        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1347          port: ""
  1348        }
  1349        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1350          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1351        }
  1352      }
  1353      Y: {
  1354        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1355          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1356        }
  1357      }
  1358      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1359    }
  1360  }
  1361  large: {
  1362    #userHostPort: "^((?P<userinfo>[[:alnum:]]*)@)?(?P<host>[[:alnum:].]+)(:(?P<port>\\d+))?$"
  1363    p1: {
  1364      Y: {
  1365        userinfo: "user"
  1366        host: "mod.test"
  1367      }
  1368      X: ((〈0;#X〉.userinfo + 〈0;#X〉.host) + 〈0;#X〉.port)
  1369      #X: {
  1370        if (〈1;Y〉.userinfo == _|_(explicit error (_|_ literal) in source)) {
  1371          userinfo: ""
  1372        }
  1373        if (〈1;Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1374          userinfo: (〈2;Y〉.userinfo + "@")
  1375        }
  1376        host: 〈1;Y〉.host
  1377        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1378          port: ""
  1379        }
  1380        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1381          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1382        }
  1383      }
  1384      Y: {
  1385        if (〈1;#Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1386          userinfo: 〈2;#Y〉.userinfo
  1387        }
  1388        host: 〈1;#Y〉.host
  1389        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1390          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1391        }
  1392      }
  1393      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;X〉)
  1394    }
  1395    p2: {
  1396      X: ((〈0;#X〉.userinfo + 〈0;#X〉.host) + 〈0;#X〉.port)
  1397      Y: {
  1398        userinfo: "user"
  1399        host: "mod.test"
  1400      }
  1401      #X: {
  1402        if (〈1;Y〉.userinfo == _|_(explicit error (_|_ literal) in source)) {
  1403          userinfo: ""
  1404        }
  1405        if (〈1;Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1406          userinfo: (〈2;Y〉.userinfo + "@")
  1407        }
  1408        host: 〈1;Y〉.host
  1409        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1410          port: ""
  1411        }
  1412        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1413          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1414        }
  1415      }
  1416      Y: {
  1417        if (〈1;#Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1418          userinfo: 〈2;#Y〉.userinfo
  1419        }
  1420        host: 〈1;#Y〉.host
  1421        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1422          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1423        }
  1424      }
  1425      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;X〉)
  1426    }
  1427    p3: {
  1428      X: ((〈0;#X〉.userinfo + 〈0;#X〉.host) + 〈0;#X〉.port)
  1429      #X: {
  1430        if (〈1;Y〉.userinfo == _|_(explicit error (_|_ literal) in source)) {
  1431          userinfo: ""
  1432        }
  1433        if (〈1;Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1434          userinfo: (〈2;Y〉.userinfo + "@")
  1435        }
  1436        host: 〈1;Y〉.host
  1437        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1438          port: ""
  1439        }
  1440        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1441          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1442        }
  1443      }
  1444      Y: {
  1445        userinfo: "user"
  1446        host: "mod.test"
  1447      }
  1448      Y: {
  1449        if (〈1;#Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1450          userinfo: 〈2;#Y〉.userinfo
  1451        }
  1452        host: 〈1;#Y〉.host
  1453        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1454          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1455        }
  1456      }
  1457      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;X〉)
  1458    }
  1459    p4: {
  1460      X: ((〈0;#X〉.userinfo + 〈0;#X〉.host) + 〈0;#X〉.port)
  1461      #X: {
  1462        if (〈1;Y〉.userinfo == _|_(explicit error (_|_ literal) in source)) {
  1463          userinfo: ""
  1464        }
  1465        if (〈1;Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1466          userinfo: (〈2;Y〉.userinfo + "@")
  1467        }
  1468        host: 〈1;Y〉.host
  1469        if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1470          port: ""
  1471        }
  1472        if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1473          port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1474        }
  1475      }
  1476      #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;X〉)
  1477      Y: {
  1478        userinfo: "user"
  1479        host: "mod.test"
  1480      }
  1481      Y: {
  1482        if (〈1;#Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1483          userinfo: 〈2;#Y〉.userinfo
  1484        }
  1485        host: 〈1;#Y〉.host
  1486        if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1487          port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1488        }
  1489      }
  1490    }
  1491  }
  1492}

View as plain text