mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Include inline comment for IvarTest wrt warning
In this one case, a warning is the expected output and is the only viable way to test the case. See inline comment at top of IvarTest.j for explanation.
This commit is contained in:
@@ -1,5 +1,24 @@
|
|||||||
@import <Foundation/Foundation.j>
|
@import <Foundation/Foundation.j>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NOTE: INTENTIONAL COMPILER WARNINGS
|
||||||
|
*
|
||||||
|
* The shadowing warnings generated by this file (e.g., "Local declaration
|
||||||
|
* of 'ivar1' hides instance variable") are an expected artifact of the test.
|
||||||
|
*
|
||||||
|
* The objective of these methods is to validate the compiler's code generation
|
||||||
|
* during a shadowing event. In standard Objective-J, unqualified instance
|
||||||
|
* variables are transformed into explicit accessors (e.g., self.ivar1). When a
|
||||||
|
* local variable shares the same identifier, the AST transformation must
|
||||||
|
* intentionally suppress this behavior to maintain proper lexical scope.
|
||||||
|
*
|
||||||
|
* Modifying the static Objective-J declarations to avoid the warning would
|
||||||
|
* remove the shadowing condition from the AST, fundamentally invalidating
|
||||||
|
* the runtime verification of the compiler's output. Until explicit block-level
|
||||||
|
* diagnostic suppression is implemented in the parser, these specific warnings
|
||||||
|
* must be tolerated to ensure the structural integrity of the code generator.
|
||||||
|
*/
|
||||||
|
|
||||||
@implementation IvarTestClass : CPObject
|
@implementation IvarTestClass : CPObject
|
||||||
{
|
{
|
||||||
id ivar1 @accessors;
|
id ivar1 @accessors;
|
||||||
|
|||||||
Reference in New Issue
Block a user