Intellij-Move

1.18.0
August 23, 2022
View in Github

New Features

  • Added support for the specification modules placed in .spec.move files. Now, code like this is correctly highlighted, code navigation and renames are possible (#59)

spec 0x1::main {
    use 0x1::schemas::MySchema;
    
    spec main {
        include MySchema; 
    }
}

  • Check for proper form of unpacking in let expressions

module 0x1::M {
    fun tuple(): (u8, u8) { (1, 1) }
    fun main() {
        let (a, b, c) = tuple();
        //  ^^^^^^^^^ Invalid unpacking. Expected tuple binding of length 2: (_, _) 
    }
} 

  • Added type checking for the right hand side of assigment statements

module 0x1::M {
    fun main() {
        let a = 1;
        a = a + false;
        //      ^^^^^ Invalid argument to '+': expected 'u8', 'u64', 'u128', but found 'bool'
    }
}

Fixes

  • Do not insert <> for a function call completion, if all type parameters are inferrable from the context.
  • Remove "Script" file template.
  • Formatter: fix indentation for if and while conditions.
  • Formatter: fix doc comments indentation.
  • Fix false-positive in "inconsistent address name" inspection.