Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New statement namespace bugfix #208

Merged
merged 3 commits into from
Oct 12, 2020
Merged

Conversation

TwitchBronBron
Copy link
Member

Fixes some bugs related to constructing new BrighterScript classes.

Notable changes:

  • fixed bug that wouldn't find the correct root-level class when calling new from within a namespace (fixes new keyword defaults to calling namespace #203)
  • fixed bug that was not adding an omitted namespace to a class whenever that class resides in the same namespace as the new statement.

@@ -35,7 +35,12 @@ export class BsClassValidator {
*/
private getClassByName(className: string, namespaceName?: string) {
let fullName = util.getFulllyQualifiedClassName(className, namespaceName);
return this.classes[fullName.toLowerCase()];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #203

@TwitchBronBron TwitchBronBron merged commit 1a50d0a into master Oct 12, 2020
@TwitchBronBron TwitchBronBron deleted the new-statement-namespace-bugfix branch October 12, 2020 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

new keyword defaults to calling namespace
1 participant