Skip to content

fix Issue 13536 - Union of delegates breaks @safety#5859

Merged
andralex merged 1 commit intodlang:masterfrom
WalterBright:fix13536
Jun 16, 2016
Merged

fix Issue 13536 - Union of delegates breaks @safety#5859
andralex merged 1 commit intodlang:masterfrom
WalterBright:fix13536

Conversation

@WalterBright
Copy link
Member

No description provided.

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
13536 Union of delegates breaks @safety

return new ErrorExp();
}
}
if (checkOverlappedPointer(sc, e1, "field %s.%s cannot be accessed in @safe code because it overlaps with a pointer"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the name of the other field that is considered a pointer to the message? E.g.
"...because it overlaps with U.sysDg which is a pointer. Reinterpreting pointers in not allowed in @safe code." for the test case below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The information of what overlaps what is not collected, only that it does overlap.

*/

bool checkOverlappedPointer(Scope* sc, Expression e, string msg)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pet peeve as per #5852 pliz pliz

@andralex
Copy link
Member

Auto-merge toggled on

@andralex andralex merged commit 82fa43f into dlang:master Jun 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants