diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/check.cpp | 2 | ||||
| -rw-r--r-- | source/slang/diagnostic-defs.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp index 3c7bcaf84..c5ebf7f30 100644 --- a/source/slang/check.cpp +++ b/source/slang/check.cpp @@ -888,7 +888,7 @@ namespace Slang { if (diagSink) { - diagSink->diagnose(typeExp.exp.Ptr(), Diagnostics::unimplemented, "can't fill in default for generic type parameter"); + diagSink->diagnose(typeExp.exp.Ptr(), Diagnostics::genericTypeNeedsArgs, typeExp); *outProperType = getSession()->getErrorType(); } return false; diff --git a/source/slang/diagnostic-defs.h b/source/slang/diagnostic-defs.h index 12f9d2169..fd836e946 100644 --- a/source/slang/diagnostic-defs.h +++ b/source/slang/diagnostic-defs.h @@ -239,6 +239,9 @@ DIAGNOSTIC(30301, Error, globalGenParamInGlobalScopeOnly, "'__generic_param' can DIAGNOSTIC(39999, Fatal, cyclicReference, "cyclic reference '$0'.") DIAGNOSTIC(39999, Fatal, localVariableUsedBeforeDeclared, "local variable '$0' is being used before its declaration.") +// 304xx: generics +DIAGNOSTIC(30400, Error, genericTypeNeedsArgs, "generic type '$0' used without argument") + DIAGNOSTIC(39999, Error, expectedIntegerConstantWrongType, "expected integer constant (found: '$0')") DIAGNOSTIC(39999, Error, expectedIntegerConstantNotConstant, "expression does not evaluate to a compile-time constant") DIAGNOSTIC(39999, Error, expectedIntegerConstantNotLiteral, "could not extract value from integer constant") |
