Repository: vyperlang/vyper

Issue:
MAX[MIN]_INT128 makes error in range check
### Version Information

* vyper Version: [the latest](https://github.com/ethereum/vyper/commit/97ed5fec89947d41fd91f5190c4478ffcadbb9fb) and 0.1.0b4

### What's your issue about?

I got `TypeError` in compiling these sentences.
```
a: int128 = MAX_INT128
```
```
b: int128 = MIN_INT128
```
```
  File "/Users/ryuya.nakamura/.pyenv/versions/vyper/lib/python3.6/site-packages/vyper-0.1.0b4-py3.6.egg/vyper/utils.py", line 109, in in_bounds
    return cls.MINNUM <= value <= cls.MAXNUM
TypeError: '<=' not supported between instances of 'int' and 'str'
```

#### Cute Animal Picture

![image](https://user-images.githubusercontent.com/22876645/49566801-3cb54980-f96f-11e8-864c-40e2b07b9dab.png)



Discussion:
Pushing a PR that fixes this v-soon.

Resolving patch:
diff --git a/vyper/parser/expr.py b/vyper/parser/expr.py
--- a/vyper/parser/expr.py
+++ b/vyper/parser/expr.py
@@ -152,13 +152,41 @@ def constants(self):
     # Variable names
     def variables(self):
         builtin_constants = {
-            'EMPTY_BYTES32': LLLnode.from_list([0], typ=BaseType('bytes32', None, is_literal=True), pos=getpos(self.expr)),
-            'ZERO_ADDRESS': LLLnode.from_list([0], typ=BaseType('address', None, is_literal=True), pos=getpos(self.expr)),
-            'MAX_INT128': LLLnode.from_list(['mload', MemoryPositions.MAXNUM], typ=BaseType('int128', None, is_literal=True), pos=getpos(self.expr)),
-            'MIN_INT128': LLLnode.from_list(['mload', MemoryPositions.MINNUM], typ=BaseType('int128', None, is_literal=True), pos=getpos(self.expr)),
-            'MAX_DECIMAL': LLLnode.from_list(['mload', MemoryPositions.MAXDECIMAL], typ=BaseType('decimal', None, is_literal=True), pos=getpos(self.expr)),
-            'MIN_DECIMAL': LLLnode.from_list(['mload', MemoryPositions.MINDECIMAL], typ=BaseType('decimal', None, is_literal=True), pos=getpos(self.expr)),
-            'MAX_UINT256': LLLnode.from_list([2**256 - 1], typ=BaseType('uint256', None, is_literal=True), pos=getpos(self.expr)),
+            'EMPTY_BYTES32': LLLnode.from_list(
+                [0],
+                typ=BaseType('bytes32', None, is_literal=True),
+                pos=getpos(self.expr)
+            ),
+            'ZERO_ADDRESS': LLLnode.from_list(
+                [0],
+                typ=BaseType('address', None, is_literal=True),
+                pos=getpos(self.expr)
+            ),
+            'MAX_INT128': LLLnode.from_list(
+                [SizeLimits.MAXNUM],
+                typ=BaseType('int128', None, is_literal=True),
+                pos=getpos(self.expr)
+            ),
+            'MIN_INT128': LLLnode.from_list(
+                [SizeLimits.MINNUM],
+                typ=BaseType('int128', None, is_literal=True),
+                pos=getpos(self.expr)
+            ),
+            'MAX_DECIMAL': LLLnode.from_list(
+                [SizeLimits.MAXDECIMAL],
+                typ=BaseType('decimal', None, is_literal=True),
+                pos=getpos(self.expr)
+            ),
+            'MIN_DECIMAL': LLLnode.from_list(
+                [SizeLimits.MINDECIMAL],
+                typ=BaseType('decimal', None, is_literal=True),
+                pos=getpos(self.expr)
+            ),
+            'MAX_UINT256': LLLnode.from_list(
+                [SizeLimits.MAX_UINT256],
+                typ=BaseType('uint256', None, is_literal=True),
+                pos=getpos(self.expr)
+            ),
         }
 
         if self.expr.id == 'self':


Test patch:
diff --git a/tests/parser/types/numbers/test_constants.py b/tests/parser/types/numbers/test_constants.py
--- a/tests/parser/types/numbers/test_constants.py
+++ b/tests/parser/types/numbers/test_constants.py
@@ -54,6 +54,59 @@ def test_arithmetic(a: int128) -> int128:
     assert c.test_arithmetic(5000) == 2**127 - 1 - 5000
 
 
+def test_builtin_constants_assignment(get_contract_with_gas_estimation):
+    code = """
+@public
+def foo() -> int128:
+    bar: int128 = MAX_INT128
+    return bar
+
+@public
+def goo() -> int128:
+    bar: int128 = MIN_INT128
+    return bar
+
+@public
+def hoo() -> bytes32:
+    bar: bytes32 = EMPTY_BYTES32
+    return bar
+
+@public
+def joo() -> address:
+    bar: address = ZERO_ADDRESS
+    return bar
+
+@public
+def koo() -> decimal:
+    bar: decimal = MAX_DECIMAL
+    return bar
+
+@public
+def loo() -> decimal:
+    bar: decimal = MIN_DECIMAL
+    return bar
+
+@public
+def zoo() -> uint256:
+    bar: uint256 = MAX_UINT256
+    return bar
+    """
+
+    c = get_contract_with_gas_estimation(code)
+
+    assert c.foo() == 2**127 - 1
+    assert c.goo() == -2**127
+
+    assert c.hoo() == b"\x00" * 32
+
+    assert c.joo() is None
+
+    assert c.koo() == Decimal(2**127 - 1)
+    assert c.loo() == Decimal(-2**127)
+
+    assert c.zoo() == 2**256 - 1
+
+
 def test_reserved_keyword(get_contract, assert_compile_failed):
     code = """
 @public