Created
May 24, 2020 16:22
-
-
Save alfianmalik/92f8f3fa0bfcf41db560617d525727b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package errors | |
// Short variable assignement | |
err := false | |
// Inferred type assignment | |
var message string | |
if err == false { | |
message = nil | |
//Compiler error: cannot use nil as type string in assignment | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment