diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-06-28 11:26:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-28 11:26:02 -0700 |
| commit | b8e31688c6826475b5199468aedea0bc44c0adc1 (patch) | |
| tree | 79b9227ef038d173d780a440035e616dc31104bb /source/slang/check.cpp | |
| parent | afe41a6c994a684cd646b4432a285ef959d0716b (diff) | |
| parent | d601921b71ed44835e8d4fa6f13ff7aefcf7649d (diff) | |
Merge pull request #48 from tfoleyNV/literal-suffix-fix
Fix handling of literal suffixes
Diffstat (limited to 'source/slang/check.cpp')
| -rw-r--r-- | source/slang/check.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp index 11efb2f7d..dfa726150 100644 --- a/source/slang/check.cpp +++ b/source/slang/check.cpp @@ -1887,6 +1887,10 @@ namespace Slang } virtual RefPtr<ExpressionSyntaxNode> VisitConstantExpression(ConstantExpressionSyntaxNode *expr) override { + // The expression might already have a type, determined by its suffix + if(expr->Type.type) + return expr; + switch (expr->ConstType) { case ConstantExpressionSyntaxNode::ConstantType::Int: |
