-
Notifications
You must be signed in to change notification settings - Fork 2
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
FEA-3206: Fix NormalFormalParameters #111
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
@@ -35,6 +35,7 @@ | |||
class Animal with SleepMixin { | |||
// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/more.dart/Animal# | |||
// documentation ```dart | |||
// relationship scip-dart pub dart_test 1.0.0 lib/more.dart/SleepMixin# implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're running relationship indexing on basic-project
now, snapshots were not previously generated due to failing CI that neglected to run on previous PRs
// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/more.dart/Animal#name. | ||
// ^^^^ definition local 0 | ||
// documentation ```dart | ||
// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/more.dart/Animal#type. | ||
// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/more.dart/Animal#<constructor>().(type) | ||
// documentation ```dart | ||
// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/more.dart/Animal#name. | ||
// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/more.dart/Animal#type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few changes here:
-
This is the actual fix that the PR was doing, no longer referring to
this
as the declarationAnimal(this.name, {required this.type}) { // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/more.dart/Animal#name.
becomes
Animal(this.name, {required this.type}) { // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/more.dart/Animal#name.
-
^^^^ definition local 0
onname
was removed -name
is not actually a definition, its simply a reference to the name var on the class -
definition scip-dart pub dart_test 1.0.0 lib/more.dart/Animal#<constructor>().(type)
was removed. Similar toname
, there is not actual "definition" here, its just a reference
@@ -102,6 +99,7 @@ | |||
// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/string.dart/String# | |||
// ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/more.dart/Animal#toString(). | |||
// documentation ```dart | |||
// relationship scip-dart pub dart:core 2.19.0 dart:core/object.dart/Object#toString(). implementation reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String toString
is overriding here, relationship is accurately noting this
@@ -114,17 +112,17 @@ | |||
// documentation ```dart | |||
// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/list.dart/List# | |||
// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/int.dart/int# | |||
// ^^^^^^^ definition local 1 | |||
// ^^^^^^^ definition local 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the local variable changes here are just due to no longer declaring local 0
above, no cause for concern
// ^^^^ reference local 0 | ||
// ^^^^ definition local 1 | ||
// documentation ```dart | ||
// ^^^^ reference local 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were previously always calculating a definition for parameters, even formal ones referring to instance variables, now we aren't, hence the removal of definition local 1
_far
is a private instance variable, so the reference is just a local 0
// definition scip-dart pub dart_test 1.0.0 lib/relationships.dart/ | ||
// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/relationships.dart/Mammal# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file was moved/renamed, these changes are just updating for that difference
QA +1
🚀 @Workiva/release-management-p 🚢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 from RM
FEA-3206
Closes #110
Previously constructor parameters would incorrectly use
this
as the symbol for the reference. This pr addresses that problemThere was another problem where parameters would also, always declare a "definition". Parameters that are referencing an instance variable (
Foo(this.bar)
), are not a definition, just a reference. This pr also fixes that problem by not marking these as definitions