Skip to content

warn on function ref without invokation as statement#11386

Open
jwunderl wants to merge 5 commits into
masterfrom
dev/jwunderl/warnins
Open

warn on function ref without invokation as statement#11386
jwunderl wants to merge 5 commits into
masterfrom
dev/jwunderl/warnins

Conversation

@jwunderl

@jwunderl jwunderl commented Jun 9, 2026

Copy link
Copy Markdown
Member

fix microsoft/pxt-microbit#6912

not compile / simulator blocking, just renders as a warning

image

Gated the errors behind a compile flag that's only set on typecheck, since i know there are plenty of places like embed scenarios that check diags and may handle it as a proper error otherwise. Feels like there should be some other simple things we can use same flag for adding "probably wrong" warnings on. If it's anything mildly ambiguous would probably have to add an 'ignore' option with a button to fix (add tsignore like comment?) though

@jwunderl jwunderl requested review from a team and riknoll June 9, 2026 23:26

@srietkerk srietkerk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just some questions about the type of equality checks being done. Otherwise looks good.

Comment thread pxtcompiler/emitter/emitter.ts Outdated
Comment thread webapp/src/monaco.tsx Outdated
Comment thread webapp/src/monaco.tsx Outdated
jwunderl and others added 3 commits June 10, 2026 13:14
Co-authored-by: Sarah Rietkerk <49178322+srietkerk@users.noreply.github.com>
Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>
@jwunderl

Copy link
Copy Markdown
Member Author

went ahead and did the 'ignore' button and ts-ignore handling
image

test build https://makecode.microbit.org/app/8d6bd6844490945b12c1e4784e9addeba1f374db-2711a50ff9#pub:_iKu4WcEYaazT

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.

Calling a function without () is allowed but does nothing

2 participants