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
classRecordStructTests{recordstructS1(intValue);recordstructS2{publicintValue;publicS2(intvalue){Value=value;}publicS2(inta,intb){Value=a+b;}}recordstructS3{publicintValue;publicS3(intvalue){Value=value;}}// This also generates a hidden backing fieldrecordstructS4(intvalue){publicintValue=value;}}
Erroneous output
internalclassRecordStructTests{privaterecordstructS1(intValue);privaterecordstructS2(intvalue)// This primary constructor should not be here{publicintValue;publicS2(intvalue){Value=value;}publicS2(inta,intb){Value=a+b;}}privaterecordstructS3(intvalue)// This primary constructor should not be here{publicintValue=value;// Missing constructor}privaterecordstructS4(intvalue)// This primary constructor is expected{publicintValue=value;}}
This one was tricky to find because the compiler/language behavior is not intuitive.
Input code
Erroneous output
This one was tricky to find because the compiler/language behavior is not intuitive.
Details
The text was updated successfully, but these errors were encountered: