blob: 1c008d3509e2fe432fab76bb8506b349b215c862 [file] [log] [blame]
-- in.cue --
a: {
let X = Y
let Y = c
b: X
c: 5
}
b: {
let X = Y
let Y = X
b: X
c: 5
}
fieldOffset: {
a: {
p1: {
let X = { value: Y }
let Y = 2
x: X
}
p2: {
x: X
let Y = 2
let X = { value: Y }
}
}
b: {
p1: {
let X = { x: y: Y }
let Y = 2
x: X
}
p2: {
x: X
let Y = 2
let X = { x: y: Y }
}
}
}
issue767: {
#Foo: {
let _#bar = {
value: ""
}
let _#volmnts = {
x: _#baz.value
}
let _#baz = {
_#bar
}
out: _#volmnts
}
}
-- out/compile --
--- in.cue
{
a: {
b: 0;let X
c: 5
}
b: {
b: 0;let X
c: 5
}
fieldOffset: {
a: {
p1: {
x: 0;let X
}
p2: {
x: 0;let X
}
}
b: {
p1: {
x: 0;let X
}
p2: {
x: 0;let X
}
}
}
issue767: {
#Foo: {
out: 0;let _#volmnts〉
}
}
}
-- out/eval --
Errors:
b.let[]: cyclic references in let clause or alias:
./in.cue:10:13
Result:
(_|_){
// [eval]
a: (struct){
b: (int){ 5 }
c: (int){ 5 }
}
b: (_|_){
// [eval]
b: (_|_){
// [eval] b.let[]: cyclic references in let clause or alias:
// ./in.cue:10:13
}
c: (int){ 5 }
}
fieldOffset: (struct){
a: (struct){
p1: (struct){
x: (struct){
value: (int){ 2 }
}
}
p2: (struct){
x: (struct){
value: (int){ 2 }
}
}
}
b: (struct){
p1: (struct){
x: (struct){
x: (struct){
y: (int){ 2 }
}
}
}
p2: (struct){
x: (struct){
x: (struct){
y: (int){ 2 }
}
}
}
}
}
issue767: (struct){
#Foo: (#struct){
out: (#struct){
x: (string){ "" }
}
}
}
}