Created
June 14, 2020 07:44
-
-
Save bsutton/cf6d285f6b0dc34e2db23e9a40ffbd01 to your computer and use it in GitHub Desktop.
non-null use after null check should not generate an error
This file contains 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
class A | |
{ | |
String? get startScriptPath => null; | |
bool addToPath(String path) { | |
if (startScriptPath != null) { | |
if (!exists(startScriptPath)) { | |
print('hi'); | |
} | |
} else { | |
throw UnsupportedError( | |
"The shell oesn't support a start script so we can't configure the path"); | |
} | |
return true; | |
} | |
bool exists(String path) => true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment