Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi-BCB/RTL/Delphi    [ Add a report in this area ]  
Report #:  103729   Status: Closed
TBytes has no type info
Project:  Delphi Build #:  XE, XE2
Version:    16.3 Submitted By:   Márton Balassa
Report Type:  Basic functionality failure Date Reported:  2/27/2012 9:37:42 AM
Severity:    Serious / Highly visible problem Last Updated: 9/5/2012 7:58:07 PM
Platform:    All platforms Internal Tracking #:   28318
Resolution: Fixed (Resolution Comments) Resolved in Build: : 17.0.4625.53395
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
The TBytes type (declared nowhere but interpreted as TArray<Byte>) has no type information. When compiling an interface declaration that has a TBytes parameter or function result, compilation fails with compile error: E2134 Type '{System}TArray<System.Byte>' has no type info.
Steps to Reproduce:
(1) Declare the following interface:

IFail = interface(IInvokable)
  procedure P(Param: TBytes);

(2) Compile and fail.
You can replace TBytes with TArray<Byte> in interface declarations. Fortunately, these two types are compatible (identical?), so passing a TBytes value to a TArray<Byte> parameter will work.

Dmitry Ukolov at 2/27/2012 9:23:49 PM -
You can use TByteDynArray instead of TBytes.

Márton Balassa at 2/28/2012 2:52:40 AM -
No, TByteDynArray is not identical to TBytes. Try this:

  Foo: TByteDynArray;
  Bar: TArray<Byte>;
  S: TBytesStream;
  S := TBytesStream.Create(Foo); // compile error
  S := TBytesStream.Create(Bar); // success

Tomohiro Takahashi at 5/18/2012 9:38:36 PM -
This report was opened with valid Internal Tracking Number.

Server Response from: ETNACODE01