dzb2k9
dzb2k9

Reputation: 43

Delphi2010 Compiler error: F2084 Internal Error: L1737

When I compile our project use Delphi 2010 Trial, there has a fatal error :

[DCC Fatal Error] F2084 Internal Error: L1737

Seem's a internal error. No hint at all.

Is this a compiler bug or trial limit?

Upvotes: 3

Views: 5707

Answers (9)

dzb2k9
dzb2k9

Reputation: 43

Finally, I found the problem.

We used one SmartPtr pattern introduced from Barry Kelly's blog, D2010's compiler consider that is invalid. and the smartptr words fine with D2009.

Thanks a lot.

By the way , I post my smartptr here :) and our region still no D2010 for selling :(

I dont know what changed in D2010 compilers's implementation.

type

  TSmartPtr<T: class> = class(TInterfacedObject, TFunc<T>)
  private
    FValue: T;
  public
    constructor Create(AValue: T);
    destructor Destroy; override;
    function Invoke: T;
  end;

  TSmartPtrArray<T: class> = array of TFunc<T>;


implementation

{ TObjectHandle }

constructor TSmartPtr<T>.Create(AValue: T);
begin
  FValue := AValue;
end;

destructor TSmartPtr<T>.Destroy;
begin
  if Assigned(FValue) then
    FValue.Free;
end;

function TSmartPtr<T>.Invoke: T;
begin
  Result := FValue;
end;

Upvotes: 1

Tony
Tony

Reputation: 71

It means your code is too complex - Any file over a certain threshold in size (10k lines or so) starts to exhibit these problems - the other one is the 'was compiled with a different version of x' errors.

Although it's commonly said to keep related code in the same unit in delphi, it really doesn't scale so ignore that and break down as much as possible.

Upvotes: 0

geskill
geskill

Reputation: 307

Same error here. i removed this before:

interface

type
  TBoolFunction = reference to function: Boolean;

I had to move other local "reference to..." constructs from another unit to the interface deceleration to fix it.

Upvotes: 1

Teo
Teo

Reputation: 11

I had the same problem because of generics Dictionary type declaration in the procedure (as Atle mentioned). After moving that type declaration to the top of implementation part of unit - L1737 error disappeared.

Upvotes: 1

Francesca
Francesca

Reputation: 21640

Make sure your paths are not mangled with those of older versions.
Make sure you delete all the DCUs used in your project, included 3rd party components (unless you have some component without the source, in that case double check you have the latest DCUs for D2010) then do a build all to regenerate all those.
Then try to cut your application in smaller parts and see what part is causing the problem: the goal is to have the simplest possible application that triggers the error, to be able to send it to Embarcadero with a reasonable chance for them to find the problem...

Upvotes: 1

Mason Wheeler
Mason Wheeler

Reputation: 84550

Things have really improved since Delphi 2009, but there are still a few Generics-related glitches in the compiler that can cause errors like this. Check if you're trying to declare generic classes or methods and then use them under unusual circumstances. If so, try and distill it down to a small, reproducible test case and report it to QC.

Upvotes: 1

curious slab
curious slab

Reputation: 1160

I think you're using same library paths with your older delphi versions, therefore using incompatible DCUs.

Upvotes: 0

jpfollenius
jpfollenius

Reputation: 16612

I can't give you a definite answer. Have a look at

Internal Compiler Errors

What file does the compiler complain about? Any ideas what COULD be the problem? Any new features used that could still be buggy?

EDIT: and I think we can forget about the trial limit...that would be a very odd way to indicate the end of the trial period.

Upvotes: 4

Mihai Limbășan
Mihai Limbășan

Reputation: 67576

No idea as such, but that's definitely a linker error (the code starts with L) and most of these, in turn, are related to function or operator overloading. Those can arise from compiler bugs too, though - for example, in some older Delphi versions (D5 for sure, I think it was fixed in D7) you would get a linker error when using overloaded constructors that took optional parameters.

Upvotes: 0

Related Questions