Invalid undefined value warnings

Bug #721809 reported by Nikos Mouchtaris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vitamin
New
Low
Nikos Mouchtaris

Bug Description

Btw, reminder για τα λάθος "undefined value used" warnings:

// ---
// a lambda "returning" "undefined"
p = lambda (...) { std::print(..., "\n") };
p(9);

// ---
// "undefined" itself... (this libfunc should be removed, as i've said before)
std::undefined()

// ---
// for some reason I don't understand...
function f {
 std::print(); // "returns" undefiend
 return []; // returns object
}
f(); // using "undefined" value error

Όπως είπα και σε προηγούμενο mail, το "reading" του undefined πιστεύω
πρέπει να είναι runtime error. Το concept του "undefinition
propagation" είναι λίγο περίεργο.

Επίσης, το concept του "undefining" είναι αμφιβόλου χρησιμότητας (δεν
καλύπτονται τα πάντα από το nullification?). Είναι σίγουρα όμως λάθος
τακτική το "undefinition" μέσω "assignment" (x = std::undefined()). Θα
ήταν προτιμότερο να υπάρχει ένα libfunc std::undefine(var), το οποίο
να κάνει undefine μία variable.

Revision history for this message
Nikos Mouchtaris (isidev) wrote :

Third case solved.

This should become a regression test.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.