QF to add data location to variable

pull/4039/head^2
aniket-engg 1 year ago committed by Aniket
parent 1124541243
commit 1493b0fff0
  1. 6
      libs/remix-ui/editor/src/lib/providers/codeActionProvider.ts
  2. 23
      libs/remix-ui/editor/src/lib/providers/quickfixes.ts

@ -75,7 +75,11 @@ export class RemixCodeActionProvider implements monaco.languages.CodeActionProvi
break
}
case 9.1:
case 9.2: {
case 9.2:
case 10.1:
case 10.2:
case 10.3: {
console.log('sssss')
const lineContent: string = model.getValueInRange(error)
const words = lineContent.split(' ')
this.addQuickFix(actions, error, model.uri, {

@ -134,14 +134,29 @@ export default {
{
id: 9.1,
title: "Add 'storage' to param",
message: ' storage ',
nodeType: 'ElementaryTypeName'
message: ' storage '
},
{
id: 9.2,
title: "Add 'memory' to param",
message: ' memory ',
nodeType: 'ElementaryTypeName'
message: ' memory '
}
],
'TypeError: Data location must be "storage", "memory" or "calldata" for variable, but none was given.': [
{
id: 10.1,
title: "Add 'storage' to param",
message: ' storage '
},
{
id: 10.2,
title: "Add 'memory' to param",
message: ' memory '
},
{
id: 10.3,
title: "Add 'calldata' to param",
message: ' calldata '
}
]
}

Loading…
Cancel
Save