summaryrefslogtreecommitdiff
path: root/source/slang/check.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2018-01-03 18:09:35 -0800
committerGitHub <noreply@github.com>2018-01-03 18:09:35 -0800
commite90dfcfd6a0a6d92688012b1216c46c24965cfc0 (patch)
tree89b1e0e3f0e95ea0bf586bd67fa36066f0021ce7 /source/slang/check.cpp
parent5da16a6360e40b9fd4d2275a5ef5b1af740c4abb (diff)
parent550405d2de2ca617046e73fe5ec7e5e1765a5c97 (diff)
Merge pull request #349 from csyonghe/master
Add API for querying TypeLayout from a Type
Diffstat (limited to 'source/slang/check.cpp')
-rw-r--r--source/slang/check.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp
index bc5d144b0..46ed9da15 100644
--- a/source/slang/check.cpp
+++ b/source/slang/check.cpp
@@ -5348,6 +5348,8 @@ namespace Slang
DeclRef<GenericDecl> genericDeclRef,
OverloadResolveContext& context)
{
+ EnsureDecl(genericDeclRef.getDecl());
+
ConstraintSystem constraints;
constraints.genericDecl = genericDeclRef.getDecl();
@@ -6775,7 +6777,8 @@ namespace Slang
// Lookup generic parameter types in global scope
for (auto name : entryPoint->genericParameterTypeNames)
{
- if (!translationUnitSyntax->memberDictionary.TryGetValue(name, firstDeclWithName))
+ firstDeclWithName = entryPoint->compileRequest->lookupGlobalDecl(name);
+ if (!firstDeclWithName)
{
// If there doesn't appear to be any such declaration, then
// we need to diagnose it as an error, and then bail out.