Skip to content

Commit

Permalink
Merge pull request dlang#805 from donc/regression7681
Browse files Browse the repository at this point in the history
Fix issue 7681 Regression(2.059head):ICE:opCatAssign(delegate) to undefi...
  • Loading branch information
WalterBright committed Mar 15, 2012
2 parents 46ea6e9 + 5153797 commit bd5f360
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/expression.c
Expand Up @@ -10313,6 +10313,8 @@ Expression *CatAssignExp::semantic(Scope *sc)
}

e1 = e1->modifiableLvalue(sc, e1);
if (e1->op == TOKerror)
return e1;

Type *tb1 = e1->type->toBasetype();
Type *tb1next = tb1->nextOf();
Expand Down
8 changes: 8 additions & 0 deletions test/compilable/compile1.d
Expand Up @@ -101,6 +101,14 @@ int bug6096()
return 1;
}

/**************************************************
7681 Segfault
**************************************************/

static assert( !is(typeof( (){
undefined ~= delegate(){}; return 7;
}())));

/**************************************************
5796
**************************************************/
Expand Down

0 comments on commit bd5f360

Please sign in to comment.