Skip to content

Objective-C - incompatible pointer type assignment not detected when used with init method #11664

@llvmbot

Description

@llvmbot
Bugzilla Link 11292
Resolution INVALID
Resolved on Nov 08, 2011 13:12
Version unspecified
OS All
Attachments example showing incompatible pointer type assignment not detected when used with init method
Reporter LLVM Bugzilla Contributor
CC @DougGregor,@efriedma-quic

Extended Description

Objective-C - incompatible pointer type assignment not detected when used with init method

When an init method returns a pointer type and when that pointer is assigned to another incompatible pointer variable, the compiler doesn't throw an error / warning

Note - When tested with a method that doesn't have the prefix as "init", compiler manages to detect the error / warning

Actual Behavior

The compiler doesn't throw an error / warning, when pointer type returned by an init method is assigned to an incompatible variable.

Expected Behavior

The compiler should throw an error / warning, when pointer type returned by an init method is assigned to an incompatible variable.

Example (Sample Objective-C program)

Sample program showing incompatible pointer assignment by init method is attached

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillainvalidResolved as invalid, i.e. not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions