diff --git a/mypyc/irbuild/classdef.py b/mypyc/irbuild/classdef.py
index 5c478a012c50e..12b8bba894541 100644
--- a/mypyc/irbuild/classdef.py
+++ b/mypyc/irbuild/classdef.py
@@ -219,7 +219,11 @@ def populate_non_ext_bases(builder: IRBuilder, cdef: ClassDef) -> Value:
for cls in cdef.info.mro[1:]:
if cls.fullname == 'builtins.object':
continue
- if is_named_tuple and cls.fullname in ('typing.Sequence', 'typing.Iterable'):
+ if is_named_tuple and cls.fullname in ('typing.Sequence',
+ 'typing.Iterable',
+ 'typing.Collection',
+ 'typing.Reversible',
+ 'typing.Container'):
# HAX: Synthesized base classes added by mypy don't exist at runtime, so skip them.
# This could break if they were added explicitly, though...
continue
diff --git a/mypyc/test-data/commandline.test b/mypyc/test-data/commandline.test
index 6d2d1539aeadf..0485a90fe66c9 100644
--- a/mypyc/test-data/commandline.test
+++ b/mypyc/test-data/commandline.test
@@ -24,6 +24,7 @@ for x in [a, b, p, p.q]:
import b
import c
from p import s
+from typing import NamedTuple
print('', ord('A') == 65) # Test full builtins
@@ -42,6 +43,11 @@ print('', f(5).x)
print('', c.foo())
assert s.bar(10) == 20
+class NT(NamedTuple):
+ x: int
+
+print(NT(2))
+
[file b.py]
import a
import p.q
@@ -79,6 +85,7 @@ def bar(x: int) -> int:
True
5
10
+NT(x=2)
16
-- This test is here so we can turn it on when we get nervous about