diff --git a/vyper/signatures/function_signature.py b/vyper/signatures/function_signature.py index 8462aa75f8..47a35af722 100644 --- a/vyper/signatures/function_signature.py +++ b/vyper/signatures/function_signature.py @@ -168,7 +168,8 @@ def from_definition(cls, # Validate default values. for default_value in getattr(code.args, 'defaults', []): - if not isinstance(default_value, (ast.Num, ast.Str, ast.Bytes, ast.List)): + allowed_types = (ast.Num, ast.Str, ast.Bytes, ast.List, ast.NameConstant) + if not isinstance(default_value, allowed_types): raise FunctionDeclarationException("Default parameter values have to be literals.") # Determine the arguments, expects something of the form def foo(arg1: