Skip to content

Conversation

@davidpiuva
Copy link

This style warning is optional with a compiler flag so that it can exist in both versions of rock.
Missing a few rare style errors might be acceptable to save time but false positives would bloat the output.

@davidpiuva davidpiuva changed the title First prototype for finding implicit this. Finding implicit this. Mar 17, 2016
@davidpiuva davidpiuva force-pushed the explicit branch 3 times, most recently from 32bce76 to f14f8ff Compare March 21, 2016 11:52
@davidpiuva davidpiuva force-pushed the explicit branch 2 times, most recently from 098a7e6 to 2513add Compare March 22, 2016 10:59
name := vDecl isStatic() ? "This" : "this"
call setExpr(VariableAccess new(name, call token))
if (res params explicitThis) {
call token printMessage("Implicit " + name + " detected for call to " + vDecl name + "!")
Copy link
Author

Choose a reason for hiding this comment

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

I guess that this is function calls by pointer from the table since variables are used for access.

@davidpiuva davidpiuva force-pushed the explicit branch 2 times, most recently from e689e32 to be2af46 Compare March 29, 2016 10:21
// add `this` if needed.
call setExpr(VariableAccess new("this", call token))
}
// Not yet tested
Copy link
Author

Choose a reason for hiding this comment

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

I just have to assume that it does not give false detection until someone uses addons while not using implicit this.

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.

3 participants