-
Notifications
You must be signed in to change notification settings - Fork 833
Open
Labels
Area-Diagnosticsmistakes and possible improvements to diagnosticsmistakes and possible improvements to diagnosticsFeature ImprovementTheme-Simple-F#A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.
Milestone
Description
The language spec (8.6.3) says that any additional constructor should call another constructor.
It's possible for an additional constructor to call itself (presumably accidentally on the part of the programmer), which results in a stack overflow.
Repro steps
type MyClass(a, b) =
new(a) = MyClass(a)
let x = MyClass(1)
Expected behavior
Compiler should issue a warning or error when a constructor calls itself.
Actual behavior
StackOverflowException is thrown.
Known workarounds
N/A
Related information
Windows 7, F#4.0, .NET 4.5.2
Severity = low
Metadata
Metadata
Assignees
Labels
Area-Diagnosticsmistakes and possible improvements to diagnosticsmistakes and possible improvements to diagnosticsFeature ImprovementTheme-Simple-F#A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.
Type
Projects
Status
In Progress