Files
swift-mirror/test/Interpreter/repl_hashbang.swift
Dmitri Hrybenko 7684d6dc2a Add a good diagnostic for a hashbang line when it is not allowed
Also centralizes the knowledge about whether the hashbang is allowed in the
SourceManager.  This fixes a bug in tokenize() because previously it just had
to guess.


Swift SVN r6822
2013-08-01 23:07:43 +00:00

7 lines
202 B
Swift

#!/usr/bin/swift
class Foo {}
// Check that we diagnose and skip the hashbang in the REPL.
// RUN: %swift -repl < %s 2>&1 | FileCheck %s
// CHECK: error: hashbang line is allowed only in the main file