Mercurial > projects > dang
annotate tests/code/basic_types_1.d @ 211:9e9f3e7e342b default tip
Added dang folder and Module in ast.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Tue, 12 Aug 2008 20:07:35 +0200 |
parents | 6decab6f45c4 |
children |
rev | line source |
---|---|
52
6decab6f45c4
Two new tests that uncovered a bug - we dont to type conversion when calling functions
Anders Halager <halager@gmail.com>
parents:
diff
changeset
|
1 int main() |
6decab6f45c4
Two new tests that uncovered a bug - we dont to type conversion when calling functions
Anders Halager <halager@gmail.com>
parents:
diff
changeset
|
2 { |
6decab6f45c4
Two new tests that uncovered a bug - we dont to type conversion when calling functions
Anders Halager <halager@gmail.com>
parents:
diff
changeset
|
3 // test some basic type conversions |
6decab6f45c4
Two new tests that uncovered a bug - we dont to type conversion when calling functions
Anders Halager <halager@gmail.com>
parents:
diff
changeset
|
4 byte a = 2; |
6decab6f45c4
Two new tests that uncovered a bug - we dont to type conversion when calling functions
Anders Halager <halager@gmail.com>
parents:
diff
changeset
|
5 short b = 3 * a; |
6decab6f45c4
Two new tests that uncovered a bug - we dont to type conversion when calling functions
Anders Halager <halager@gmail.com>
parents:
diff
changeset
|
6 int c = b + a; |
6decab6f45c4
Two new tests that uncovered a bug - we dont to type conversion when calling functions
Anders Halager <halager@gmail.com>
parents:
diff
changeset
|
7 long d = c * a / b; |
6decab6f45c4
Two new tests that uncovered a bug - we dont to type conversion when calling functions
Anders Halager <halager@gmail.com>
parents:
diff
changeset
|
8 } |