Open cgranade opened 4 years ago
Describe the bug
When using a code action to add a missing open declaration to a source file that does not yet contain any open statements (including Microsoft.Quantum.Intrinsic), the new open declaration is included at the wrong location.
To Reproduce
Start with the following source file:
namespace Microsoft.Quantum.Arrays { /// # Summary function All<'T> (predicate : ('T -> Bool), array : 'T[]) : Bool { return Fold(And, true, Mapped(predicate, array)); } }
Select the available code action at And to obtain:
And
namespace Microsoft.Quantum.Arrays { /// # Summary open Microsoft.Quantum.Logical; function All<'T> (predicate : ('T -> Bool), array : 'T[]) : Bool { return Fold(And, true, Mapped(predicate, array)); } }
Expected behavior
namespace Microsoft.Quantum.Arrays { open Microsoft.Quantum.Logical; /// # Summary function All<'T> (predicate : ('T -> Bool), array : 'T[]) : Bool { return Fold(And, true, Mapped(predicate, array)); } }
System information
That's a good candidate for a bug bash...
Describe the bug
When using a code action to add a missing open declaration to a source file that does not yet contain any open statements (including Microsoft.Quantum.Intrinsic), the new open declaration is included at the wrong location.
To Reproduce
Start with the following source file:
Select the available code action at
And
to obtain:Expected behavior
System information