Skip to content

Commit

Permalink
Allow struct inheritance to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Sep 27, 2015
1 parent 4121345 commit 3c656f9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeOneDeclaredB

TypeSymbol baseType;

if (i == 0 && TypeKind == TypeKind.Class) // allow class in the first position
if (i == 0 && (TypeKind == TypeKind.Class || TypeKind == TypeKind.Struct)) // allow class in the first position
{
baseType = baseBinder.BindType(typeSyntax, diagnostics, newBasesBeingResolved);

Expand Down Expand Up @@ -440,7 +440,8 @@ private Tuple<NamedTypeSymbol, ImmutableArray<NamedTypeSymbol>> MakeOneDeclaredB
continue;

case TypeKind.Class:
if (TypeKind == TypeKind.Class)
case TypeKind.Struct:
if (TypeKind == TypeKind.Class || TypeKind == TypeKind.Struct)
{
if ((object)localBase == null)
{
Expand Down

0 comments on commit 3c656f9

Please sign in to comment.