diff options
Diffstat (limited to 'source/slang/syntax.cpp')
| -rw-r--r-- | source/slang/syntax.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp index 9d29e7d21..5e855de29 100644 --- a/source/slang/syntax.cpp +++ b/source/slang/syntax.cpp @@ -2081,9 +2081,22 @@ void Type::accept(IValVisitor* visitor, void* extra) funcType->setSession(session); funcType->resultType = GetResultType(declRef); - for (auto pp : GetParameters(declRef)) + for (auto paramDeclRef : GetParameters(declRef)) { - funcType->paramTypes.Add(GetType(pp)); + auto paramDecl = paramDeclRef.getDecl(); + auto paramType = GetType(paramDeclRef); + if( paramDecl->FindModifier<OutModifier>() ) + { + if(paramDecl->FindModifier<InOutModifier>() || paramDecl->FindModifier<InModifier>()) + { + paramType = session->getInOutType(paramType); + } + else + { + paramType = session->getOutType(paramType); + } + } + funcType->paramTypes.Add(paramType); } return funcType; |
