mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Merged DMD commit d19e57c3f0683ac3a0b290f5b73deb86aa1a6441:
5105 Member function template cannot be synchronized Patch by rsinfu
This commit is contained in:
@@ -1482,7 +1482,8 @@ void FuncDeclaration::semantic3(Scope *sc)
|
||||
// wrap body of synchronized functions in a synchronized statement
|
||||
if (isSynchronized())
|
||||
{
|
||||
ClassDeclaration *cd = parent->isClassDeclaration();
|
||||
AggregateDeclaration *ad = isThis();
|
||||
ClassDeclaration *cd = ad ? ad->isClassDeclaration() : NULL;
|
||||
if (!cd)
|
||||
error("synchronized function %s must be a member of a class", toChars());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user