mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-17 03:40:05 +02:00
Apply changes from r1482 to D2 frontend too. Completely untested, but ldc2
compiles again.
This commit is contained in:
@@ -87,6 +87,8 @@ FuncDeclaration::FuncDeclaration(Loc loc, Loc endloc, Identifier *id, enum STC s
|
||||
isArrayOp = false;
|
||||
allowInlining = false;
|
||||
|
||||
availableExternally = true; // assume this unless proven otherwise
|
||||
|
||||
// function types in ldc don't merge if the context parameter differs
|
||||
// so we actually don't care about the function declaration, but only
|
||||
// what kind of context parameter it has.
|
||||
@@ -672,6 +674,10 @@ void FuncDeclaration::semantic3(Scope *sc)
|
||||
return;
|
||||
semanticRun = 3;
|
||||
|
||||
// LDC
|
||||
if (!global.params.useAvailableExternally)
|
||||
availableExternally = false;
|
||||
|
||||
if (!type || type->ty != Tfunction)
|
||||
return;
|
||||
f = (TypeFunction *)(type);
|
||||
|
||||
Reference in New Issue
Block a user