X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=examples%2FMarkus%2Fpolymorphic_value_shouldfail.spl;h=99c5a3678083c42dc3b54d05c006dfbc72f1814b;hb=39f7799760a30737f57fb2b8ccdb15074ee9ac45;hp=0b868ee0bb877dce1d473dbf8771ff2e8d4017ef;hpb=72fb877d00efbba5cc4540ee2e76fbb01c6f572d;p=cc1516.git diff --git a/examples/Markus/polymorphic_value_shouldfail.spl b/examples/Markus/polymorphic_value_shouldfail.spl index 0b868ee..99c5a36 100644 --- a/examples/Markus/polymorphic_value_shouldfail.spl +++ b/examples/Markus/polymorphic_value_shouldfail.spl @@ -3,12 +3,13 @@ // The empty list [] usually has polymorphic type forall a.[a], but you // cannot give the variable l this type. See below what can go wrong. -var l = []; f() { + var l = []; // If l has polymorphic type forall a . [a], the next two lines are possible. l = 1:l; l = True:l; return; } +main() {return;} \ No newline at end of file