Skip to content

Avoid inconsistent implicit toString on potential string subtypes#21318

Draft
ginsbach wants to merge 1 commit intomainfrom
ginsbach/fix-tostring-parameterised-modules
Draft

Avoid inconsistent implicit toString on potential string subtypes#21318
ginsbach wants to merge 1 commit intomainfrom
ginsbach/fix-tostring-parameterised-modules

Conversation

@ginsbach
Copy link
Contributor

Fix cases where the compiler cannot prove types don't extend string:

  1. FileSystem.qll: Add toString() to ContainerBase signature. The instantiation sites already provide toString(), so no changes needed there. Container.toString() now delegates to super.toString(). No behaviour change.

  2. DataFlowImplCommon.qll: Content.toString() now delegates to super.toString() instead of returning the literal "Content". This is a behaviour change: Content now displays its actual description (e.g. field names) rather than the generic "Content".

Fix cases where the compiler cannot prove types don't extend string:

1. FileSystem.qll: Add toString() to ContainerBase signature. The
   instantiation sites already provide toString(), so no changes needed
   there. Container.toString() now delegates to super.toString().
   No behaviour change.

2. DataFlowImplCommon.qll: Content.toString() now delegates to
   super.toString() instead of returning the literal "Content".
   This is a behaviour change: Content now displays its actual
   description (e.g. field names) rather than the generic "Content".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant