|
Scala example source code file (unchecked.scala)
The Scala unchecked.scala source code/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/____/_/ | | ** ** |/ ** \* */ package scala /** <p> * An annotation that gets applied to a selector in a match expression. * If it is present, exhaustiveness warnings for that expression will be * suppressed. * </p> * <p> * For example, compiling the code: * </p>* <b>object test extends Application { * <b>def f(x: Option[int]) = x match { * <b>case Some(y) => y * } * f(None) * }</pre> * <p> * will display the following warning: * </p>* test.scala:2: warning: does not cover case {object None} * def f(x: Option[int]) = x match { * ^ * one warning found</pre> * <p> * The above message may be suppressed by substituting the expression * <code>x with |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.