diff options
author | Patrik Nyblom <[email protected]> | 2010-06-02 12:00:05 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-06-02 16:47:29 +0200 |
commit | 656e4790551b2211ff51c3ca24adbd07b135327e (patch) | |
tree | a21891dcfbc9fecc52870cf093c51576ac5bb157 | |
parent | 0e4daed8ff441645c94723332c6742944b2cc547 (diff) | |
download | otp-656e4790551b2211ff51c3ca24adbd07b135327e.tar.gz otp-656e4790551b2211ff51c3ca24adbd07b135327e.tar.bz2 otp-656e4790551b2211ff51c3ca24adbd07b135327e.zip |
Autoimport min/2 and max/2
-rw-r--r-- | erts/emulator/test/bif_SUITE.erl | 12 | ||||
-rw-r--r-- | lib/stdlib/src/erl_internal.erl | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/erts/emulator/test/bif_SUITE.erl b/erts/emulator/test/bif_SUITE.erl index cfbc5dfe81..2d00128001 100644 --- a/erts/emulator/test/bif_SUITE.erl +++ b/erts/emulator/test/bif_SUITE.erl @@ -308,6 +308,18 @@ min_max(Config) when is_list(Config) -> ?line 42.0 = erlang:min(42.0, 42), ?line 42.0 = erlang:max(42.0, 42), + %% And now (R14) they are also autoimported! + ?line a = min(id(a), a), + ?line a = min(id(a), b), + ?line a = min(id(b), a), + ?line b = min(id(b), b), + ?line a = max(id(a), a), + ?line b = max(id(a), b), + ?line b = max(id(b), a), + ?line b = max(id(b), b), + + ?line 42.0 = min(42.0, 42), + ?line 42.0 = max(42.0, 42), ok. diff --git a/lib/stdlib/src/erl_internal.erl b/lib/stdlib/src/erl_internal.erl index 6a7c62f101..ed7e011c54 100644 --- a/lib/stdlib/src/erl_internal.erl +++ b/lib/stdlib/src/erl_internal.erl @@ -299,6 +299,8 @@ bif(list_to_pid, 1) -> true; bif(list_to_tuple, 1) -> true; bif(load_module, 2) -> true; bif(make_ref, 0) -> true; +bif(max,2) -> true; +bif(min,2) -> true; bif(module_loaded, 1) -> true; bif(monitor_node, 2) -> true; bif(node, 0) -> true; |