Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.

Public Report
Report From: Delphi Prism/Compiler    [ Add a report in this area ]  
Report #:  98839   Status: Open
Using dynamic viewbag more than once causes internal compiler error
Project:  Embarcadero Prism Build #:  5.0.28.905
Version:    2010.1 Submitted By:   John Moshakis
Report Type:  Basic functionality failure Date Reported:  9/12/2011 9:46:42 PM
Severity:    Critical / Show Stopper Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   287607
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
Description
In the suppled project there is AccountController.pas

ViewBag.PasswordLength is referenced more than once, the second reference seems to cause the compiler error.
Steps to Reproduce:
1) Open the suppled example and build

expeced:

It should compile without errors

actual:

Error
1
(E0) Internal error: System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at k.q.A(P A)
   at k.q.A(P A, M a, M B, String b, R C, IList`1 c, g D)
   at F.O.o.VisitIdentifierExpression(y A)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitExpression(M element)
   at F.O.o.VisitExpression(M A)
   at F.O.o.VisitAssignmentStatement(b A)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitStatement(X element)
   at F.O.o.VisitStatement(X A)
   at F.O.o.VisitBeginStatement(z A)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitStatement(X element)
   at F.O.o.VisitStatement(X A)
   at F.O.o.VisitMethodImplementation(F A)
   at RemObjects.Oxygene.Code.BaseVisitor.Visit(u element)
   at F.O.o.Visit(u A)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitImplementation(Q element)
   at F.O.o.VisitImplementation(Q A)
   at RemObjects.Oxygene.Code.BaseVisitor.VisitFile(O element)
   at F.O.o.VisitFile(O A)
   at F.O.R()
   at F.O.G()

0
0
ConsoleApplication7
Workarounds
None
Attachment
ConsoleApplication7.zip
Comments

None

Server Response from: ETNACODE01