Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi Prism/Compiler    [ Add a report in this area ]  
Report #:  98550   Status: Open
Internal error in compiler with nested set types
Project:  Embarcadero Prism Build #:
Version:    2010.1 Submitted By:   Robert Ogren
Report Type:  Basic functionality failure Date Reported:  9/5/2011 5:20:39 AM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   287448
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Code similar to the following, which compiled fine in the Spring 2011 release, does not work in XE2 (Oxygene version


  MyMainClass = class;

  MySomething nested in MyMainClass = public (

  MyUnnestedSomethings = set of MyMainClass.MySomething;

  MyNestedSomethings nested in MyMainClass = set of MyMainClass.MySomething;

  MyMainClass = class
    // This is OK
    theSomething: MySomething;
    // This is OK
    theUnnestedSomethings: MyUnnestedSomethings;
    // This causes internal error
    theNestedSomethings: MyNestedSomethings;

It produces the following error when compiling

(E0) Internal error: System.NullReferenceException: Object reference not set to an instance of an object.
   at H.p.A(c A, String a)
   at F.O.A(n A, c a, String B, h b)
   at F.O.A(n A, q a, String B, String b, h C, Action`2 c)
   at E.P.A(O A, n a)
   at F.O.A(n A, N a)
   at F.O.E.VisitTypeReference(N A)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitVarDefinition(X element)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitVarBlock(s element)
   at RemObjects.Oxygene.Code.BaseVisitor.Visit(u element)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitTypeDefinition(V element)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitTypeReference(N element)
   at F.O.E.VisitTypeReference(N A)
   at F.O.E.VisitTypeName(U A)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitTypeBlock(S element)
   at RemObjects.Oxygene.Code.BaseVisitor.Visit(u element)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitInterface(p element)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitFile(O element)
   at F.O.a(O A)
   at F.O.n()
   at F.O.G()

Steps to Reproduce:
Paste the code above into the interface section of any unit, for example a blank console application. You can also use the attached console project.
Do not nest set types.


Server Response from: ETNACODE01