Skip to content

Commit 8869590

Browse files
1.0.0-alpha.47 (#156)
2 parents d6cca00 + 980fdf9 commit 8869590

File tree

4 files changed

+32
-47
lines changed

4 files changed

+32
-47
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77

88

9+
## [1.0.0-alpha.47](https://github.com/rokucommunity/bslint/compare/1.0.0-alpha.46...v1.0.0-alpha.47) - 2025-06-03
10+
### Changed
11+
- upgrade to [brighterscript@1.0.0-alpha.47](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#100-alpha47---2025-05-22). Notable changes since 1.0.0-alpha.46:
12+
- Type Tracking within a Function ([#1468](https://github.com/rokucommunity/bslint/pull/1468))
13+
- Better Support for Union of Functions and CallFuncs ([#1485](https://github.com/rokucommunity/bslint/pull/1485))
14+
- Better diagnostic null location handling ([#1491](https://github.com/rokucommunity/bslint/pull/1491))
15+
- bsc1 cli binary ([#1492](https://github.com/rokucommunity/bslint/pull/1492))
16+
- Merge branch 'master' of https://github.com/rokucommunity/brighterscript into v1 ([31e93246](https://github.com/rokucommunity/bslint/commit/31e93246))
17+
18+
19+
920
## [1.0.0-alpha.46](https://github.com/rokucommunity/bslint/compare/1.0.0-alpha.45...v1.0.0-alpha.46) - 2025-04-24
1021
### Changed
1122
- upgrade to [brighterscript@1.0.0-alpha.46](https://github.com/rokucommunity/brighterscript/blob/release-1.0.0/CHANGELOG.md#100-alpha46---2025-04-24). Notable changes since 1.0.0-alpha.45:

package-lock.json

Lines changed: 15 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rokucommunity/bslint",
3-
"version": "1.0.0-alpha.46",
3+
"version": "1.0.0-alpha.47",
44
"description": "BrighterScript linter plugin",
55
"main": "dist/index.js",
66
"bin": {
@@ -35,7 +35,7 @@
3535
"url": "https://github.com/rokucommunity/bslint.git"
3636
},
3737
"dependencies": {
38-
"brighterscript": "^1.0.0-alpha.46",
38+
"brighterscript": "^1.0.0-alpha.47",
3939
"coveralls-next": "^4.2.0",
4040
"fs-extra": "^10.0.0",
4141
"jsonc-parser": "^2.3.0",

src/plugins/codeStyle/index.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -533,25 +533,15 @@ export default class CodeStyle implements Plugin {
533533
if (!functionExpression) {
534534
return;
535535
}
536-
const bodyTable = functionExpression.body?.getSymbolTable();
537536
const rhsType = assignStmt.value?.getType({ flags: SymbolTypeFlag.runtime });
538537
if (!rhsType.isResolvable()) {
539538
return;
540539
}
541540
const varName = assignStmt.tokens.name.text;
542-
let previousType = functionExpression.getSymbolTable().getSymbolType(varName, { flags: SymbolTypeFlag.runtime });
543-
544-
if (!previousType) {
545-
// check for last previous assignment
546-
const symbols = bodyTable.getSymbol(varName, SymbolTypeFlag.runtime) ?? [];
547-
for (const symbol of symbols) {
548-
if (util.comparePosition(symbol.data?.definingNode?.location?.range?.start, assignStmt.location.range.start) < 0) {
549-
previousType = symbol.type;
550-
} else {
551-
break;
552-
}
553-
}
554-
}
541+
const previousType = assignStmt.getSymbolTable().getSymbolType(varName, {
542+
flags: SymbolTypeFlag.runtime,
543+
statementIndex: assignStmt.statementIndex
544+
});
555545

556546
if (previousType?.isResolvable()) {
557547
// is this different?

0 commit comments

Comments
 (0)