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 break
} }
case 9.1: 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 lineContent: string = model.getValueInRange(error)
const words = lineContent.split(' ') const words = lineContent.split(' ')
this.addQuickFix(actions, error, model.uri, { this.addQuickFix(actions, error, model.uri, {

@ -134,14 +134,29 @@ export default {
{ {
id: 9.1, id: 9.1,
title: "Add 'storage' to param", title: "Add 'storage' to param",
message: ' storage ', message: ' storage '
nodeType: 'ElementaryTypeName'
}, },
{ {
id: 9.2, id: 9.2,
title: "Add 'memory' to param", title: "Add 'memory' to param",
message: ' memory ', message: ' memory '
nodeType: 'ElementaryTypeName' }
],
'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