JackTrapper / dwscript

Automatically exported from code.google.com/p/dwscript
0 stars 0 forks source link

"not [integer] in" raises an internal compiler exception #461

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
var i: integer;
i := 5;
var list: array of integer;
if not i in list then
  doSomething;

Obviously this should be "if not (i in list)" or "if i not in list", but this 
mistake, as written, causes an AS cast in TdwsCompiler.ReadExprIn to fail, 
raising an internal compiler error rather than a syntax error.

Original issue reported on code.google.com by masonwhe...@gmail.com on 5 Apr 2014 at 4:42

GoogleCodeExporter commented 9 years ago
Fixed. That cast wasn't even necessary.

Original comment by zar...@gmail.com on 7 Apr 2014 at 7:11