Skip to content

Commit

Permalink
fixed #610
Browse files Browse the repository at this point in the history
  • Loading branch information
thqby committed Oct 8, 2024
1 parent 9715f97 commit 24db99b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/src/Lexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6907,7 +6907,9 @@ export function decltype_expr(lex: Lexer, tk: Token, end_pos: number | Position,
syms = new Set;
const node = r.node;
if (node.kind === SymbolKind.Variable) {
for (const n of decltype_var(node, lex, pos, r.scope, _this))
if (r.uri !== lex.uri)
pos.line = NaN;
for (const n of decltype_var(node, lexers[r.uri] ?? lex, pos, r.scope, _this))
syms.add(n);
} else if (syms.add(node), r.is_this !== undefined) {
that = _this ?? node as ClassNode;
Expand Down Expand Up @@ -7470,7 +7472,7 @@ export function decltype_returns(sym: AhkSymbol, lex: Lexer, _this?: ClassNode):
}

let tps: AhkSymbol[];
if (sym.returns) {
if (sym.returns && sym.uri === lex.uri) {
sym.cached_types = [ANY], tps = [];
for (let i = 0, r = sym.returns, l = r.length; i < l; i += 2)
tps.push(...decltype_expr(lex, lex.find_token(r[i], true), r[i + 1], _this));
Expand Down

0 comments on commit 24db99b

Please sign in to comment.