From ca96f9cf3b53ef77631173abe9d79bc2cf28e0a6 Mon Sep 17 00:00:00 2001 From: Brian Terlson Date: Thu, 4 Mar 2021 12:29:24 -0800 Subject: [PATCH] It's ok to run decorators on non-templated models --- packages/adl/compiler/checker.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/adl/compiler/checker.ts b/packages/adl/compiler/checker.ts index c229762ea..12a36ba19 100644 --- a/packages/adl/compiler/checker.ts +++ b/packages/adl/compiler/checker.ts @@ -538,8 +538,9 @@ export function createChecker(program: Program) { }; if ( - instantiatingThisTemplate && - templateInstantiation.every((t) => t.kind !== "TemplateParameter") + (instantiatingThisTemplate && + templateInstantiation.every((t) => t.kind !== "TemplateParameter")) || + node.templateParameters.length === 0 ) { createType(type); } @@ -605,9 +606,6 @@ export function createChecker(program: Program) { return type; } - const links = getSymbolLinks(node.symbol!); - links.type = assignmentType; - return assignmentType; }