You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-3972 Infinite recursion when defining indirect enums in REPL
Issue Description:
When typing the following code into the Swift REPL (in a Terminal), the Swift REPL goes into an infinite loop trying to print the structural description of a created value:
indirectenumTest {
casesomething(Test)
caseend
}
// This line will cause the REPL to go into an infinite loop:lettest = Test.something(Test.something(Test.something(Test.something(Test.end))))
In another case, I have noticed, that some fields in the description may be missing or wrong:
publicindirectenumList<Element> {
caseemptycaseelement(head: Element, tail: List<Element>)
}
varlist = List<Int>.empty// Everything OK so farlist = List.element(head: 42, tail: list)
// The next line will print an incorrect structural description of the variable list:list
Some outputs for the last line of the second example are:
$R0: List<Int> = element {
element = {
head = 4301270064
tail = element {
element = {
head = -4611677235481463998
tail = element {
element = {
head = 4579621336
tail = element {
element = {
head = 140527134881072
tail = element {
element = {
head = 140527134881088
tail = element {
element = {
head = 140527134881088
tail = element {
element = {
head = 4580062912
tail = empty
}
}
}
}
}
}
}
}
}
}
}
}
}
}
or
$R1: List<Int> = element {
element = {
head = 4301270064
tail = element {
element = {
head = -8070441749301998876
tail = empty
}
}
}
}
The text was updated successfully, but these errors were encountered:
Environment
macOS 10.12.3 (16D32),
Swift 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1),
Xcode 8.2.1 (8C1002)
Additional Detail from JIRA
md5: 7c8e8fccab79d40e32bc5bb1aed3238d
is duplicated by:
Issue Description:
When typing the following code into the Swift REPL (in a Terminal), the Swift REPL goes into an infinite loop trying to print the structural description of a created value:
In another case, I have noticed, that some fields in the description may be missing or wrong:
Some outputs for the last line of the second example are:
or
The text was updated successfully, but these errors were encountered: