From 700c024e1366b3478934237e27ead75009ac0c41 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 29 Dec 2016 19:32:43 +0100 Subject: [PATCH] fixes #5148 --- compiler/semexprs.nim | 2 +- tests/enum/tenumalias.nim | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/enum/tenumalias.nim diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 45d973d860..54a3013221 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -903,7 +903,7 @@ proc makeDeref(n: PNode): PNode = const tyTypeParamsHolders = {tyGenericInst, tyCompositeTypeClass} - tyDotOpTransparent = {tyVar, tyPtr, tyRef} + tyDotOpTransparent = {tyVar, tyPtr, tyRef, tyAlias} proc readTypeParameter(c: PContext, typ: PType, paramName: PIdent, info: TLineInfo): PNode = diff --git a/tests/enum/tenumalias.nim b/tests/enum/tenumalias.nim new file mode 100644 index 0000000000..2d1f70d0e8 --- /dev/null +++ b/tests/enum/tenumalias.nim @@ -0,0 +1,7 @@ +# bug #5148 + +type + A = enum foo, bar + B = A + +echo B.foo