Delphi Error – W1074 Unknown Custom Attribute

Delphi Compiler Error

W1074 Unknown Custom Attribute

Reason for the Error & Solution

This message indicates that the class used for this attribute was not found.

Note: When this warning is set to False, the Unsupported language warning is generated.

Example

type
  [ThisIsAFakeAttribute('Hello', 10)] // This generates 'the "Warning: W1074 Unknown custom attribute"
  TTestClass = class
  end;
 
{$WARN UNKNOWN_CUSTOM_ATTRIBUTE OFF}  // Here we disable the generation of W1074
 
  [ThisIsAFakeAttribute('Hello', 10)] // Now, this generates the "Warning: W1025 Unsupported language feature: 'custom attribute'"
  TTestClass2 = class
  end;

See Also

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Delphi Compiler Error X2421 Imported identifier ‘%s’ conflicts with ‘%s’ in ‘%s’ Reason for the Error & Solution This occurs...
Delphi Compiler Error X2367 Case of property accessor method %s.%s should be %s.%s Reason for the Error & Solution No...
Delphi Compiler Error X2269 Overriding virtual method ‘%s.%s’ has lower visibility (%s) than base class ‘%s’ (%s) Reason for the...