Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi Prism/Compiler    [ Add a report in this area ]  
Report #:  96080   Status: Open
compiler sometimes unable to find extern public classes
Project:  Embarcadero Prism Build #:  .873
Version:    2010.1 Submitted By:   Andreas Flucke
Report Type:  Basic functionality failure Date Reported:  7/12/2011 12:39:58 AM
Severity:    Serious / Highly visible problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   284714
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

Sometimes (apparently when the namespace name is part of the classname) the compiler cannot find/misinterprets a reference to this class with

CallTestClass.pas (11,19): Fehler (E28): Unknown type "TestClass.TestClass"

or followup errors like

CallTestClass.pas (26,13): Fehler (E43): No static member "TestClass" on type "TestClass.TestClass"

(See Steps for Details)


BTW: I've added a testcase to #94183 some time ago, but cannot change status.
Steps to Reproduce:
The following is defining a simple stub assembly with 2 public classes in it:
-------------------------------------------------------------------------------------------------------------------

namespace TestClass;

interface

type
  TestClass=public class
  end;
  
  TestClass2=public class
  end;

implementation

end.


-----------------------------------------------------------------------------------------------
This is the calling assembly which gives the errors described
-----------------------------------------------------------------------------------------------

namespace CallTestClass;

interface

uses
  TestClass;
  
type
  Program = assembly static class
  private
    TC :TestClass.TestClass;
    TC2:TestClass.TestClass2;
  public
    class method Main(args:array of string);
  end;

implementation

uses
  TestClass;
  
class method Program.Main(args:array of string);
var TC_1:TestClass;
    TC2_1:TestClass2;
begin
TC_1 :=new TestClass.TestClass;
TC2_1:=new TestClass.TestClass2;
end;

end.
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01