cuelang.org/go@v0.10.1/cue/testdata/cycle/compbottomnofinal.txtar (about)

     1  // Issues: #667, #695, #622
     2  -- in.cue --
     3  import (
     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.
    12  minimal: {
    13  	a: {
    14  		if b.port == _|_ {
    15  			port: ""
    16  		}
    17  	}
    18  
    19  	b: {
    20  		if a.port == _|_ {
    21  			port: ""
    22  		}
    23  	}
    24  }
    25  
    26  small: {
    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  
    56  medium: {
    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  
   192  large: {
   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 --
   360  Leaks:  10
   361  Freed:  105
   362  Reused: 95
   363  Allocs: 20
   364  Retain: 302
   365  
   366  Unifications: 115
   367  Conjuncts:    223
   368  Disjuncts:    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: undefined 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: undefined field: port:
   498          //     ./in.cue:199:33
   499        }
   500      }
   501      p2: (struct){
   502        X: (_|_){
   503          // [incomplete] large.p2.X: undefined 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: undefined 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: undefined 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 --
   564  diff old new
   565  --- old
   566  +++ new
   567  @@ -1,35 +1,34 @@
   568   (struct){
   569     minimal: (struct){
   570       a: (_|_){
   571  -      // [cycle] minimal.b: cycle with field a.port:
   572  -      //     ./in.cue:18:6
   573  +      // [incomplete] minimal.a.port: cyclic reference to field port:
   574  +      //     ./in.cue:12:3
   575       }
   576       b: (_|_){
   577  -      // [cycle] minimal.b: cycle with field a.port:
   578  -      //     ./in.cue:18:6
   579  +      // [incomplete] minimal.b.port: cyclic reference to field port:
   580  +      //     ./in.cue:18:3
   581       }
   582     }
   583     small: (struct){
   584       #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
   585       p1: (struct){
   586  -      #Y: (#struct){
   587  -        port: (string){ "" }
   588  -      }
   589  -      #X: (_|_){
   590  -        // [cycle] small.p1.#X: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   591  -        //     ./in.cue:31:7
   592  -        // small.p1.#X: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   593  -        //     ./in.cue:34:7
   594  -      }
   595  -    }
   596  -    p2: (struct){
   597  -      #X: (_|_){
   598  -        // [cycle] small.p2.#Y: cycle with field #X.port:
   599  -        //     ./in.cue:50:47
   600  -      }
   601  -      #Y: (_|_){
   602  -        // [cycle] small.p2.#Y: cycle with field #X.port:
   603  -        //     ./in.cue:50:47
   604  +      #Y: (_|_){
   605  +        // [incomplete] small.p1.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   606  +        //     ./in.cue:28:7
   607  +      }
   608  +      #X: (_|_){
   609  +        // [incomplete] small.p1.#X.port: cyclic reference to field port:
   610  +        //     ./in.cue:31:4
   611  +      }
   612  +    }
   613  +    p2: (struct){
   614  +      #X: (_|_){
   615  +        // [incomplete] small.p2.#X.port: cyclic reference to field port:
   616  +        //     ./in.cue:42:4
   617  +      }
   618  +      #Y: (_|_){
   619  +        // [incomplete] small.p2.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   620  +        //     ./in.cue:50:7
   621         }
   622       }
   623     }
   624  @@ -36,65 +35,61 @@
   625     medium: (struct){
   626       #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
   627       p1: (struct){
   628  -      #Y: (#struct){
   629  -        port: (string){ "" }
   630  -      }
   631  -      Y: (_|_){
   632  -        // [cycle] medium.p1.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   633  -        //     ./in.cue:61:7
   634  -      }
   635  -      #X: (#struct){
   636  -        port: (string){ "" }
   637  -      }
   638  -    }
   639  -    p2: (struct){
   640  -      #Y: (#struct){
   641  -        port: (string){ "" }
   642  -      }
   643  -      #X: (#struct){
   644  -        port: (string){ "" }
   645  -      }
   646  -      Y: (_|_){
   647  -        // [cycle] medium.p2.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   648  -        //     ./in.cue:95:7
   649  -      }
   650  -    }
   651  -    p3: (struct){
   652  -      Y: (_|_){
   653  -        // [cycle] medium.p3.#X: cycle with field Y.port:
   654  -        //     ./in.cue:114:7
   655  -      }
   656  -      #Y: (_|_){
   657  -        // [incomplete] medium.p3.#Y: undefined field: port:
   658  -        //     ./in.cue:108:47
   659  -      }
   660  -      #X: (_|_){
   661  -        // [cycle] medium.p3.#X: cycle with field Y.port:
   662  -        //     ./in.cue:114:7
   663  -      }
   664  -    }
   665  -    p4: (struct){
   666  -      Y: (_|_){
   667  -        // [cycle] medium.p4.#X: cycle with field Y.port:
   668  -        //     ./in.cue:134:7
   669  -      }
   670  -      #X: (_|_){
   671  -        // [cycle] medium.p4.#X: cycle with field Y.port:
   672  -        //     ./in.cue:134:7
   673  -      }
   674  -      #Y: (_|_){
   675  -        // [cycle] medium.p4.#X: cycle with field Y.port:
   676  -        //     ./in.cue:134:7
   677  +      #Y: (_|_){
   678  +        // [incomplete] medium.p1.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   679  +        //     ./in.cue:58:7
   680  +      }
   681  +      Y: (struct){
   682  +      }
   683  +      #X: (_|_){
   684  +        // [incomplete] medium.p1.#X.port: cyclic reference to field port:
   685  +        //     ./in.cue:70:4
   686  +      }
   687  +    }
   688  +    p2: (struct){
   689  +      #Y: (_|_){
   690  +        // [incomplete] medium.p2.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   691  +        //     ./in.cue:80:7
   692  +      }
   693  +      #X: (_|_){
   694  +        // [incomplete] medium.p2.#X.port: cyclic reference to field port:
   695  +        //     ./in.cue:86:4
   696  +      }
   697  +      Y: (struct){
   698  +      }
   699  +    }
   700  +    p3: (struct){
   701  +      Y: (struct){
   702  +      }
   703  +      #Y: (_|_){
   704  +        // [incomplete] medium.p3.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   705  +        //     ./in.cue:108:7
   706  +      }
   707  +      #X: (_|_){
   708  +        // [incomplete] medium.p3.#X.port: cyclic reference to field port:
   709  +        //     ./in.cue:114:4
   710  +      }
   711  +    }
   712  +    p4: (struct){
   713  +      Y: (struct){
   714  +      }
   715  +      #X: (_|_){
   716  +        // [incomplete] medium.p4.#X.port: cyclic reference to field port:
   717  +        //     ./in.cue:134:4
   718  +      }
   719  +      #Y: (_|_){
   720  +        // [incomplete] medium.p4.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   721  +        //     ./in.cue:142:7
   722         }
   723       }
   724       p5: (struct){
   725         #X: (_|_){
   726  -        // [cycle] medium.p5.#Y: cycle with field #X.port:
   727  -        //     ./in.cue:158:47
   728  -      }
   729  -      #Y: (_|_){
   730  -        // [cycle] medium.p5.#Y: cycle with field #X.port:
   731  -        //     ./in.cue:158:47
   732  +        // [incomplete] medium.p5.#X.port: cyclic reference to field port:
   733  +        //     ./in.cue:150:4
   734  +      }
   735  +      #Y: (_|_){
   736  +        // [incomplete] medium.p5.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   737  +        //     ./in.cue:158:7
   738         }
   739         Y: (struct){
   740         }
   741  @@ -101,14 +96,14 @@
   742       }
   743       p6: (struct){
   744         #X: (_|_){
   745  -        // [cycle] medium.p6.#Y: cycle with field #X.port:
   746  -        //     ./in.cue:186:47
   747  -      }
   748  -      Y: (struct){
   749  -      }
   750  -      #Y: (_|_){
   751  -        // [cycle] medium.p6.#Y: cycle with field #X.port:
   752  -        //     ./in.cue:186:47
   753  +        // [incomplete] medium.p6.#X.port: cyclic reference to field port:
   754  +        //     ./in.cue:172:4
   755  +      }
   756  +      Y: (struct){
   757  +      }
   758  +      #Y: (_|_){
   759  +        // [incomplete] medium.p6.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   760  +        //     ./in.cue:186:7
   761         }
   762       }
   763     }
   764  @@ -115,81 +110,83 @@
   765     large: (struct){
   766       #userHostPort: (string){ "^((?P<userinfo>[[:alnum:]]*)@)?(?P<host>[[:alnum:].]+)(:(?P<port>\\d+))?$" }
   767       p1: (struct){
   768  -      Y: (_|_){
   769  -        // [cycle] large.p1.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   770  -        //     ./in.cue:226:7
   771  -      }
   772  -      X: (string){ "user@mod.test" }
   773  -      #X: (_|_){
   774  -        // [cycle] large.p1.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   775  -        //     ./in.cue:202:7
   776  -        // large.p1.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   777  -        //     ./in.cue:205:7
   778  -      }
   779  -      #Y: (#struct){
   780  -        host: (string){ "mod.test" }
   781  -        port: (string){ "" }
   782  -        userinfo: (string){ "user" }
   783  -      }
   784  -    }
   785  -    p2: (struct){
   786  -      X: (string){ "user@mod.test" }
   787  -      Y: (_|_){
   788  -        // [cycle] large.p2.Y: cycle error referencing port:
   789  -        //     ./in.cue:267:10
   790  -      }
   791  -      #X: (_|_){
   792  -        // [cycle] large.p2.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   793  -        //     ./in.cue:243:7
   794  -        // large.p2.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   795  -        //     ./in.cue:246:7
   796  -        // large.p2.Y: cycle error referencing port:
   797  -        //     ./in.cue:267:10
   798  -      }
   799  -      #Y: (#struct){
   800  -        host: (string){ "mod.test" }
   801  -        port: (string){ "" }
   802  -        userinfo: (string){ "user" }
   803  -      }
   804  -    }
   805  -    p3: (struct){
   806  -      X: (string){ "user@mod.test" }
   807  -      #X: (_|_){
   808  -        // [cycle] large.p3.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   809  -        //     ./in.cue:279:7
   810  -        // large.p3.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   811  -        //     ./in.cue:282:7
   812  -        // large.p3.Y: cycle error referencing port:
   813  -        //     ./in.cue:308:10
   814  -      }
   815  -      Y: (_|_){
   816  -        // [cycle] large.p3.Y: cycle error referencing port:
   817  -        //     ./in.cue:308:10
   818  -      }
   819  -      #Y: (#struct){
   820  -        host: (string){ "mod.test" }
   821  -        port: (string){ "" }
   822  -        userinfo: (string){ "user" }
   823  -      }
   824  -    }
   825  -    p4: (struct){
   826  -      X: (string){ "user@mod.test" }
   827  -      #X: (_|_){
   828  -        // [cycle] large.p4.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   829  -        //     ./in.cue:320:7
   830  -        // large.p4.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
   831  -        //     ./in.cue:323:7
   832  -        // large.p4.Y: cycle error referencing port:
   833  -        //     ./in.cue:351:10
   834  -      }
   835  -      #Y: (#struct){
   836  -        host: (string){ "mod.test" }
   837  -        port: (string){ "" }
   838  -        userinfo: (string){ "user" }
   839  -      }
   840  -      Y: (_|_){
   841  -        // [cycle] large.p4.Y: cycle error referencing port:
   842  -        //     ./in.cue:351:10
   843  +      Y: (struct){
   844  +        userinfo: (string){ "user" }
   845  +        host: (string){ "mod.test" }
   846  +      }
   847  +      X: (_|_){
   848  +        // [incomplete] large.p1.X: undefined field: port:
   849  +        //     ./in.cue:199:33
   850  +      }
   851  +      #X: (_|_){
   852  +        // [incomplete] large.p1.#X.port: cyclic reference to field port:
   853  +        //     ./in.cue:211:4
   854  +        userinfo: (string){ "user@" }
   855  +        host: (string){ "mod.test" }
   856  +      }
   857  +      #Y: (_|_){
   858  +        // [incomplete] large.p1.X: undefined field: port:
   859  +        //     ./in.cue:199:33
   860  +      }
   861  +    }
   862  +    p2: (struct){
   863  +      X: (_|_){
   864  +        // [incomplete] large.p2.X: undefined field: port:
   865  +        //     ./in.cue:235:33
   866  +      }
   867  +      Y: (struct){
   868  +        userinfo: (string){ "user" }
   869  +        host: (string){ "mod.test" }
   870  +      }
   871  +      #X: (_|_){
   872  +        // [incomplete] large.p2.#X.port: cyclic reference to field port:
   873  +        //     ./in.cue:252:4
   874  +        userinfo: (string){ "user@" }
   875  +        host: (string){ "mod.test" }
   876  +      }
   877  +      #Y: (_|_){
   878  +        // [incomplete] large.p2.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   879  +        //     ./in.cue:272:7
   880  +      }
   881  +    }
   882  +    p3: (struct){
   883  +      X: (_|_){
   884  +        // [incomplete] large.p3.X: undefined field: port:
   885  +        //     ./in.cue:276:33
   886  +      }
   887  +      #X: (_|_){
   888  +        // [incomplete] large.p3.#X.port: cyclic reference to field port:
   889  +        //     ./in.cue:288:4
   890  +        userinfo: (string){ "user@" }
   891  +        host: (string){ "mod.test" }
   892  +      }
   893  +      Y: (struct){
   894  +        userinfo: (string){ "user" }
   895  +        host: (string){ "mod.test" }
   896  +      }
   897  +      #Y: (_|_){
   898  +        // [incomplete] large.p3.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   899  +        //     ./in.cue:313:7
   900  +      }
   901  +    }
   902  +    p4: (struct){
   903  +      X: (_|_){
   904  +        // [incomplete] large.p4.X: undefined field: port:
   905  +        //     ./in.cue:317:33
   906  +      }
   907  +      #X: (_|_){
   908  +        // [incomplete] large.p4.#X.port: cyclic reference to field port:
   909  +        //     ./in.cue:329:4
   910  +        userinfo: (string){ "user@" }
   911  +        host: (string){ "mod.test" }
   912  +      }
   913  +      #Y: (_|_){
   914  +        // [incomplete] large.p4.#Y: error in call to regexp.FindNamedSubmatch: non-concrete value _:
   915  +        //     ./in.cue:337:7
   916  +      }
   917  +      Y: (struct){
   918  +        userinfo: (string){ "user" }
   919  +        host: (string){ "mod.test" }
   920         }
   921       }
   922     }
   923  -- diff/todo/p2 --
   924  error message: no mention of cycle path
   925  -- out/eval --
   926  (struct){
   927    minimal: (struct){
   928      a: (_|_){
   929        // [cycle] minimal.b: cycle with field a.port:
   930        //     ./in.cue:18:6
   931      }
   932      b: (_|_){
   933        // [cycle] minimal.b: cycle with field a.port:
   934        //     ./in.cue:18:6
   935      }
   936    }
   937    small: (struct){
   938      #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
   939      p1: (struct){
   940        #Y: (#struct){
   941          port: (string){ "" }
   942        }
   943        #X: (_|_){
   944          // [cycle] small.p1.#X: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   945          //     ./in.cue:31:7
   946          // small.p1.#X: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   947          //     ./in.cue:34:7
   948        }
   949      }
   950      p2: (struct){
   951        #X: (_|_){
   952          // [cycle] small.p2.#Y: cycle with field #X.port:
   953          //     ./in.cue:50:47
   954        }
   955        #Y: (_|_){
   956          // [cycle] small.p2.#Y: cycle with field #X.port:
   957          //     ./in.cue:50:47
   958        }
   959      }
   960    }
   961    medium: (struct){
   962      #userHostPort: (string){ "^(:(?P<port>\\d+))?$" }
   963      p1: (struct){
   964        #Y: (#struct){
   965          port: (string){ "" }
   966        }
   967        Y: (_|_){
   968          // [cycle] medium.p1.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   969          //     ./in.cue:61:7
   970        }
   971        #X: (#struct){
   972          port: (string){ "" }
   973        }
   974      }
   975      p2: (struct){
   976        #Y: (#struct){
   977          port: (string){ "" }
   978        }
   979        #X: (#struct){
   980          port: (string){ "" }
   981        }
   982        Y: (_|_){
   983          // [cycle] medium.p2.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
   984          //     ./in.cue:95:7
   985        }
   986      }
   987      p3: (struct){
   988        Y: (_|_){
   989          // [cycle] medium.p3.#X: cycle with field Y.port:
   990          //     ./in.cue:114:7
   991        }
   992        #Y: (_|_){
   993          // [incomplete] medium.p3.#Y: undefined field: port:
   994          //     ./in.cue:108:47
   995        }
   996        #X: (_|_){
   997          // [cycle] medium.p3.#X: cycle with field Y.port:
   998          //     ./in.cue:114:7
   999        }
  1000      }
  1001      p4: (struct){
  1002        Y: (_|_){
  1003          // [cycle] medium.p4.#X: cycle with field Y.port:
  1004          //     ./in.cue:134:7
  1005        }
  1006        #X: (_|_){
  1007          // [cycle] medium.p4.#X: cycle with field Y.port:
  1008          //     ./in.cue:134:7
  1009        }
  1010        #Y: (_|_){
  1011          // [cycle] medium.p4.#X: cycle with field Y.port:
  1012          //     ./in.cue:134:7
  1013        }
  1014      }
  1015      p5: (struct){
  1016        #X: (_|_){
  1017          // [cycle] medium.p5.#Y: cycle with field #X.port:
  1018          //     ./in.cue:158:47
  1019        }
  1020        #Y: (_|_){
  1021          // [cycle] medium.p5.#Y: cycle with field #X.port:
  1022          //     ./in.cue:158:47
  1023        }
  1024        Y: (struct){
  1025        }
  1026      }
  1027      p6: (struct){
  1028        #X: (_|_){
  1029          // [cycle] medium.p6.#Y: cycle with field #X.port:
  1030          //     ./in.cue:186:47
  1031        }
  1032        Y: (struct){
  1033        }
  1034        #Y: (_|_){
  1035          // [cycle] medium.p6.#Y: cycle with field #X.port:
  1036          //     ./in.cue:186:47
  1037        }
  1038      }
  1039    }
  1040    large: (struct){
  1041      #userHostPort: (string){ "^((?P<userinfo>[[:alnum:]]*)@)?(?P<host>[[:alnum:].]+)(:(?P<port>\\d+))?$" }
  1042      p1: (struct){
  1043        Y: (_|_){
  1044          // [cycle] large.p1.Y: circular dependency in evaluation of conditionals: #Y.port changed after evaluation:
  1045          //     ./in.cue:226:7
  1046        }
  1047        X: (string){ "user@mod.test" }
  1048        #X: (_|_){
  1049          // [cycle] large.p1.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1050          //     ./in.cue:202:7
  1051          // large.p1.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1052          //     ./in.cue:205:7
  1053        }
  1054        #Y: (#struct){
  1055          host: (string){ "mod.test" }
  1056          port: (string){ "" }
  1057          userinfo: (string){ "user" }
  1058        }
  1059      }
  1060      p2: (struct){
  1061        X: (string){ "user@mod.test" }
  1062        Y: (_|_){
  1063          // [cycle] large.p2.Y: cycle error referencing port:
  1064          //     ./in.cue:267:10
  1065        }
  1066        #X: (_|_){
  1067          // [cycle] large.p2.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1068          //     ./in.cue:243:7
  1069          // large.p2.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1070          //     ./in.cue:246:7
  1071          // large.p2.Y: cycle error referencing port:
  1072          //     ./in.cue:267:10
  1073        }
  1074        #Y: (#struct){
  1075          host: (string){ "mod.test" }
  1076          port: (string){ "" }
  1077          userinfo: (string){ "user" }
  1078        }
  1079      }
  1080      p3: (struct){
  1081        X: (string){ "user@mod.test" }
  1082        #X: (_|_){
  1083          // [cycle] large.p3.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1084          //     ./in.cue:279:7
  1085          // large.p3.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1086          //     ./in.cue:282:7
  1087          // large.p3.Y: cycle error referencing port:
  1088          //     ./in.cue:308:10
  1089        }
  1090        Y: (_|_){
  1091          // [cycle] large.p3.Y: cycle error referencing port:
  1092          //     ./in.cue:308:10
  1093        }
  1094        #Y: (#struct){
  1095          host: (string){ "mod.test" }
  1096          port: (string){ "" }
  1097          userinfo: (string){ "user" }
  1098        }
  1099      }
  1100      p4: (struct){
  1101        X: (string){ "user@mod.test" }
  1102        #X: (_|_){
  1103          // [cycle] large.p4.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1104          //     ./in.cue:320:7
  1105          // large.p4.#X: circular dependency in evaluation of conditionals: Y.userinfo changed after evaluation:
  1106          //     ./in.cue:323:7
  1107          // large.p4.Y: cycle error referencing port:
  1108          //     ./in.cue:351:10
  1109        }
  1110        #Y: (#struct){
  1111          host: (string){ "mod.test" }
  1112          port: (string){ "" }
  1113          userinfo: (string){ "user" }
  1114        }
  1115        Y: (_|_){
  1116          // [cycle] large.p4.Y: cycle error referencing port:
  1117          //     ./in.cue:351:10
  1118        }
  1119      }
  1120    }
  1121  }
  1122  -- out/compile --
  1123  --- in.cue
  1124  {
  1125    minimal: {
  1126      a: {
  1127        if (〈1;b〉.port == _|_(explicit error (_|_ literal) in source)) {
  1128          port: ""
  1129        }
  1130      }
  1131      b: {
  1132        if (〈1;a〉.port == _|_(explicit error (_|_ literal) in source)) {
  1133          port: ""
  1134        }
  1135      }
  1136    }
  1137    small: {
  1138      #userHostPort: "^(:(?P<port>\\d+))?$"
  1139      p1: {
  1140        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1141        #X: {
  1142          if (〈1;#Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1143            port: ""
  1144          }
  1145          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1146            port: (":" + 〈import;strconv〉.FormatInt(〈2;#Y〉.port, 10))
  1147          }
  1148        }
  1149      }
  1150      p2: {
  1151        #X: {
  1152          if (〈1;#Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1153            port: ""
  1154          }
  1155          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1156            port: (":" + 〈import;strconv〉.FormatInt(〈2;#Y〉.port, 10))
  1157          }
  1158        }
  1159        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1160      }
  1161    }
  1162    medium: {
  1163      #userHostPort: "^(:(?P<port>\\d+))?$"
  1164      p1: {
  1165        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1166        Y: {
  1167          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1168            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1169          }
  1170        }
  1171        #X: {
  1172          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1173            port: ""
  1174          }
  1175          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1176            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1177          }
  1178        }
  1179      }
  1180      p2: {
  1181        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1182        #X: {
  1183          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1184            port: ""
  1185          }
  1186          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1187            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1188          }
  1189        }
  1190        Y: {
  1191          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1192            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1193          }
  1194        }
  1195      }
  1196      p3: {
  1197        Y: {
  1198          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1199            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1200          }
  1201        }
  1202        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1203        #X: {
  1204          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1205            port: ""
  1206          }
  1207          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1208            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1209          }
  1210        }
  1211      }
  1212      p4: {
  1213        Y: {
  1214          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1215            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1216          }
  1217        }
  1218        #X: {
  1219          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1220            port: ""
  1221          }
  1222          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1223            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1224          }
  1225        }
  1226        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1227      }
  1228      p5: {
  1229        #X: {
  1230          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1231            port: ""
  1232          }
  1233          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1234            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1235          }
  1236        }
  1237        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1238        Y: {
  1239          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1240            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1241          }
  1242        }
  1243      }
  1244      p6: {
  1245        #X: {
  1246          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1247            port: ""
  1248          }
  1249          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1250            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1251          }
  1252        }
  1253        Y: {
  1254          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1255            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1256          }
  1257        }
  1258        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;#X〉.port)
  1259      }
  1260    }
  1261    large: {
  1262      #userHostPort: "^((?P<userinfo>[[:alnum:]]*)@)?(?P<host>[[:alnum:].]+)(:(?P<port>\\d+))?$"
  1263      p1: {
  1264        Y: {
  1265          userinfo: "user"
  1266          host: "mod.test"
  1267        }
  1268        X: ((〈0;#X〉.userinfo + 〈0;#X〉.host) + 〈0;#X〉.port)
  1269        #X: {
  1270          if (〈1;Y〉.userinfo == _|_(explicit error (_|_ literal) in source)) {
  1271            userinfo: ""
  1272          }
  1273          if (〈1;Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1274            userinfo: (〈2;Y〉.userinfo + "@")
  1275          }
  1276          host: 〈1;Y〉.host
  1277          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1278            port: ""
  1279          }
  1280          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1281            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1282          }
  1283        }
  1284        Y: {
  1285          if (〈1;#Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1286            userinfo: 〈2;#Y〉.userinfo
  1287          }
  1288          host: 〈1;#Y〉.host
  1289          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1290            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1291          }
  1292        }
  1293        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;X〉)
  1294      }
  1295      p2: {
  1296        X: ((〈0;#X〉.userinfo + 〈0;#X〉.host) + 〈0;#X〉.port)
  1297        Y: {
  1298          userinfo: "user"
  1299          host: "mod.test"
  1300        }
  1301        #X: {
  1302          if (〈1;Y〉.userinfo == _|_(explicit error (_|_ literal) in source)) {
  1303            userinfo: ""
  1304          }
  1305          if (〈1;Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1306            userinfo: (〈2;Y〉.userinfo + "@")
  1307          }
  1308          host: 〈1;Y〉.host
  1309          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1310            port: ""
  1311          }
  1312          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1313            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1314          }
  1315        }
  1316        Y: {
  1317          if (〈1;#Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1318            userinfo: 〈2;#Y〉.userinfo
  1319          }
  1320          host: 〈1;#Y〉.host
  1321          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1322            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1323          }
  1324        }
  1325        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;X〉)
  1326      }
  1327      p3: {
  1328        X: ((〈0;#X〉.userinfo + 〈0;#X〉.host) + 〈0;#X〉.port)
  1329        #X: {
  1330          if (〈1;Y〉.userinfo == _|_(explicit error (_|_ literal) in source)) {
  1331            userinfo: ""
  1332          }
  1333          if (〈1;Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1334            userinfo: (〈2;Y〉.userinfo + "@")
  1335          }
  1336          host: 〈1;Y〉.host
  1337          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1338            port: ""
  1339          }
  1340          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1341            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1342          }
  1343        }
  1344        Y: {
  1345          userinfo: "user"
  1346          host: "mod.test"
  1347        }
  1348        Y: {
  1349          if (〈1;#Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1350            userinfo: 〈2;#Y〉.userinfo
  1351          }
  1352          host: 〈1;#Y〉.host
  1353          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1354            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1355          }
  1356        }
  1357        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;X〉)
  1358      }
  1359      p4: {
  1360        X: ((〈0;#X〉.userinfo + 〈0;#X〉.host) + 〈0;#X〉.port)
  1361        #X: {
  1362          if (〈1;Y〉.userinfo == _|_(explicit error (_|_ literal) in source)) {
  1363            userinfo: ""
  1364          }
  1365          if (〈1;Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1366            userinfo: (〈2;Y〉.userinfo + "@")
  1367          }
  1368          host: 〈1;Y〉.host
  1369          if (〈1;Y〉.port == _|_(explicit error (_|_ literal) in source)) {
  1370            port: ""
  1371          }
  1372          if (〈1;Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1373            port: (":" + 〈import;strconv〉.FormatInt(〈2;Y〉.port, 10))
  1374          }
  1375        }
  1376        #Y: 〈import;regexp〉.FindNamedSubmatch(〈1;#userHostPort〉, 〈0;X〉)
  1377        Y: {
  1378          userinfo: "user"
  1379          host: "mod.test"
  1380        }
  1381        Y: {
  1382          if (〈1;#Y〉.userinfo != _|_(explicit error (_|_ literal) in source)) {
  1383            userinfo: 〈2;#Y〉.userinfo
  1384          }
  1385          host: 〈1;#Y〉.host
  1386          if (〈1;#Y〉.port != _|_(explicit error (_|_ literal) in source)) {
  1387            port: 〈import;strconv〉.Atoi(〈2;#Y〉.port)
  1388          }
  1389        }
  1390      }
  1391    }
  1392  }